Skip to content
Snippets Groups Projects
Commit 67ac9dab authored by tjc's avatar tjc
Browse files

add getTopLevelOrganisms and getOrganismsContainingSrcFeatures

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@9369 ee4ac58c-ac51-4696-9907-e4b3aa274f04
parent 6e88e163
No related branches found
No related tags found
No related merge requests found
......@@ -59,5 +59,26 @@
f.feature_id=$featureId$
</isNull>
</select>
<select id="getOrganismsContainingSrcFeatures" resultClass="org.gmod.schema.organism.Organism">
SELECT DISTINCT ON( feature.organism_id )
organism.organism_id AS organismId, abbreviation, genus, species, common_name AS commonName, comment
FROM feature
join organism using (organism_id)
join cvterm on feature.type_id = cvterm.cvterm_id
WHERE residues notnull AND residues != ''
AND ( <include refid="source_feature_cvterm_names"/> )
</select>
<select id="getTopLevelOrganisms" resultClass="org.gmod.schema.organism.Organism">
SELECT DISTINCT ON( feature.organism_id )
organism.organism_id AS organismId, abbreviation, genus, species, common_name AS commonName, comment
FROM feature
join organism using (organism_id)
join cvterm on feature.type_id = cvterm.cvterm_id
JOIN featureprop using (feature_id)
WHERE featureprop.type_id in
(SELECT cvterm_id FROM cvterm JOIN cv using (cv_id) WHERE cv.name = 'genedb_misc' AND cvterm.name = 'top_level_seq' )
</select>
</sqlMap>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment