Chado query HOWTO: InterPro <-> FlyBase gene

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

Chado query HOWTO: InterPro <-> FlyBase gene

Postby Josh Goodman » Tue Mar 11, 2008 12:33 pm

This query demonstrates how to generate a list of InterPro IDs and their corresponding FlyBase gene. Here is the SQL

Code: Select all
select dbx.accession as INTERPRO_ID, dbx.description as INTERPRO_DOMAIN, f.uniquename as FLYBASE_ID, as FLYBASE_SYMBOL
        from feature f, feature_dbxref fdbx, dbxref dbx, db, cvterm cvt
        where'INTERPRO' and fdbx.is_current=true and'gene' and f.is_obsolete=false
              and db.db_id=dbx.db_id and dbx.dbxref_id=fdbx.dbxref_id
              and fdbx.feature_id=f.feature_id and f.type_id=cvt.cvterm_id;

The output produced will contain 4 columns. The first column is the InterPro ID, the second is the InterPro domain name, and the last two are the FlyBase ID and ASCII symbol for the gene corresponding to the InterPro ID. One way to run this query on our database and save the results is by using the PostgreSQL client. Save the above query to a file and use this command.

Code: Select all
psql -h -U flybase -f query -o interpro_fbgn.txt flybase

Be sure to substitute 'query' for the file containing the saved query.
Josh Goodman
Site Admin
Posts: 66
Joined: Mon Nov 26, 2007 2:39 pm

Return to Power Users