Difference between revisions of "Load RefSeq Into Chado"

From GMOD
Jump to: navigation, search
(Load the GFF3)
m (Text replace - "<sql>" to "<syntaxhighlight lang="sql">")
Line 17: Line 17:
  
 
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 [[Glossary#SQL|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 [[Glossary#SQL|SQL]] command:
<sql>
+
<syntaxhighlight lang="sql">
 
select genus,species,common_name from organism;
 
select genus,species,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 ('H.sapiens', 'Homo', 'sapiens', 'Human');
 
                 values ('H.sapiens', 'Homo', 'sapiens', 'Human');

Revision as of 23:32, 8 October 2012

This HOWTO describes a method for loading the sequence data in Genbank RefSeq files into the Chado database.

Download the Sequence Files

These steps have been used to load data from genomic RefSeq files. You can recognize these files by their NC_ and NT_ prefixes. First download the Genbank genome files of interest. A good source for RefSeq files is NCBI's FTP site. This website provides some files in GFF3 format (suffix .gff). Files in the Genbank format have the suffix .gbk.

Convert RefSeq to GFF3

Use the BioPerl script genbank2gff3.pl, found in scripts/Bio-DB-GFF/ within the BioPerl distribution. If you've actually installed BioPerl then the installed script will have been renamed bp_genbank2gff3.pl. Note that there's also an older genbank2gff.pl script, don't use it.

 >bp_genbank2gff3.pl <filename>

This will create a GFF3 file. It may give several warnings about unrecognized feature types. If the feature types are not part of SOFA, you will have to hand edit the resulting GFF3 file to change the feature type. Any skipped features will be printed at the end. If you want those to be part of the GFF3 file, you will have to add those manually as well, fixing any non-SOFA feature types.

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 genus,species,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 ('H.sapiens', 'Homo', 'sapiens', 'Human');
</sql>
Substitute IN the appropriate VALUES FOR your own organism.
 
==LOAD the GFF3==
 
Run the <code>LOAD/bin/gmod_bulk_load_gff3.pl</code> script FROM the GMOD distribution:
 
   >gmod_bulk_load_gff3.pl --gfffile <your gfffile>
 
IF you didn't specify this organism when installing Chado, (in response to the question "What is the default organism (common name, or "none")"), then you'll need TO ADD at least the <code>--organism <common_name></code> flag to the command.  See <code>perldoc gmod_bulk_load_gff3.pl</code> for an explanation of the other options this script supports.
 
This will LOAD your DATA INTO the [[Chado_-_Getting_Started|Chado DATABASE]].  Note that IF there are non-[http://sequenceontology SOFA] feature types remaining IN the GFF3 file the LOAD will fail WHEN they   are encountered.  IF that happens, edit the file TO fix the incorrect   term AND LOAD again.  IF that happens, the LOAD will be stopped BEFORE the DATABASE IS touched, so you won't have to worry about duplicate data.
 
==More Information==
 
Please send questions to the GMOD developers list:
 
[mailto:gmod-devel@lists.sourceforge.net gmod-devel@lists.sourceforge.net]
 
 
==Authors==
 
* [[User:Scott|Scott Cain]]
* [[bp:Brian_Osborne|Brian Osborne]]
 
[[Category:HOWTO]]
[[Category:Chado]]