Create Export Definition

post

/ohfapi/cg/v3.3/exports

This endpoint supports the creation of Export Definition by Query Name, Study Names and other inputs.

Request

Supported Media Types
Body ()
Root Schema : OmicsExportDefinition
Type: object
Show Source
Nested Schema : CodeCodeSysContainerDS
Type: object
Provide a list of code and of system code combinations.
Show Source
Nested Schema : fileWids
Type: array
List of file load record ids.
Show Source
Example:
"fileWids" : [1,2]
Nested Schema : geneHugoNames
Type: array
List of gene hugo names. Export definition must have either allDataOption or genomicPosition/bedFileNameUploadService or set of genes (geneHugoNames, pathwayNames, geneSetIds).
Show Source
Example:
"geneHugoNames": ["CASZ1","CAMTA1-IT1","RP3-453P22.2"]
Nested Schema : geneSetIds
Type: array
List of gene set ids. Export definition must have either allDataOption or genomicPosition/bedFileNameUploadService or set of genes (geneHugoNames, pathwayNames, geneSetIds).
Show Source
Example:
"geneSetIds" : [1,2]
Nested Schema : genomicPosition
Type: array
Genomic positions. CHROMOSOME ID, START POSITION, END POSITION. START POSITION, END POSITION are optional. Can be sourced from Gene reference APIs or Genomic position APIs. Export definition must have either allDataOption or genomicPosition/bedFileNameUploadService or set of genes (geneHugoNames, pathwayNames, geneSetIds).
Show Source
Example:
"genomicPosition": [{
        "chromosomeId": 10,
        "startPosition": 89682891,
        "endPosition": 100682893
    }, {
        "chromosomeId": 7,
        "startPosition": 89682891
    }, {
        "chromosomeId": 5
    }]
Nested Schema : OdbIdentifier
Type: object
Identifier assigned by a given system
Show Source
Nested Schema : pathwayNames
Type: array
List of pathway names. Export definition must have either allDataOption or genomicPosition/bedFileNameUploadService or set of genes (geneHugoNames, pathwayNames, geneSetIds).
Show Source
Example:
"pathwayNames": ["PATHWAY1","PATHWAY2"]
Nested Schema : patientSubjectId
Type: array
List of patient or subject record ids. The export definition must have either a source of patients/subjects or a source of specimens(specified in specimenIdsCdm and specimenIdsODB). If both are provided the specimen source takes precedence
Show Source
Example:
"patientSubjectId" : [1,2]
Nested Schema : AllCriteriaList
Type: object
Contains all the Query Criteria
Show Source
  • allCriteriaList
    Minimum Number of Items: 1
    Maximum Number of Items: 2147483647
    List of Criteria Eg.DemographicsCriteria,MedicationCriteria,DiagnosisCriteria,SequenceVariantsCriteria,ConsentCriteria,DiagnosisCriteria,EncounterCriteria,ObservationCriteria,HistoryCriteria,ProceduresCriteria,SpecimenCriteria,StudyCriteria,MicroarrayExpressionCriteria,RNASeqExpressionCriteria,CopyNumberVariationCriteria,RelativeTimeEventsCriteria
Nested Schema : specimenIdsCdm
Type: array
List of specimen ids from CDM schema. The export definition must have either a source of patients/subjects or a source of specimens(specified in specimenIdsCdm and specimenIdsODB). If both are provided the specimen source takes precedence
Show Source
Example:
"specimenIdsCdm" : [1,2]
Nested Schema : specimenIdsOdb
Type: array
List of specimen ids from ODB schema. The export definition must have either a source of patients/subjects or a source of specimens(specified in specimenIdsCdm and specimenIdsODB). If both are provided the specimen source takes precedence
Show Source
Example:
"specimenIdsOdb" : [1,2]
Nested Schema : studyNames
Type: array
List of study names.
Show Source
Example:
"studyNames": ["STUDY1","STUDY2"]
Nested Schema : codeCodeSysList
Type: array
List of code and system code combinations
Show Source
Nested Schema : CodeCodeSysDS
Type: object
Provide a list of codes and a list of system codes.
Show Source
Nested Schema : code
Type: array
List codes
Show Source
Nested Schema : codeSys
Type: array
List system codes
Show Source
Nested Schema : ConditionMetaInfo
Type: object
Keep the meta information in here. This will be used for informational purposes.
Show Source
Nested Schema : GenomicPositionFileExport
Type: object
Show Source
Nested Schema : allCriteriaList
Type: array
Minimum Number of Items: 1
Maximum Number of Items: 2147483647
List of Criteria Eg.DemographicsCriteria,MedicationCriteria,DiagnosisCriteria,SequenceVariantsCriteria,ConsentCriteria,DiagnosisCriteria,EncounterCriteria,ObservationCriteria,HistoryCriteria,ProceduresCriteria,SpecimenCriteria,StudyCriteria,MicroarrayExpressionCriteria,RNASeqExpressionCriteria,CopyNumberVariationCriteria,RelativeTimeEventsCriteria
Show Source
Nested Schema : criteria
Type: object
Discriminator: type
Show Source
Security
Back to Top

Response

Supported Media Types

200 Response

successful operation
Body ()
Root Schema : FileExportDefResponse
Type: object
Show Source
Nested Schema : bedFileParsingErrors
Type: array
Will appear if bedFileNameUploadService is input and there are errors.
Show Source
Example:
"bedFileParsingErrors": [
    "Problem converting line 15 from BED file /u01/app/file_uploads/BedFileReaderUtilTest.txt to valid name, start position, end position.",
    "Problem converting line 18 from BED file /u01/app/file_uploads/BedFileReaderUtilTest.txt to valid name, start position, end position.",
    "Problem converting line 19 from BED file /u01/app/file_uploads/BedFileReaderUtilTest.txt to valid name, start position, end position.",
    "For bed file [/u01/app/file_uploads/BedFileReaderUtilTest.txt] cannot find chromosome id for chromosome names [12345 CHR ]"
  ]
Nested Schema : Identifier
Type: object
Identifier assigned by a given system
Show Source
Back to Top

Examples

The following example submits a POST request. See the Criteria Classes for this endpoint.

API URL

http://localhost:7010/ohfapi/cg/v3.3/exports

Example 1 of Request Body ??? (List of genomicPosition, serviceProviderIdentifier, patientSubjectCohortListId, anatomicalSiteCodes, specimenTypeCodes)

{
    "context": "SUBJECT",
    "genomicPosition": [{
        "chromosomeId": 10,
        "startPosition": 89682891,
        "endPosition": 100682893
    }, {
        "chromosomeId": 7,
        "startPosition": 89682891
    }, {
        "chromosomeId": 5
    }],
    "alignmentId": 1,
    "serviceProviderIdentifier": "vcf",
    "patientSubjectCohortListId": 10000000635009,
    "anatomicalSiteCodes": { 
        "codeCodeSysList": [{ 
            "codeSys": ["EHA_CUSTOM_CD_SYS"], 
            "code": ["INGUINAL"] 
        }] 
    },
    "specimenTypeCodes": { 
        "codeCodeSysList": [{ 
            "codeSys": ["EHA_CUSTOM_CD_SYS"], 
            "code": ["Breast duct sample (specimen)"] 
        }] 
    }

}

Example 2 of Request Body ??? (queryCriteria with a single geneHugoNames item)

{
    "context": "patient",
    "geneHugoNames": ["CASZ1"],
    "alignmentId": 1,
    "queryCriteria": {
        "allCriteriaList": [{
            "type": "DemographicsCriteria",
            "patientIdList": ["1", "2"],
            "ageRange": {
                "value": 60,
                "secondValue": 80,
                "op": {
                    "code": "COMP_OP_BETWEEN"
                }
            }
        }, {
            "type": "DiagnosisCriteria",
            "diagnosisNameList": ["D1", "D2"],
            "onsetDateRange": {
                "value": "01/30/2016",
                "secondValue": "01/30/2017",
                "op": {
                    "code": "COMP_OP_BETWEEN"
                }
            }
        }]
    }
}

Example 3 of Request Body ??? (queryName with geneHugoNames)

{
  "context" : "patient",
  "alignmentId" : 1,
  "geneHugoNames": ["CASZ1","CAMTA1-IT1","RP3-453P22.2"],
  "queryName" : "Variant_multipleRegions"
}

Example 4 of Request Body ??? (bedFileNameUploadService with {bucket name}/{object name} format)

{
  "context" : "patient",
  "alignmentId" : 1,
  "specimenIdsOdb" : [63],
  "bedFileNameUploadService" : "julian-test/julian-chrMT-test.txt"
}

Example 5 of Request Body ??? (bedFileNameUploadService with {file name} format)

{
  "context" : "patient",
  "alignmentId" : 1,
  "specimenIdsOdb" : [63],
  "bedFileNameUploadService" : "julian-chrMT-test.txt"
}

Example 6 of Request Body ??? (patientSubjectId with allDataOption)

{
  "context" : "patient",
  "alignmentId" : 1,
  "patientSubjectId" : [1,2],
  "allDataOption" : true
}

Example of Response Body

The following example shows the response in JSON format.

{
  "exportDefId": {
    "system": "ODB",
    "value": "10605"
  },
    "link": {
    "rel": "SUBMITJOB",
    "href": "/ohfapi/cg/v3.3/exports/10605/jobs"
  }
}

Example of Request Body ??? (with bedFileParsingErrors)

The following example shows the response in JSON format.

Note:

bedFileParsingErrors will only appear if bedFileNameUploadService is input and there are errors.

{
  "exportDefId": {
    "system": "ODB",
    "value": "10605"
  },
  "bedFileParsingErrors": [
    "Problem converting line 15 from BED file /u01/app/file_uploads/BedFileReaderUtilTest.txt to valid name, start position, end position.",
    "Problem converting line 18 from BED file /u01/app/file_uploads/BedFileReaderUtilTest.txt to valid name, start position, end position.",
    "Problem converting line 19 from BED file /u01/app/file_uploads/BedFileReaderUtilTest.txt to valid name, start position, end position.",
    "For bed file [/u01/app/file_uploads/BedFileReaderUtilTest.txt] cannot find chromosome id for chromosome names [12345 CHR ]"
  ],
  "link": {
    "rel": "SUBMITJOB",
    "href": "/ohfapi/cg/v3.3/exports/10605/jobs"
  }
}
Back to Top