Json Message Format

4. Json Message Format

    4.1 Analysis

    4.2 DAC

    4.3 dataset

    4.4 Experiment

    4.5 Policy

    4.6 Run

    4.7 sample

    4.8 Study

    4.9 Submission

    4.10 SubmissionSubSetData


4. Json messages format


4.1 Analysis

Analysis
{
  "alias": "",
  "title": "",
  "description": "",
  "studyId": "",
  "sampleReferences": [
    {
      "value": "",
      "label": ""
    }
  ],
  "analysisCenter": "",
  "analysisDate": "",
  "analysisTypeId": "", → /enums/analysis_types
  "files": [
    {
      "fileId ": "",
      "fileName": "",
      "checksum": "",
      "unencryptedChecksum": ""
      "fileTypeId":"" -> /enums/analysis_file_types
    }
  ],
  "attributes": [
    {
      "tag": "",
      "value": "",
      "unit": ""
    }
  ],
  "genomeId": "", → /enums/reference_genomes
  "chromosomeReferences": [ → /enums/reference_chromosomes
    {
      "value": "",
      "label": ""
    }
  ],
  "experimentTypeId": [ "" ], → /enums/experiment_types
  "platform": ""
}
In files, either fileId or fileName is mandatory. You can set both but fileId will have priority.


4.2 DAC

{
  "alias": "",
  "title": "",
  "contacts": [
    {
      "contactName": "",
      "email": "",
      "organisation": "",
      "phoneNumber": ""
    }
  ]
}  


4.3 Dataset

{
  "alias": "",
  "datasetTypeIds": [ "" ], → /enums/dataset_types
  "policyId": "",
  "runsReferences": [ "" ],
  "analysisReferences": [ "" ],
  "title": "",
  "datasetLinks": [
    {
      "label": "",
      "url": ""
    }
  ],
  "attributes": [
    {
      "tag": "",
      "value": ""
    }
  ]
}
At least, one run or one analysis must appear inside runsReferences/analysisReferences. You can use either CRG or EBI internal Ids.


4.4 Experiment

{
  "alias": "",
  "title": "",
  "instrumentModelId": "", → /enums/instrument_models
  "librarySourceId": "", → /enums/library_sources
  "librarySelectionId": "", → /enums/library_selections
  "libraryStrategyId": "", → /enums/library_strategies
  "designDescription": "",
  "libraryName": "",
  "libraryConstructionProtocol": "",
  "libraryLayoutId": "", → 0 (paired), 1 (single)
  "pairedNominalLength": 0,
  "pairedNominalSdev": 0,
  "sampleId": "",
  "studyId": ""
}
 


4.5 Policy

{
  "alias": "",
  "dacId": "",
  "title": "",
  "policyText": "",
  "url": ""
}
  


4.6 Run

{
  "alias": "",
  "sampleId": "",
  "runFileTypeId": "", → /enums/file_types
  "experimentId": "",
  "files": [
    {
	“fileId”: “”,
      "fileName": "",
      "checksum": "",
      "unencryptedChecksum": "",
      "checksumMethod": ""
    }
  ]
}
In files, either fileId or fileName is mandatory. You can set both but fileId will have priority. The full filename should be referenced in the field "fileName" followed by the extension ".gpg". If the data has been deposited in a folder within your ega-box, the complete path to the file should be referenced in the "fileName" field


4.7 Sample

{
  "alias": "",
  "title": "",
  "description": "",
  "caseOrControlId": "", → /enums/case_control
  "genderId": "", → /enums/genders
  "organismPart": "",
  "cellLine": "",
  "region": "",
  "phenotype": "",
  "subjectId": "",
  "anonymizedName": "",
  "biosampleId": "",
  "sampleAge": "",
  "sampleDetail": "",
  "attributes": [
    {
      "tag": "",
      "value": ""
    }
  ]
}
Use attributes field if you have any custom attribute that does not match with the predefine ones (phenotype, organismPart, genderId, etc.).


4.8 Study

{
  "alias": "",
  "studyTypeId": "", → /enums/study_types
  "shortName": "",
  "title": "",
  "studyAbstract": "",
  "ownTerm": "",
  "pubMedIds": [ "" ],
  "customTags": [
    {
      "tag": "",
      "value": ""
    }
  ]
}
  


4.9 Submission

{
	“title” : “”,
	“description” : “”,
	“submissionSubset” : { JSON object, see  SubmissionSubSetData ·  }
}
The field in blue can be used during the validation/submission step to indicate that only a subset of objects belonging to this submission project must be validated/submitted.


4.10 SubmissionSubsetData

SubmissionSubsetData
{
“analysisIds” : [ “” ],
“dacIds” : [ “” ],
“datasetIds” : [ “” ,
“experimentIds” : [ “” ],
“policyIds” : [ “” ],
“runIds” : [ “” ],
“sampleIds” : [ “” ],
“studyIds” : [ “” ]
}