Difference between revisions of "Load GFF Into Chado"

From GMOD
Jump to: navigation, search
m (Creating GFF3 from UniProt/SwissProt Files)
m (Text replace - "<sql>" to "<syntaxhighlight lang="sql">")
Line 15: Line 15:
  
 
You will need to have an entry for your species in the [[Chado_Tables#Table:_organism|Chado organism table]]. If you are unsure if this entry exists log into your database and execute this SQL command:
 
You will need to have an entry for your species in the [[Chado_Tables#Table:_organism|Chado organism table]]. If you are unsure if this entry exists log into your database and execute this SQL command:
<sql>
+
<syntaxhighlight lang="sql">
 
select common_name from organism;
 
select common_name from organism;
 
</sql>
 
</sql>
 
If you do not see your organism listed, execute a command equivalent to this:
 
If you do not see your organism listed, execute a command equivalent to this:
<sql>
+
<syntaxhighlight lang="sql">
 
   insert into organism (abbreviation, genus, species, common_name)
 
   insert into organism (abbreviation, genus, species, common_name)
 
                 values ('S.cerevisiae', 'Saccharomyces', 'cerevisiae', 'yeast');
 
                 values ('S.cerevisiae', 'Saccharomyces', 'cerevisiae', 'yeast');

Revision as of 23:33, 8 October 2012

This HOWTO describes a method for loading sequence annotation data in GFF3 format into a Chado database.

Download the GFF3 Files

An easy way to load data into the database is to use a GFF3 file and the script load/bin/gmod_bulk_load_gff3.pl. A good set of sample data is the GFF3 file prepared by the nice folks at the Saccharomyces Genome Database:

ftp://ftp.yeastgenome.org/pub/yeast/data_download/chromosomal_feature/saccharomyces_cerevisiae.gff

This file contains Gene Ontology (GO) annotations, so if you didn't load GO when you executed make ontologies you will get many warning messages about being unable to find entries in the dbxref table. If you want to load GO you should be able to execute make ontologies and select Gene Ontology for installation.

Add an Entry for Your Organism

You will need to have an entry for your species in the Chado organism table. If you are unsure if this entry exists log into your database and execute this SQL command:

SELECT common_name FROM organism;
</sql>
IF you do NOT see your organism listed, EXECUTE a command equivalent TO this:
<syntaxhighlight lang="sql">
  INSERT INTO organism (abbreviation, genus, species, common_name)
                VALUES ('S.cerevisiae', 'Saccharomyces', 'cerevisiae', 'yeast');
</sql>
 
Substitute IN the appropriate VALUES FOR your own organism IF it's not ''yeast''.
 
==Load the GFF3==
 
Unless your [[GFF3]] is sorted by location with grouped gene models (gene, mRNA, CDS/exon/UTR), you must first do this.   Use this [http://gmod.cvs.sourceforge.net/*checkout*/gmod/schema/chado/bin/gmod_gff3_preprocessor.pl gmod_gff3_preprocessor.pl].
 
 > gmod_gff3_preprocessor.pl --gfffile saccharomyces_cerevisiae.gff --outfile saccharomyces_cerevisiae.sorted.gff
 
Then execute <code>gmod_bulk_load_gff3.pl</code>:
 
 >gmod_bulk_load_gff3.pl --organism yeast  --gfffile saccharomyces_cerevisiae.sorted.gff
 
This loads the [[GFF3]] file.  The loading script requires [[GFF3]] as it has   tighter control of the syntax and requires the use of a controlled  vocabulary (from [http://sequenceontology.org Sequence Ontology Feature Annotation (SOFA)]), allowing  mapping to the relational schema.  In addition to supplying the location  of the file with the <code>--gfffile</code> flag, the <code>--organism</code> tag uses the common name (<code>common_name</code> field) from the [[Chado_Tables#Table:_organism|Chado organism table]].  Do  <code>perldoc gmod_bulk_load_gff.pl</code> for  more information on adding other organisms and databases, as well as other available command line flags.
 
Note that <code>gmod_load_gff3.pl</code> is also available, but is limited in how much it has been supported and in how flexible it currently is.  It is
a good example of how to write code using {{CPAN|Class::DBI}} classes that are created at the time of install.  For more information on using these classes, see [[Modware]] for a {{CPAN|Class::DBI}}-based [[:Category:Middleware|middleware/API]].
 
==Creating GFF3 from UniProt/SwissProt Files==
 
A recent update (April 2007) to <code>bp_genbank2gff3.pl</code> extends it to handle Swiss and EMBL format input, along with GenBank.  You can now create [[GFF3]] entries of UniProt sequences suited to loading into [[Chado]], including most of the protein description, Dbxref, and related fields useful in annotating genome matches.  Use the <code>--format Uniprot</code> flag to specify this input format (<code>--format EMBL</code> can also be useful).
 
   >bp_genbank2gff3.pl --noCDS --in uniprot-subset.dat --format Uniprot
   >gmod_bulk_load_gff3.pl --database mygenome --gff  uniprot-subset.dat.gff --organism fromdata
 
Use the <code>--organism fromdata</code> flag to load UniProt with many organisms.
 
{{NeedsTesting}}
 
==More Information==
 
See the related HOWTO [[Load RefSeq Into Chado]].
 
Please send questions to the GMOD developers list:
 
[mailto:gmod-devel@lists.sourceforge.net gmod-devel@lists.sourceforge.net]
 
Or contact the [[GMOD_Help_Desk|GMOD Help Desk]]
 
==Authors==
 
* [[User:Scott|Scott Cain]]
* [[bp:Brian_Osborne|Brian Osborne]]
 
[[Category:HOWTO]]
[[Category:Chado]]