```#+ summary: Get term ID(s) for a trait defined in several trait ontologies.
#+ tags:
#+ - Get ontology term ID(s) for a trait
#+ defaults:
#+ - trait: tuber AND shape
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bif: <bif:>
SELECT
?trait_id
?trait_term
FROM <http://purl.obolibrary.org/obo/po.owl>
FROM <http://purl.obolibrary.org/obo/to.owl>
FROM <http://purl.bioontology.org/ontology/SPTO>
WHERE {
?trait_uri rdfs:label ?trait_term ;
<http://www.geneontology.org/formats/oboInOwl#id> ?trait_id .
?trait_term bif:contains ?_trait
}
```