Chado query HOWTO: FBal ID -> Annotation ID

A forum for discussing Power User related features of FlyBase such as using Chado, GFF, FASTA files, etc...

Chado query HOWTO: FBal ID -> Annotation ID

Postby Josh Goodman » Tue Jul 08, 2008 1:32 pm

This query returns a 5 column list containing the current values of the allele ID and symbol, the corresponding gene ID and symbol, and the gene annotation ID. Instructions for connecting to our public Chado database can be found here.

Code: Select all
select allele.uniquename as allele_id, as allele_symbol,
       gene.uniquename as gene_id, as gene_symbol, dbx.accession as annotation_id
        from feature allele, feature gene, feature_relationship fr, feature_dbxref fdbx, dbxref dbx, db,
             cvterm fr_type
        where allele.uniquename ~ '^FBal[0-9]+$' and allele.is_obsolete=false and allele.is_analysis=false and
              gene.is_obsolete=false and gene.is_analysis=false and upper( = 'FLYBASE ANNOTATION IDS' and
              fdbx.is_current=true and'alleleof' and
              allele.feature_id=fr.subject_id and fr.type_id=fr_type.cvterm_id and fr.object_id=gene.feature_id and
              gene.feature_id=fdbx.feature_id and fdbx.dbxref_id=dbx.dbxref_id and dbx.db_id=db.db_id;
Josh Goodman
Site Admin
Posts: 66
Joined: Mon Nov 26, 2007 2:39 pm

Return to Power Users