Retrieve the coordinates of MapElements linked to q21 and q31 in Maps containing the cytogenetic region q21-q31.
SELECT ME(map[Map]accessionID, LFM_coord, RFM_coord)
FROM ME IN MapElement,
M IN ME.map[Map],
C IN M.chromosome[Chromosome]searchName,
GS1 IN M.!map[MapElement]segment[GenomicSegment]!dBObject[ObjectName]searchName,
GS2 IN M.!map[MapElement]segment[GenomicSegment]!dBObject[ObjectName]searchName
WHERE C = "1"
AND GS1 = "q21"
AND GS2 = "q31"
AND ME.segment[GenomicSegment]searchName in { "string", "q21", "q31" };
Note that this query could not be expressed as a single query in the OPM 4.0 version of OPM-QL. This is because it would not be possible to fix the map M for a particular MapElement ME and then find distinct GenomicSegments associated with that MapElements of that Map. Instead it would have been necessary to do a single query to find the accession numbers for Maps containing the region q21-q31 (Query 4), and then use these accession numbers in a second query:
SELECT ME(map[Map]accessionID, LFM_coord, RFM_coord)
FROM ME IN MapElement
WHERE ME.map[MAP]accessionID in {"string", "GDB:785407", "GDB:794763"}
AND ME.segment[GenomicSegment]searchName in { "string", "q21", "q31" };