Jdmswong sandbox

From WormBaseWiki
Jump to navigationJump to search

Creating queries

Use case: How do I find all coding sequences for a gene?

How are they intuitively connected? To rationalize biological relationships: genes produce transcripts which produce coding sequences. Keep this in mind while constructing a query.

Easy: Model browser
  1. Querybuilder link.png
  2. Querybuilder left box2.png
Hard: Model file

Use this if the webapp is unavailable.

  • Go to the model, find the gene class ( text find <class name="Gene" ).

   <class name="Gene" extends="SequenceFeature" is-interface="true">
       <attribute name="briefDescription" type="java.lang.String"/>
       <attribute name="operon" type="java.lang.String"/>
       <attribute name="description" type="java.lang.String"/>
       <reference name="referenceAllele" referenced-type="Allele"/>
       <reference name="downstreamIntergenicRegion" referenced-type="IntergenicRegion"/>
       <reference name="upstreamIntergenicRegion" referenced-type="IntergenicRegion"/>
       <collection name="expressionClusters" referenced-type="ExpressionCluster" reverse-reference="genes"/>
       <collection name="regulatoryRegions" referenced-type="RegulatoryRegion" reverse-reference="gene"/>
       <collection name="goAnnotation" referenced-type="GOAnnotation"/>
       <collection name="transcripts" referenced-type="Transcript" reverse-reference="gene"/>
       <collection name="CDSs" referenced-type="CDS" reverse-reference="gene"/>
       <collection name="flankingRegions" referenced-type="GeneFlankingRegion" reverse-reference="gene"/>
       <collection name="proteins" referenced-type="Protein" reverse-reference="genes"/>
       <collection name="UTRs" referenced-type="UTR" reverse-reference="gene"/>
       <collection name="exons" referenced-type="Exon" reverse-reference="gene"/>
       <collection name="expressionPatterns" referenced-type="ExpressionPattern" reverse-reference="gene"/>
       <collection name="alleles" referenced-type="Allele" reverse-reference="gene"/>
       <collection name="introns" referenced-type="Intron" reverse-reference="genes"/>
       <collection name="strains" referenced-type="Strain" reverse-reference="gene"/>
   </class>

  • It references transcripts in this line:
    <collection name="transcripts" referenced-type="Transcript" reverse-reference="gene"/>
    • This is a step in the right direction, query stub is Gene.transcripts
  • Do transcripts refer to coding sequences anywhere?

   <class name="Transcript" extends="SequenceFeature" is-interface="true">
       <reference name="protein" referenced-type="Protein" reverse-reference="transcripts"/>
       <reference name="gene" referenced-type="Gene" reverse-reference="transcripts"/>
       <collection name="introns" referenced-type="Intron" reverse-reference="transcripts"/>
       <collection name="UTRs" referenced-type="UTR" reverse-reference="transcripts"/>
       <collection name="exons" referenced-type="Exon" reverse-reference="transcripts"/>
       <collection name="CDSs" referenced-type="CDS" reverse-reference="transcripts"/>
   </class>

    • Yes: <collection name="CDSs" ....
      • Query stub: Gene.transcripts.CDSs