Data Retrieval: genotype study

From ICISWiki

Jump to: navigation, search

Genomic Feature Detector Queries: (datatype id: GenomicFeatureDetectorBaseConstants.DATATYPE_ID)


Getting by ID:

Searchable attribute id: org.generationcp.ontology.data.genotype.GenomicFeatureDetectorBaseConstants.UNIQUE_IDENTIFIER_DATATYPE_ATTRIBUTE_ID

SQL query:

SELECT DISTINCT gmd.mdid, gnames.gnval FROM gems_names gnames, gems_marker_detector gmd WHERE gnames.gobjid = ? and gnames.gobjtype = 'gems_marker_detector' and gnames.gobjid = gmd.mdid


Getting by Name:

Searchable attribute id: org.generationcp.ontology.data.genotype.GenomicFeatureDetectorBaseConstants.NAME_DATATYPE_ATTRIBUTE_ID

SQL query:

Using Operator.EQUAL

SELECT DISTINCT gmd.mdid, gnames.gnval FROM gems_names gnames, gems_marker_detector gmd WHERE gnames.gnval=? and gnames.gobjtype = 'gems_marker_detector' and gnames.gobjtype = 'gems_marker_detector' and gnames.gobjid = gmd.mdid

Using Operator.LIKE

SELECT DISTINCT gmd.mdid, gnames.gnval FROM gems_names gnames, gems_marker_detector gmd
WHERE gnames.gnval like =? and gnames.gobjtype = 'gems_marker_detector' and gnames.gobjid = gmd.mdid



Getting by GenotypeStudy ID:

Searchable attribute id: org.generationcp.ontology.data.genotype.GenomicFeatureDetectorBaseConstants.STUDIES_DATATYPE_ATTRIBUTE_ID +
org.generationcp.core.ontology.LSID.ATTRIBUTE_DELIMITER +
org.generationcp.ontology.data.genotype.GenotypeStudyBaseConstants.UNIQUE_IDENTIFIER_DATATYPE_ATTRIBUTE_ID

SQL query:

SELECT DISTINCT gmd.mdid, gnames.gnval FROM gems_names gnames, gems_marker_detector gmd, study sgfd, factor fgfd, level_n ln WHERE fgfd.studyid=? and gnames.gobjtype = 'gems_marker_detector' and fgfd.scaleid = 516 AND fgfd.traitid = 503 AND sgfd.stype = 'G' and ln.lvalue = gnames.gobjid and fgfd.studyid = sgfd.studyid and gnames.gobjid = gmd.mdid and
fgfd.labelid = ln.labelid


Getting by GenotypeStudy Name:

Searchable attribute id: org.generationcp.ontology.data.genotype.GenomicFeatureDetectorBaseConstants.STUDIES_DATATYPE_ATTRIBUTE_ID +
org.generationcp.core.ontology.LSID.ATTRIBUTE_DELIMITER +
org.generationcp.ontology.data.genotype.GenotypeStudyBaseConstants.NAME_DATATYPE_ATTRIBUTE_ID

SQL query:

Using Operator.EQUAL

SELECT DISTINCT gmd.mdid, gnames.gnval FROM gems_names gnames, gems_marker_detector gmd, study sgfd, factor fgfd, level_n ln WHERE sgfd.sname=? and gnames.gobjtype = 'gems_marker_detector' and sgfd.stype = 'G' AND fgfd.scaleid = 516 AND fgfd.traitid = 503 and ln.lvalue = gnames.gobjid and fgfd.studyid = sgfd.studyid and gnames.gobjid = gmd.mdid and fgfd.labelid = ln.labelid



Using Operator.LIKE

SELECT DISTINCT gmd.mdid, gnames.gnval FROM gems_names gnames, gems_marker_detector gmd, study sgfd, factor fgfd, level_n ln WHERE sgfd.sname like ? and gnames.gobjtype = 'gems_marker_detector' and sgfd.stype = 'G' AND fgfd.scaleid = 516 AND fgfd.traitid = 503 and ln.lvalue = gnames.gobjid and fgfd.studyid = sgfd.studyid and gnames.gobjid = gmd.mdid and fgfd.labelid = ln.labelid


Personal tools