Create Export Definition
/ohfapi/cg/v3.3/exports
Request
- application/json
- application/xml
object
-
alignmentId:
integer(int64)
Alignment id.Example:
"alignmentId": 1
-
allDataOption(optional):
boolean
Export definition must have either allDataOption or genomicPosition/bedFileNameUploadService or set of genes (geneHugoNames, pathwayNames, geneSetIds).Example:
false
-
anatomicalSiteCodes(optional):
object CodeCodeSysContainerDS
Provide a list of code and of system code combinations.
-
bedFileNameUploadService(optional):
string
BED file contains genomic positions. Can be specified as {bucket name}/{object name} or {file name}. Export definition must have either allDataOption or genomicPosition/bedFileNameUploadService or set of genes (geneHugoNames, pathwayNames, geneSetIds).Example:
BedFileBucket/BedFileObjectName or BedFileName.txt
-
context:
string
Sets the context as Patient or Subject.Example:
PATIENT or SUBJECT
-
fileWids(optional):
array fileWids
List of file load record ids.
-
geneHugoNames(optional):
array geneHugoNames
List of gene hugo names. Export definition must have either allDataOption or genomicPosition/bedFileNameUploadService or set of genes (geneHugoNames, pathwayNames, geneSetIds).
-
geneSetIds(optional):
array geneSetIds
List of gene set ids. Export definition must have either allDataOption or genomicPosition/bedFileNameUploadService or set of genes (geneHugoNames, pathwayNames, geneSetIds).
-
genomicPosition(optional):
array genomicPosition
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).
-
id(optional):
object OdbIdentifier
Identifier assigned by a given system
-
link(optional):
string
A link containing href to submit the file export jobExample:
{rel: 'submit',href: '/exports/{exportId}/jobs'}
-
pathwayNames(optional):
array pathwayNames
List of pathway names. Export definition must have either allDataOption or genomicPosition/bedFileNameUploadService or set of genes (geneHugoNames, pathwayNames, geneSetIds).
-
patientSubjectCohortListId(optional):
integer(int64)
Record id of a saved list of patients or subjects. 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 precedenceExample:
"patientSubjectCohortListId": 10000000635009
-
patientSubjectId(optional):
array patientSubjectId
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
-
queryCriteria(optional):
object AllCriteriaList
Contains all the Query Criteria
-
queryCriteriaJson(optional):
string
Used to transfer query criteria JSON representation from web layer to ejb layer so the JSON can be persisted to support the Retrieve Export Definition API's the @GET export definition API's will return the JSON bound to this property as well as queryCriteria
-
queryName(optional):
string
Cohort Explorer Query Name. 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 precedenceExample:
"queryName" : "Variant_multipleRegions"
-
serviceProviderIdentifier(optional):
string
The service provider identifier (a.k.a. namespace) to be used to find alias values.Example:
"serviceProviderIdentifier": "vcf"
-
specimenIdsCdm(optional):
array specimenIdsCdm
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
-
specimenIdsOdb(optional):
array specimenIdsOdb
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
-
specimenTypeCodes(optional):
object CodeCodeSysContainerDS
Provide a list of code and of system code combinations.
-
studyNames(optional):
array studyNames
List of study names.
object
-
codeCodeSysList(optional):
array codeCodeSysList
List of code and system code combinations
array
"fileWids" : [1,2]
array
"geneHugoNames": ["CASZ1","CAMTA1-IT1","RP3-453P22.2"]
array
"geneSetIds" : [1,2]
array
"genomicPosition": [{
"chromosomeId": 10,
"startPosition": 89682891,
"endPosition": 100682893
}, {
"chromosomeId": 7,
"startPosition": 89682891
}, {
"chromosomeId": 5
}]
object
-
system(optional):
string
System which assigned this identifier
-
value(optional):
string
Identifier value
array
"pathwayNames": ["PATHWAY1","PATHWAY2"]
array
"patientSubjectId" : [1,2]
object
-
allCriteriaList:
array 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
array
"specimenIdsCdm" : [1,2]
array
"specimenIdsOdb" : [1,2]
array
"studyNames": ["STUDY1","STUDY2"]
array
-
Array of:
object CodeCodeSysDS
Provide a list of codes and a list of system codes.
object
-
code(optional):
array code
List codes
-
codeSys(optional):
array codeSys
List system codes
-
info(optional):
object ConditionMetaInfo
Keep the meta information in here. This will be used for informational purposes.
object
-
comment(optional):
string
Comment
-
name(optional):
string
Name
object
-
chromosomeId(optional):
integer(int64)
Record identifier of the chromosome.
-
endPosition(optional):
integer(int64)
Optional. End location of sequence
-
startPosition(optional):
integer(int64)
Optional. Start location of sequence
array
1
2147483647
-
Array of:
object criteria
Discriminator:
type
-
basicAuth: basic
Type:
basic
Response
- application/json
- application/xml
200 Response
object
-
bedFileParsingErrors(optional):
array bedFileParsingErrors
Will appear if bedFileNameUploadService is input and there are errors.
-
exportDefId(optional):
object Identifier
Identifier assigned by a given system
-
link(optional):
string
A link containing href to submit the file export jobExample:
{rel: 'submit',href: '/exports/{exportId}/jobs'}
array
"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 ]"
]
object
-
system(optional):
string
System which assigned this identifier
-
value(optional):
string
Identifier value
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" } }