Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/Babel/bin/create_pg_indexes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ CREATE INDEX sources_name ON sources (name);
CREATE INDEX sources_type ON sources (type);

# load ontologies table
INSERT INTO ontologies (level1,level2,level3,level4,id,type) SELECT level1,level2,level3,level4,id,'KO' FROM ontology_kegg;
INSERT INTO ontologies (level1,level2,level3,level4,id,type) SELECT level1,level2,level3,level4,id,'Subsystems' FROM ontology_seed;
INSERT INTO ontologies (level1,level2,level3,id,type) SELECT level1,level2,level3,id,type FROM ontology_eggnog;
INSERT INTO ontologies (level1,level2,level3,level4,id,source) SELECT level1,level2,level3,level4,id,12 FROM ontology_kegg;
INSERT INTO ontologies (level1,level2,level3,level4,id,source) SELECT level1,level2,level3,level4,id,14 FROM ontology_seed;
INSERT INTO ontologies (level1,level2,level3,id,source) SELECT level1,level2,level3,id,10 FROM ontology_eggnog WHERE type='COG';
INSERT INTO ontologies (level1,level2,level3,id,source) SELECT level1,level2,level3,id,13 FROM ontology_eggnog WHERE type='NOG';

5 changes: 2 additions & 3 deletions src/Babel/bin/dump_annotation_for_solr.pl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
my $count;

if (! $output) {
print STDERR $usage; exit;
print STDERR $usage; exit 1;
}

my $dbh = DBI->connect("DBI:Pg:dbname=$dbname;host=$dbhost", $dbuser, '', {AutoCommit => 0});
Expand Down Expand Up @@ -74,8 +74,7 @@
$count += 1;
}
close(ONT);
$dbh->disconnect;
exit;

print STDERR "Loading organisms ...\n";
my $org_sql = "SELECT _id AS organism_id, name AS organism, tax_domain AS domain, tax_phylum AS phylum, tax_class AS class, tax_order AS order, tax_family AS family, tax_genus AS genus, tax_species AS species, ncbi_tax_id FROM organisms_ncbi";
my $org_lookup = $dbh->selectall_hashref($org_sql , "organism_id");
Expand Down
40 changes: 20 additions & 20 deletions src/Babel/bin/load_stats.pl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
print STDERR $usage; exit;
}

print "Initializing Babel DB\n" if ($verbose);
print STDERR "Initializing Babel DB\n" if ($verbose);
my ($dbh, $babel);
if ($dbname && $dbuser && $dbhost) {
$dbh = DBI->connect("DBI:Pg:dbname=$dbname;host=$dbhost", $dbuser, '');
Expand All @@ -35,62 +35,62 @@
$dbh = $babel->dbh();
}

print "Adding source protein id counts to db ...\n" if ($verbose);
print STDERR "Adding source protein id counts to db ...\n" if ($verbose);
&add_stats( "protein_ids", $babel->source_stats4pid() );
print "Adding source ontology id counts to db ...\n" if ($verbose);
print STDERR "Adding source ontology id counts to db ...\n" if ($verbose);
&add_stats( "ontology_ids", $babel->source_stats4oid() );
print "Adding source rna id counts to db ...\n" if ($verbose);
print STDERR "Adding source rna id counts to db ...\n" if ($verbose);
&add_stats( "rna_ids", $babel->source_stats4rid() );
print "Adding source md5 counts to db ...\n" if ($verbose);
print STDERR "Adding source md5 counts to db ...\n" if ($verbose);
&add_stats( "md5s", $babel->source_stats4md5() );
print "Adding source uniq md5 counts to db ...\n" if ($verbose);
print STDERR "Adding source uniq md5 counts to db ...\n" if ($verbose);
&add_stats( "uniq_md5s", $babel->source_stats4md5uniq() );
print "Adding source function counts to db ...\n" if ($verbose);
print STDERR "Adding source function counts to db ...\n" if ($verbose);
&add_stats( "functions", $babel->source_stats4func() );
print "Adding source contig counts to db ...\n" if ($verbose);
print STDERR "Adding source contig counts to db ...\n" if ($verbose);
&add_stats( "contigs", $babel->source_stats4contig() );
print "Adding source organism counts to db ...\n" if ($verbose);
print STDERR "Adding source organism counts to db ...\n" if ($verbose);
&add_stats( "organisms", $babel->source_stats4org() );
print "Adding source NCBI organism counts to db ...\n" if ($verbose);
print STDERR "Adding source NCBI organism counts to db ...\n" if ($verbose);
&add_stats( "ncbi_organisms", $babel->source_stats4org_tax() );

print "Adding total protein id counts to db ...\n" if ($verbose);
print STDERR "Adding total protein id counts to db ...\n" if ($verbose);
my $t_pid = $dbh->selectcol_arrayref("SELECT COUNT(DISTINCT id) FROM md5_protein");
&add_count( "protein_ids", $t_pid->[0] );

print "Adding total ontology id counts to db ...\n" if ($verbose);
print STDERR "Adding total ontology id counts to db ...\n" if ($verbose);
my $t_oid = $dbh->selectcol_arrayref("SELECT COUNT(DISTINCT id) FROM md5_ontology");
&add_count( "ontology_ids", $t_oid->[0] );

print "Adding total rna id counts to db ...\n" if ($verbose);
print STDERR "Adding total rna id counts to db ...\n" if ($verbose);
my $t_rid = $dbh->selectcol_arrayref("SELECT COUNT(DISTINCT id) FROM md5_rna");
&add_count( "rna_ids", $t_rid->[0] );

print "Adding total function counts to db ...\n" if ($verbose);
print STDERR "Adding total function counts to db ...\n" if ($verbose);
my $t_func = $dbh->selectcol_arrayref("SELECT COUNT(_id) FROM functions");
&add_count( "functions", $t_func->[0] );

print "Adding total organism counts to db ...\n" if ($verbose);
print STDERR "Adding total organism counts to db ...\n" if ($verbose);
my $t_org = $dbh->selectcol_arrayref("SELECT COUNT(_id) FROM organisms_ncbi");
&add_count( "organisms", $t_org->[0] );

print "Adding total contig counts to db ...\n" if ($verbose);
print STDERR "Adding total contig counts to db ...\n" if ($verbose);
my $t_ctg = $dbh->selectcol_arrayref("SELECT COUNT(_id) FROM contigs");
&add_count( "contigs", $t_ctg->[0] );

print "Adding protein md5 counts to db ...\n" if ($verbose);
print STDERR "Adding protein md5 counts to db ...\n" if ($verbose);
my $t_pmd5 = $dbh->selectcol_arrayref("SELECT COUNT(DISTINCT md5) FROM md5_protein");
&add_count( "protein_md5s", $t_pmd5->[0] );

print "Adding rna md5 counts to db ...\n" if ($verbose);
print STDERR "Adding rna md5 counts to db ...\n" if ($verbose);
my $t_rmd5 = $dbh->selectcol_arrayref("SELECT COUNT(DISTINCT md5) FROM md5_rna");
&add_count( "rna_md5s", $t_rmd5->[0] );

print "Adding total md5 counts to db ...\n" if ($verbose);
print STDERR "Adding total md5 counts to db ...\n" if ($verbose);
my $t_md5 = $t_pmd5->[0] + $t_rmd5->[0];
&add_count( "md5s", $t_md5 );

print "Done\n" if ($verbose);
print STDERR "Done\n" if ($verbose);

sub add_stats {
my ($col, $data) = @_;
Expand Down
4 changes: 2 additions & 2 deletions src/Babel/info/ach_downloads
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ KEGG ftp://ftp.genome.jp/pub/kegg/release/current/ genes.tar.gz 2011-2-22
KEGG ftp://ftp.genome.jp/pub/kegg/brite/ko/ *.keg 2011-2-22
UniProt ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/complete/ uniprot_sprot.dat.gz 2013-08-01
UniProt ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/complete/ uniprot_trembl.dat.gz 2013-08-01
SEED ftp://ftp.theseed.org/misc/Data/idmapping/ SEED.fasta 2013-08-01
SEED ftp://ftp.theseed.org/subsystems/ subsystems2role.gz 2013-08-01
KBase ftp://ftp.theseed.org/misc/Data/idmapping/ SEED.fasta 2013-08-01
KBase ftp://ftp.theseed.org/subsystems/ subsystems2role.gz 2013-08-01
Phantome http://www.phantome.org/Downloads/proteins/all_sequences/ phage_proteins_1375354802.fasta.gz 2013-08-01
VBI http://brcdownloads.vbi.vt.edu/patric2/genomes/ *.PATRIC.gbf 2013-08-01
JGI ftp://ftp.jgi-psf.org/pub/IMG/ img_core_v400.tar 2013-08-01
Expand Down
4 changes: 2 additions & 2 deletions src/Babel/info/ach_sources
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ KEGG KEGG Release 56 Kyoto Encyclopedia of Genes and Genomes protein http://www
SwissProt UniProt Release 2013_08 Swiss-Prot UniProt Knowledgebase UniProt Knowledgebase protein http://www.uniprot.org http://www.uniprot.org/uniprot/
TrEMBL UniProt Release 2013_08 TrEMBL UniProt Knowledgebase UniProt Knowledgebase protein http://www.uniprot.org http://www.uniprot.org/uniprot/
IMG JGI 4.0 Integrated Microbial Genomes at the Joint Genome Institute Joint Genome Institute protein http://img.jgi.doe.gov http://img.jgi.doe.gov/cgi-bin/w/main.cgi?section=GeneDetail&gene_oid=
SEED SEED The SEED Project protein http://www.theseed.org http://seed-viewer.theseed.org/seedviewer.cgi?page=Annotation&feature=
KBase KBase DOE Systems Biology Knowledgebase protein http://kbase.us http://140.221.84.217/feature_info/feature.html?id=
Phantome Phantome 01-Aug-2013 Phage Annotation Tools and Methods protein http://www.phantome.org
PATRIC VBI Mar2013 Pathosystems Resource Integration Center Virginia Bioinformatics Institute protein http://www.patricbrc.org
KO KEGG Release 56 KEGG Orthology Kyoto Encyclopedia of Genes and Genomes ontology http://www.genome.jp/kegg http://www.genome.jp/dbget-bin/www_bget?ko:
Subsystems SEED SEED Subsystems Annotation The SEED Project ontology http://www.theseed.org http://seed-viewer.theseed.org/seedviewer.cgi?page=Subsystems&subsystem=
Subsystems KBase KBase Subsystems Annotation DOE Systems Biology Knowledgebase ontology http://kbase.us http://seed-viewer.theseed.org/seedviewer.cgi?page=Subsystems&subsystem=
COG eggNOG 3.0 eggNOG: Clusters of Orthologous Groups evolutionary genealogy of genes: Non-supervised Orthologous Groups ontology http://eggnog.embl.de http://www.ncbi.nlm.nih.gov/COG/grace/wiew.cgi?
NOG eggNOG 3.0 eggNOG: Non-supervised Orthologous Groups evolutionary genealogy of genes: Non-supervised Orthologous Groups ontology http://eggnog.embl.de
RDP RDP 10.32 Ribosomal Database Project rna http://rdp.cme.msu.edu
Expand Down