You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(19) |
Jun
(119) |
Jul
(21) |
Aug
(7) |
Sep
(2) |
Oct
(126) |
Nov
(85) |
Dec
(138) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(33) |
Feb
(11) |
Mar
(53) |
Apr
(73) |
May
(31) |
Jun
(33) |
Jul
(81) |
Aug
(68) |
Sep
(44) |
Oct
(21) |
Nov
(30) |
Dec
(50) |
2005 |
Jan
(9) |
Feb
(61) |
Mar
(83) |
Apr
(81) |
May
(41) |
Jun
(40) |
Jul
(87) |
Aug
(32) |
Sep
(22) |
Oct
(6) |
Nov
(9) |
Dec
(63) |
2006 |
Jan
(17) |
Feb
(5) |
Mar
(19) |
Apr
(71) |
May
(10) |
Jun
(18) |
Jul
(22) |
Aug
(18) |
Sep
(12) |
Oct
(10) |
Nov
(14) |
Dec
(32) |
2007 |
Jan
(52) |
Feb
(82) |
Mar
(53) |
Apr
(59) |
May
(13) |
Jun
(5) |
Jul
(8) |
Aug
(108) |
Sep
(10) |
Oct
(17) |
Nov
(20) |
Dec
(12) |
2008 |
Jan
(16) |
Feb
(7) |
Mar
(62) |
Apr
(6) |
May
(21) |
Jun
(10) |
Jul
(32) |
Aug
(12) |
Sep
(16) |
Oct
(27) |
Nov
(31) |
Dec
(37) |
2009 |
Jan
(10) |
Feb
(14) |
Mar
(13) |
Apr
(22) |
May
(52) |
Jun
(40) |
Jul
(26) |
Aug
(20) |
Sep
(31) |
Oct
(11) |
Nov
(7) |
Dec
(37) |
2010 |
Jan
(12) |
Feb
(6) |
Mar
(8) |
Apr
(25) |
May
(20) |
Jun
(23) |
Jul
(4) |
Aug
(20) |
Sep
(7) |
Oct
(11) |
Nov
(21) |
Dec
|
2011 |
Jan
(1) |
Feb
(4) |
Mar
(5) |
Apr
(4) |
May
(1) |
Jun
(10) |
Jul
(4) |
Aug
(20) |
Sep
(20) |
Oct
(4) |
Nov
(16) |
Dec
(1) |
2012 |
Jan
(1) |
Feb
(2) |
Mar
(7) |
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2013 |
Jan
(1) |
Feb
(3) |
Mar
(3) |
Apr
|
May
(2) |
Jun
|
Jul
(2) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <em...@us...> - 2013-09-09 13:18:13
|
Revision: 25291 http://sourceforge.net/p/gmod/svn/25291 Author: emmert Date: 2013-09-09 13:17:56 +0000 (Mon, 09 Sep 2013) Log Message: ----------- Added documentation to new tables and made some minor formatting changes where neccesary for consistency. Modified Paths: -------------- schema/trunk/chado/modules/library/library.sql schema/trunk/chado/modules/organism/organism.sql schema/trunk/chado/modules/phenotype/phenotype.sql Modified: schema/trunk/chado/modules/library/library.sql =================================================================== --- schema/trunk/chado/modules/library/library.sql 2013-07-26 17:23:56 UTC (rev 25290) +++ schema/trunk/chado/modules/library/library.sql 2013-09-09 13:17:56 UTC (rev 25291) @@ -35,8 +35,7 @@ create index library_idx2 on library (type_id); create index library_idx3 on library (uniquename); -COMMENT ON COLUMN library.type_id IS 'The type_id foreign key links -to a controlled vocabulary of library types. Examples of this would be: "cDNA_library" or "genomic_library"'; +COMMENT ON COLUMN library.type_id IS 'The type_id foreign key links to a controlled vocabulary of library types. Examples of this would be: "cDNA_library" or "genomic_library"'; -- ================================================ @@ -60,9 +59,13 @@ create index library_synonym_idx2 on library_synonym (library_id); create index library_synonym_idx3 on library_synonym (pub_id); +COMMENT ON TABLE library_synonym IS 'Linking table between library and synonym.'; + COMMENT ON COLUMN library_synonym.is_current IS 'The is_current bit indicates whether the linked synonym is the current -official- symbol for the linked library.'; + COMMENT ON COLUMN library_synonym.pub_id IS 'The pub_id link is for relating the usage of a given synonym to the publication in which it was used.'; + COMMENT ON COLUMN library_synonym.is_internal IS 'Typically a synonym exists so that somebody querying the database with an obsolete name can find the object they are looking for under its current name. If @@ -85,7 +88,9 @@ create index library_pub_idx1 on library_pub (library_id); create index library_pub_idx2 on library_pub (pub_id); +COMMENT ON TABLE library_pub IS 'Attribution for a library.'; + -- ================================================ -- TABLE: libraryprop -- ================================================ @@ -104,7 +109,9 @@ create index libraryprop_idx1 on libraryprop (library_id); create index libraryprop_idx2 on libraryprop (type_id); +COMMENT ON TABLE libraryprop IS 'Tag-value properties - follows standard chado model.'; + -- ================================================ -- TABLE: libraryprop_pub -- ================================================ @@ -121,7 +128,9 @@ create index libraryprop_pub_idx1 on libraryprop_pub (libraryprop_id); create index libraryprop_pub_idx2 on libraryprop_pub (pub_id); +COMMENT ON TABLE libraryprop_pub IS 'Attribution for libraryprop.'; + -- ================================================ -- TABLE: library_cvterm -- ================================================ @@ -180,7 +189,9 @@ create index library_dbxref_idx1 on library_dbxref (library_id); create index library_dbxref_idx2 on library_dbxref (dbxref_id); +COMMENT ON TABLE library_dbxref IS 'Links a library to dbxrefs.'; + -- ================================================ -- TABLE: library_expression -- ================================================ @@ -200,7 +211,9 @@ create index library_expression_idx2 on library_expression (expression_id); create index library_expression_idx3 on library_expression (pub_id); +COMMENT ON TABLE library_expression IS 'Links a library to expression statements.'; + -- ================================================ -- TABLE: library_expressionprop -- ================================================ @@ -219,7 +232,9 @@ create index library_expressionprop_idx1 on library_expressionprop (library_expression_id); create index library_expressionprop_idx2 on library_expressionprop (type_id); +COMMENT ON TABLE library_expressionprop IS 'Attributes of a library_expression relationship.'; + -- ================================================ -- TABLE: library_featureprop -- ================================================ @@ -238,7 +253,9 @@ create index library_featureprop_idx1 on library_featureprop (library_feature_id); create index library_featureprop_idx2 on library_featureprop (type_id); +COMMENT ON TABLE library_featureprop IS 'Attributes of a library_feature relationship.'; + -- ================================================ -- TABLE: library_interaction -- ================================================ @@ -258,7 +275,9 @@ create index library_interaction_idx2 on library_interaction (library_id); create index library_interaction_idx3 on library_interaction (pub_id); +COMMENT ON TABLE library_interaction IS 'Links a library to an interaction.'; + -- ================================================ -- TABLE: library_relationship -- ================================================ @@ -278,7 +297,9 @@ create index library_relationship_idx2 on library_relationship (object_id); create index library_relationship_idx3 on library_relationship (type_id); +COMMENT ON TABLE library_relationship IS 'Relationships between libraries.'; + -- ================================================ -- TABLE: library_relationship_pub -- ================================================ @@ -295,7 +316,9 @@ create index library_relationship_pub_idx1 on library_relationship_pub (library_relationship_id); create index library_relationship_pub_idx2 on library_relationship_pub (pub_id); +COMMENT ON TABLE library_relationship_pub IS 'Provenance of library_relationship.'; + -- ================================================ -- TABLE: library_strain -- ================================================ @@ -311,3 +334,5 @@ ); create index library_strain_idx1 on library_strain (library_id); create index library_strain_idx2 on library_strain (strain_id); + +COMMENT ON TABLE library_strain IS 'Links a library to a strain.'; Modified: schema/trunk/chado/modules/organism/organism.sql =================================================================== --- schema/trunk/chado/modules/organism/organism.sql 2013-07-26 17:23:56 UTC (rev 25290) +++ schema/trunk/chado/modules/organism/organism.sql 2013-09-09 13:17:56 UTC (rev 25291) @@ -56,7 +56,9 @@ create index organism_dbxref_idx1 on organism_dbxref (organism_id); create index organism_dbxref_idx2 on organism_dbxref (dbxref_id); +COMMENT ON TABLE library_dbxref IS 'Links a library to dbxrefs.'; + -- ================================================ -- TABLE: organismprop -- ================================================ @@ -118,7 +120,9 @@ create index organism_pub_idx1 on organism_pub (organism_id); create index organism_pub_idx2 on organism_pub (pub_id); +COMMENT ON TABLE organism_pub IS 'Attribution for organism.'; + -- ================================================ -- TABLE: organism_cvterm -- ================================================ @@ -374,11 +378,13 @@ create index strain_dbxref_idx1 on strain_dbxref (strain_id); create index strain_dbxref_idx2 on strain_dbxref (dbxref_id); +COMMENT ON TABLE strain_dbxref IS 'Links a strain to dbxrefs. This is for secondary identifiers; primary identifiers should use strain.dbxref_id.'; --- ================================================ --- TABLE: strain_pub --- ================================================ +-- ================================================ +-- TABLE: strain_pub +-- ================================================ + drop table strain_pub cascade; create table strain_pub ( strain_pub_id serial not null, @@ -392,7 +398,9 @@ create index strain_pub_idx1 on strain_pub (strain_id); create index strain_pub_idx2 on strain_pub (pub_id); +COMMENT ON TABLE strain_pub IS 'Provenance. Linking table between strains and publications that mention them.'; + -- ================================================ -- TABLE: strain_synonym -- ================================================ Modified: schema/trunk/chado/modules/phenotype/phenotype.sql =================================================================== --- schema/trunk/chado/modules/phenotype/phenotype.sql 2013-07-26 17:23:56 UTC (rev 25290) +++ schema/trunk/chado/modules/phenotype/phenotype.sql 2013-09-09 13:17:56 UTC (rev 25291) @@ -45,6 +45,7 @@ COMMENT ON COLUMN phenotype.cvalue_id IS 'Phenotype attribute value (state).'; COMMENT ON COLUMN phenotype.assay_id IS 'Evidence type.'; + -- ================================================ -- TABLE: phenotype_cvterm -- ================================================ @@ -62,8 +63,9 @@ CREATE INDEX phenotype_cvterm_idx1 ON phenotype_cvterm (phenotype_id); CREATE INDEX phenotype_cvterm_idx2 ON phenotype_cvterm (cvterm_id); -COMMENT ON TABLE phenotype_cvterm IS NULL; +COMMENT ON TABLE phenotype_cvterm IS 'phenotype to cvterm associations.'; + -- ================================================ -- TABLE: feature_phenotype -- ================================================ @@ -80,9 +82,12 @@ CREATE INDEX feature_phenotype_idx1 ON feature_phenotype (feature_id); CREATE INDEX feature_phenotype_idx2 ON feature_phenotype (phenotype_id); -COMMENT ON TABLE feature_phenotype IS NULL; +COMMENT ON TABLE feature_phenotype IS 'Linking table between features and phenotypes.'; +-- ================================================ +-- TABLE: phenotypeprop +-- ================================================ create table phenotypeprop ( phenotypeprop_id serial not null, @@ -98,8 +103,4 @@ create index phenotypeprop_idx1 on phenotypeprop (phenotype_id); create index phenotypeprop_idx2 on phenotypeprop (type_id); -COMMENT ON TABLE phenotypeprop IS 'A phenotype can have any number of -slot-value property tags attached to it. This is an alternative to -hardcoding a list of columns in the relational schema, and is -completely extensible. There is a unique constraint, phenotypeprop_c1, for -the combination of phenotype_id, rank, and type_id. Multivalued property-value pairs must be differentiated by rank.'; +COMMENT ON TABLE phenotypeprop IS 'A phenotype can have any number of slot-value property tags attached to it. This is an alternative to hardcoding a list of columns in the relational schema, and is completely extensible. There is a unique constraint, phenotypeprop_c1, for the combination of phenotype_id, rank, and type_id. Multivalued property-value pairs must be differentiated by rank.'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sco...@us...> - 2013-07-26 17:24:10
|
Revision: 25290 http://sourceforge.net/p/gmod/svn/25290 Author: scottcain Date: 2013-07-26 17:23:56 +0000 (Fri, 26 Jul 2013) Log Message: ----------- added a warning message for the GFF bulk loader if part_of isn't found and a minor doc fix for UPGRADE.txt. Modified Paths: -------------- schema/trunk/chado/Changes schema/trunk/chado/UPGRADE.txt schema/trunk/chado/lib/Bio/GMOD/DB/Adapter.pm Modified: schema/trunk/chado/Changes =================================================================== --- schema/trunk/chado/Changes 2013-07-16 17:49:23 UTC (rev 25289) +++ schema/trunk/chado/Changes 2013-07-26 17:23:56 UTC (rev 25290) @@ -1,4 +1,5 @@ Version 1.24 Mon Mar 4 17:18:47 EST 2013 +* Added a warning message for the GFF bulk loader if part_of isn't found. * Fixed ncbi_taxonomy loader to load entire NCBI taxonomy (Naama) * Patched gmod_bulk_load_gff3.pl (provided by Alexie P) to fix the "orgainism from data" option. Modified: schema/trunk/chado/UPGRADE.txt =================================================================== --- schema/trunk/chado/UPGRADE.txt 2013-07-16 17:49:23 UTC (rev 25289) +++ schema/trunk/chado/UPGRADE.txt 2013-07-26 17:23:56 UTC (rev 25290) @@ -16,7 +16,7 @@ perl Makefile.PL make - make install + sudo make install and then, rather than doing the next step (make load_schema) which would wipe out the current database, do Modified: schema/trunk/chado/lib/Bio/GMOD/DB/Adapter.pm =================================================================== --- schema/trunk/chado/lib/Bio/GMOD/DB/Adapter.pm 2013-07-16 17:49:23 UTC (rev 25289) +++ schema/trunk/chado/lib/Bio/GMOD/DB/Adapter.pm 2013-07-26 17:23:56 UTC (rev 25290) @@ -1506,6 +1506,9 @@ $sth->execute; ($part_of) = $sth->fetchrow_array(); + warn "\n\nWARNING:\nUnable to find a 'part_of' term in the relationship ontology;\nIt's absense indicates that there is something really wrong with the database.\nConsider stopping and checking the state of your cvterm table.\n\n\n"; + + $sth = $self->dbh->prepare( "select cvterm_id from cvterm where name = 'derives_from' and cv_id in ( SELECT cv_id FROM cv WHERE name='relationship' @@ -3432,6 +3435,7 @@ $tuniquename = $target_id; $name = $target_id; } +###FIXME: put my $tuniquename = $target_id.'_'.$self->nextfeature; in else here $self->print_f($self->nextfeature, $self->organism_id(), $name,$tuniquename , $type, '\N','\N'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nm...@us...> - 2013-07-16 17:49:36
|
Revision: 25289 http://sourceforge.net/p/gmod/svn/25289 Author: nm249 Date: 2013-07-16 17:49:23 +0000 (Tue, 16 Jul 2013) Log Message: ----------- dbxref accession is varchar 255 Modified Paths: -------------- schema/trunk/chado/bin/gmod_load_cvterms.pl Modified: schema/trunk/chado/bin/gmod_load_cvterms.pl =================================================================== --- schema/trunk/chado/bin/gmod_load_cvterms.pl 2013-05-29 17:04:46 UTC (rev 25288) +++ schema/trunk/chado/bin/gmod_load_cvterms.pl 2013-07-16 17:49:23 UTC (rev 25289) @@ -491,7 +491,8 @@ my $def_dbxref = $dblink->database() . ':' . $dblink->primary_id(); $file_def_dbxrefs{uc($def_dbxref)}=1; message("adding definition dbxref $def_dbxref to cvterm_dbxref\n"); - $db_index{$k}->add_secondary_dbxref($def_dbxref, 1); + $def_dbxref = substr($def_dbxref, 0, 255); + $db_index{$k}->add_secondary_dbxref($def_dbxref, 1); } } } @@ -568,12 +569,13 @@ foreach my $i ($novel_terms{$k}->get_secondary_ids()) { #store secondary ids in cvterm_dbxref message("adding secondary dbxref '$i' to cvterm_dbxref\n"); - + $i = substr($i, 0, 255); $new_term->add_secondary_dbxref($i); } foreach my $r ($novel_terms{$k}->get_dbxrefs() ) { #store definition's dbxrefs in cvterm_dbxref if (!$r->database || !$r->primary_id) { next; } # skip def. dbxrefs without both db_name and accession my $def_dbxref= $r->database() . ':' . $r->primary_id(); + $def_dbxref = substr($def_dbxref, 0, 255); message("adding definition dbxref $def_dbxref to cvterm_dbxref\n"); $new_term->add_secondary_dbxref($def_dbxref, 1); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sco...@us...> - 2013-05-29 17:04:57
|
Revision: 25288 http://gmod.svn.sourceforge.net/gmod/?rev=25288&view=rev Author: scottcain Date: 2013-05-29 17:04:46 +0000 (Wed, 29 May 2013) Log Message: ----------- added note about taxonomy loader fix Modified Paths: -------------- schema/trunk/chado/Changes Modified: schema/trunk/chado/Changes =================================================================== --- schema/trunk/chado/Changes 2013-05-29 16:35:23 UTC (rev 25287) +++ schema/trunk/chado/Changes 2013-05-29 17:04:46 UTC (rev 25288) @@ -1,4 +1,5 @@ Version 1.24 Mon Mar 4 17:18:47 EST 2013 +* Fixed ncbi_taxonomy loader to load entire NCBI taxonomy (Naama) * Patched gmod_bulk_load_gff3.pl (provided by Alexie P) to fix the "orgainism from data" option. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nm...@us...> - 2013-05-29 16:35:37
|
Revision: 25287 http://gmod.svn.sourceforge.net/gmod/?rev=25287&view=rev Author: nm249 Date: 2013-05-29 16:35:23 +0000 (Wed, 29 May 2013) Log Message: ----------- optional loading of entire ncbi taxonomy should work now Modified Paths: -------------- schema/trunk/chado/bin/load_ncbi_taxonomy.pl Modified: schema/trunk/chado/bin/load_ncbi_taxonomy.pl =================================================================== --- schema/trunk/chado/bin/load_ncbi_taxonomy.pl 2013-03-04 22:27:55 UTC (rev 25286) +++ schema/trunk/chado/bin/load_ncbi_taxonomy.pl 2013-05-29 16:35:23 UTC (rev 25287) @@ -290,68 +290,76 @@ #read in the taxonomy tree open( NODE, "nodes.dmp" ); while ( my $line = <NODE> ) { + chomp $line; my ( $id, $parent, $level ) = split /\s+\|\s+/, $line; ###message("id = $id, parent = $parent, level = $level\n",1); - next unless $okay_level{ $level }; - - # check for data consistency - if ($infile) { + if ( !($okay_level{ $level } ) ) { + message("Node rank not found in the database (" . $okay_level{ $level } . "). Skipping\n"); + next; + } + # check for data consistency + if ($infile) { if ( exists $tax_file{$id} ) { # check if the parent is in the taxfile if ( $parent && !(exists $tax_file{ $parent } ) ) { - message ("Parent $parent for tax_id $id does not exist in your input file ! This means $id is your root, or you need to check your input!\n",1); + message ("Parent $parent for tax_id '" . $id . "' does not exist in your input file ! This means $id is your root, or you need to check your input!\n",1); } } else{ next(); } # skip nodes not in tax_file } - + ###message("STORING NODE is node hash\n",1); - $node{ $id }{ 'parent_taxid' } = $parent; - $node{ $id }{ 'self_taxid' } = $id; - $node{ $id }{ 'level' } = $level; + $node{$id}{ 'parent_taxid' } = $parent; + $node{$id}{ 'self_taxid' } = $id; + $node{$id}{ 'level' } = $level; } close( NODE ); open( NAME, "names.dmp" ); while ( my $line = <NAME> ) { - #next unless $line =~ /scientific name/; + chomp $line; my ( $id, $name ) = split /\s+\|\s+/, $line; ###message("NAMES: id = $id, name = $name\n",1); - next unless $node{ $id }; #skip nodes + next unless $node{$id}; #skip nodes if ( $line =~ /scientific name/) { ###message("Storing scientific name '$name'\n",1); - $node{ $id }{ 'name' } = $name; - $node{ $id }{ 'name' } .= " Taxonomy:$id" if $seen{ $name }++; + $node{$id}{ 'name' } = $name; + $node{$id}{ 'name' } .= " Taxonomy:$id" if $seen{ $name }++; } elsif ( $line =~ /common name/) { # genbank common names - push(@{ $node{ $id }{ 'common_name' } } , $name); + push(@{ $node{$id}{ 'common_name' } } , $name); push(@{ $node{$id}{ 'synonyms' } }, $name); - + } elsif ( $line =~ /synonym/ ) { push @{ $node{$id}{ 'synonyms' } }, $name; } + # populate $tax_file with the ids from the names file if a filtering file is not passed + if (!$infile) { + $tax_file{$id} = $id; + } + # } close( NAME ); foreach my $id ( keys %node ) { - ###message("Looking at id $id in node hash... level = " . $node{ $id }{'level'} . "\n",1); - my $parent_taxid = $node{ $id }{ 'parent_taxid' } ; - if (!$tax_file{$parent_taxid}) { - message("No parent id found for species " . $node{ $id }{ 'name' } . " (id = $id) !! This means your species is the root node, or there is an error in yout input file \n", 1); + ##message("Looking at id '" . $id . "' in node hash... level = " . $node{$id}{'level'} . "\n",1); + my $parent_taxid = $node{$id}{ 'parent_taxid' } ; + if (!$tax_file{$parent_taxid}) { + message("No parent id found for species " . $node{ $id }{ 'name' } . " (id = '" . $id . "') !! This means your species is the root node, or there is an error in yout input file \n\n", 1); } if ( $node{ $id }{ 'level' } eq 'species' ) { # load the genus name from the parent_taxid if (!$tax_file{$parent_taxid}) { - die "No parent id found for species " . $node{ $id }{ 'name' } . " (id = $id) !! Check your input file !!\n" ; + die "No parent id found for species " . $node{ $id }{ 'name' } . " (id = '" . $id . "') !! Check your input file !!\n" ; } - + $node{ $id }{ 'genus' } = $node{ $parent_taxid }{ 'name' }; $node{ $id }{ 'species' } = $node{ $id }{ 'name' }; ###message("FOUND SPECIES: " . $node{ $id }{ 'name' } . " genus = " . $node{ $id }{ 'genus' } . "\n" , 1); - + } else { - ###message("FOUND NODE NAME: " . $node{ $node{ $id }{ 'parent_taxid' }}{ 'name' } . "( genus = " . $node{ $id }{ 'level' } . " species = " . $node{ $id }{ 'name' } . "\n",1); - + ###message("FOUND NODE NAME: " . $node{ $node{ $id }{ 'parent_taxid' }}{ 'name' } . "( genus = " . $node{ $id }{ 'level' } . " species = " . $node{ $id }{ 'name' } . "\n",1); + $node{ $id }{ 'genus' } = $node{ $id }{ 'level' }; $node{ $id }{ 'species' } = $node{ $id }{ 'name' }; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sco...@us...> - 2013-03-04 22:28:06
|
Revision: 25286 http://gmod.svn.sourceforge.net/gmod/?rev=25286&view=rev Author: scottcain Date: 2013-03-04 22:27:55 +0000 (Mon, 04 Mar 2013) Log Message: ----------- updating the changes file Modified Paths: -------------- schema/trunk/chado/Changes Modified: schema/trunk/chado/Changes =================================================================== --- schema/trunk/chado/Changes 2013-03-04 22:09:03 UTC (rev 25285) +++ schema/trunk/chado/Changes 2013-03-04 22:27:55 UTC (rev 25286) @@ -1,3 +1,7 @@ +Version 1.24 Mon Mar 4 17:18:47 EST 2013 +* Patched gmod_bulk_load_gff3.pl (provided by Alexie P) to fix the +"orgainism from data" option. + Version 1.23 Thu Dec 1 14:45:22 EST 2011 * Added $VERSION to Bio::GMOD::DB::Config so that when installing Bio::DB::Das::Chado it would be happy. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sco...@us...> - 2013-03-04 22:09:15
|
Revision: 25285 http://gmod.svn.sourceforge.net/gmod/?rev=25285&view=rev Author: scottcain Date: 2013-03-04 22:09:03 +0000 (Mon, 04 Mar 2013) Log Message: ----------- add a patch from Alexie for the organism from data functionality; not tested yet! Modified Paths: -------------- schema/trunk/chado/load/bin/bulk_load_gff3.PLS Modified: schema/trunk/chado/load/bin/bulk_load_gff3.PLS =================================================================== --- schema/trunk/chado/load/bin/bulk_load_gff3.PLS 2013-02-28 19:43:35 UTC (rev 25284) +++ schema/trunk/chado/load/bin/bulk_load_gff3.PLS 2013-03-04 22:09:03 UTC (rev 25285) @@ -826,7 +826,11 @@ ? ($feature->annotation->get_Annotations('organism'))[0] : ''; if($gff_organism && $gff_organism ne $chado->organism()) { - $ORGANISM = "$gff_organism";# is it pesky bperl object? + #next 4 lines patch by Alexie P. + $ORGANISM = "$gff_organism";# is it pesky bperl object? # sadly yes + if (ref($gff_organism)){ + $ORGANISM = $gff_organism->value(); + } warn "Organism $ORGANISM from data\n" unless($seen_organism{$ORGANISM}++); $chado->organism($ORGANISM); $chado->organism_id($ORGANISM) #? dont die if many orgs? auto-add * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <em...@us...> - 2013-03-01 09:03:10
|
Revision: 25284 http://gmod.svn.sourceforge.net/gmod/?rev=25284&view=rev Author: emmert Date: 2013-02-28 19:43:35 +0000 (Thu, 28 Feb 2013) Log Message: ----------- Add tables to organism module: strain_phenotypeprop and strain_relationship_pub Modified Paths: -------------- schema/trunk/chado/modules/organism/organism.sql Modified: schema/trunk/chado/modules/organism/organism.sql =================================================================== --- schema/trunk/chado/modules/organism/organism.sql 2013-02-27 19:43:09 UTC (rev 25283) +++ schema/trunk/chado/modules/organism/organism.sql 2013-02-28 19:43:35 UTC (rev 25284) @@ -149,7 +149,7 @@ the default 0 value should be used'; ---================================================ +-- ================================================ -- TABLE: organism_cvtermprop -- ================================================ @@ -232,7 +232,7 @@ COMMENT ON TABLE strain_cvterm IS 'strain to cvterm associations. Examples: GOid'; ---================================================ +-- ================================================ -- TABLE: strain_cvtermprop -- ================================================ @@ -295,6 +295,26 @@ -- ================================================ +-- TABLE: strain_relationship_pub +-- ================================================ + +drop table strain_relationship_pub cascade; +create table strain_relationship_pub ( + strain_relationship_pub_id serial not null, + primary key (strain_relationship_pub_id), + strain_relationship_id int not null, + foreign key (strain_relationship_id) references strain_relationship (strain_relationship_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + constraint strain_relationship_pub_c1 unique (strain_relationship_id,pub_id) +); +create index strain_relationship_pub_idx1 on strain_relationship_pub (strain_relationship_id); +create index strain_relationship_pub_idx2 on strain_relationship_pub (pub_id); + +COMMENT ON TABLE strain_relationship_pub IS 'Provenance. Attach optional evidence to a strain_relationship in the form of a publication.'; + + +-- ================================================ -- TABLE: strainprop -- ================================================ @@ -358,6 +378,7 @@ -- ================================================ -- TABLE: strain_pub -- ================================================ + drop table strain_pub cascade; create table strain_pub ( strain_pub_id serial not null, @@ -462,3 +483,26 @@ create index strain_phenotype_idx2 ON strain_phenotype (phenotype_id); COMMENT on table strain_phenotype IS 'Links phenotype(s) associated with a given strain. Types may be, eg, "selected" or "unassigned".'; + + +-- ================================================ +-- TABLE: strain_phenotypeprop +-- ================================================ + +drop table strain_phenotypeprop cascade; +create table strain_phenotypeprop ( + strain_phenotypeprop_id serial not null, + primary key (strain_phenotypeprop_id), + strain_phenotype_id int not null, + foreign key (strain_phenotype_id) references strain_phenotype (strain_phenotype_id) on delete cascade INITIALLY DEFERRED, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + constraint strain_phenotypeprop_c1 unique (strain_phenotype_id,type_id,rank) +); +create index strain_phenotypeprop_idx1 on strain_phenotypeprop (strain_phenotype_id); +create index strain_phenotypeprop_idx2 on strain_phenotypeprop (type_id); + +COMMENT ON TABLE strain_phenotypeprop IS 'Attributes of a strain_phenotype relationship. Eg, a comment'; + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <em...@us...> - 2013-02-27 19:52:18
|
Revision: 25283 http://gmod.svn.sourceforge.net/gmod/?rev=25283&view=rev Author: emmert Date: 2013-02-27 19:43:09 +0000 (Wed, 27 Feb 2013) Log Message: ----------- Add strain_pub table to module Modified Paths: -------------- schema/trunk/chado/modules/organism/organism.sql Modified: schema/trunk/chado/modules/organism/organism.sql =================================================================== --- schema/trunk/chado/modules/organism/organism.sql 2013-02-08 21:25:30 UTC (rev 25282) +++ schema/trunk/chado/modules/organism/organism.sql 2013-02-27 19:43:09 UTC (rev 25283) @@ -355,6 +355,23 @@ create index strain_dbxref_idx2 on strain_dbxref (dbxref_id); +-- ================================================ +-- TABLE: strain_pub +-- ================================================ +drop table strain_pub cascade; +create table strain_pub ( + strain_pub_id serial not null, + primary key (strain_pub_id), + strain_id int not null, + foreign key (strain_id) references strain (strain_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + unique(strain_id,pub_id) +); +create index strain_pub_idx1 on strain_pub (strain_id); +create index strain_pub_idx2 on strain_pub (pub_id); + + -- ================================================ -- TABLE: strain_synonym -- ================================================ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sco...@us...> - 2013-02-01 21:04:51
|
Revision: 25281 http://gmod.svn.sourceforge.net/gmod/?rev=25281&view=rev Author: scottcain Date: 2013-02-01 21:04:39 +0000 (Fri, 01 Feb 2013) Log Message: ----------- adding back the check to keep the script from running if the owner specifically requests it not run with userdata NoCallHome:1 Modified Paths: -------------- schema/trunk/chado/bin/GMODCallHome.pl Modified: schema/trunk/chado/bin/GMODCallHome.pl =================================================================== --- schema/trunk/chado/bin/GMODCallHome.pl 2013-02-01 20:07:28 UTC (rev 25280) +++ schema/trunk/chado/bin/GMODCallHome.pl 2013-02-01 21:04:39 UTC (rev 25281) @@ -18,7 +18,7 @@ exit 0 if (-f "$Bin/gitc_lock"); #check if user specifically doesn't want to call home -#exit 0 if ($userdata{'NoCallHome'}); +exit 0 if ($userdata{'NoCallHome'}); my $ipaddress = $instance->publicIpv4; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sco...@us...> - 2013-02-01 20:07:39
|
Revision: 25280 http://gmod.svn.sourceforge.net/gmod/?rev=25280&view=rev Author: scottcain Date: 2013-02-01 20:07:28 +0000 (Fri, 01 Feb 2013) Log Message: ----------- Script to "call home" on a GMOD in the Cloud instance; works on Ubuntu 10.04. It's an open question as to whether it will work on 12.04. Added Paths: ----------- schema/trunk/chado/bin/GMODCallHome.pl Added: schema/trunk/chado/bin/GMODCallHome.pl =================================================================== --- schema/trunk/chado/bin/GMODCallHome.pl (rev 0) +++ schema/trunk/chado/bin/GMODCallHome.pl 2013-02-01 20:07:28 UTC (rev 25280) @@ -0,0 +1,47 @@ +#!/usr/bin/perl +use strict; +use warnings; +use VM::EC2; +use HTTP::Request::Common; +use LWP::UserAgent; +use FindBin '$Bin'; +use constant REGISTRATION_SERVER + => 'http://modencode.oicr.on.ca/cgi-bin/gbrowse_registration'; + + +my $instance = VM::EC2->instance_metadata(); # should be a metadata object + +my $userdata = $instance->userData; +my %userdata = map {split /\s*\:\s*/, $_ } split "\n", $userdata; + +#check to see if this instance all ready called +exit 0 if (-f "$Bin/gitc_lock"); + +#check if user specifically doesn't want to call home +#exit 0 if ($userdata{'NoCallHome'}); + +my $ipaddress = $instance->publicIpv4; + +my @callhome = ( user => "GMOD in the Cloud:".$instance->imageId.'|'.$instance->instanceType, + email => $userdata{email} || '', + org => $userdata{org} || '', + organism => $userdata{organism} || '', + site => $ipaddress + ); + +print @callhome; + +my $ua = LWP::UserAgent->new; +my $response = $ua->request( + POST(REGISTRATION_SERVER, + \@callhome + )); + +#to prevent the same instance from calling home more than once +open (LOCK, ">$Bin/gitc_lock"); +print LOCK "Sending the 'call home' email. If you would like to suppress this in the\nfuture, add 'NoCallHome : 1' to the userdata when launching the instance.\n"; + +close LOCK; + +exit 0; + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <em...@us...> - 2013-01-15 15:11:03
|
Revision: 25279 http://gmod.svn.sourceforge.net/gmod/?rev=25279&view=rev Author: emmert Date: 2013-01-15 15:10:50 +0000 (Tue, 15 Jan 2013) Log Message: ----------- Extensions to interaction, expression, and organism modules; extension to library module to link to these. All changes are back-compatible. Modified Paths: -------------- schema/trunk/chado/modules/expression/expression.sql schema/trunk/chado/modules/interaction/interaction.sql schema/trunk/chado/modules/library/library.sql schema/trunk/chado/modules/organism/organism.sql Modified: schema/trunk/chado/modules/expression/expression.sql =================================================================== --- schema/trunk/chado/modules/expression/expression.sql 2012-12-13 19:59:18 UTC (rev 25278) +++ schema/trunk/chado/modules/expression/expression.sql 2013-01-15 15:10:50 UTC (rev 25279) @@ -21,11 +21,12 @@ uniquename text not null, md5checksum character(32), description text, - constraint expression_c1 unique(uniquename) + constraint expression_c1 unique (uniquename) ); COMMENT ON TABLE expression IS 'The expression table is essentially a bridge table.'; + -- ================================================ -- TABLE: expression_cvterm -- ================================================ @@ -40,12 +41,13 @@ rank int not null default 0, cvterm_type_id int not null, foreign key (cvterm_type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, - constraint expression_cvterm_c1 unique(expression_id,cvterm_id,cvterm_type_id) + constraint expression_cvterm_c1 unique (expression_id,cvterm_id,rank,cvterm_type_id) ); create index expression_cvterm_idx1 on expression_cvterm (expression_id); create index expression_cvterm_idx2 on expression_cvterm (cvterm_id); create index expression_cvterm_idx3 on expression_cvterm (cvterm_type_id); + --================================================ -- TABLE: expression_cvtermprop -- ================================================ @@ -112,7 +114,7 @@ foreign key (expression_id) references expression (expression_id) on delete cascade INITIALLY DEFERRED, pub_id int not null, foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, - constraint expression_pub_c1 unique(expression_id,pub_id) + constraint expression_pub_c1 unique (expression_id,pub_id) ); create index expression_pub_idx1 on expression_pub (expression_id); create index expression_pub_idx2 on expression_pub (pub_id); @@ -131,7 +133,7 @@ foreign key (feature_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED, pub_id int not null, foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, - constraint feature_expression_c1 unique(expression_id,feature_id,pub_id) + constraint feature_expression_c1 unique (expression_id,feature_id,pub_id) ); create index feature_expression_idx1 on feature_expression (expression_id); create index feature_expression_idx2 on feature_expression (feature_id); Modified: schema/trunk/chado/modules/interaction/interaction.sql =================================================================== --- schema/trunk/chado/modules/interaction/interaction.sql 2012-12-13 19:59:18 UTC (rev 25278) +++ schema/trunk/chado/modules/interaction/interaction.sql 2013-01-15 15:10:50 UTC (rev 25279) @@ -24,6 +24,7 @@ -- ================================================ -- TABLE: interaction -- ================================================ + drop table interaction cascade; create table interaction ( interaction_id serial NOT NULL, @@ -34,13 +35,11 @@ on delete cascade INITIALLY DEFERRED, description text, is_obsolete boolean not null default false, - constraint interaction_c1 unique(uniquename,type_id) + constraint interaction_c1 unique (uniquename,type_id) ); create index interaction_idx1 on interaction (uniquename); create index interaction_idx2 on interaction (type_id); -grant all on interaction to public; -grant all on interaction_interaction_id_seq to public; -- ================================================ -- TABLE: interactionprop @@ -61,12 +60,12 @@ create index interactionprop_idx1 on interactionprop (interaction_id); create index interactionprop_idx2 on interactionprop (type_id); -grant all on interactionprop to public; -grant all on interactionprop_interactionprop_id_seq to public; -- ================================================ -- TABLE: interactionprop_pub -- ================================================ + +drop table interactionprop_pub cascade; create table interactionprop_pub ( interactionprop_pub_id serial not null, primary key (interactionprop_pub_id), @@ -80,9 +79,6 @@ create index interactionprop_pub_idx2 on interactionprop_pub (pub_id); -grant all on interactionprop_pub to public; -grant all on interactionprop_pub_interactionprop_pub_id_seq to public; - -- ================================================ -- TABLE: interaction_pub -- ================================================ @@ -100,15 +96,12 @@ create index interaction_pub_idx1 on interaction_pub (interaction_id); create index interaction_pub_idx2 on interaction_pub (pub_id); -grant all on interaction_pub to public; -grant all on interaction_pub_interaction_pub_id_seq to public; -- ================================================ -- TABLE: interaction_expression -- ================================================ drop table interaction_expression cascade; - create table interaction_expression ( interaction_expression_id serial not null, primary key (interaction_expression_id), @@ -118,14 +111,12 @@ foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, pub_id int not null, foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, - unique(expression_id,interaction_id,pub_id) + constraint interaction_expression_c1 unique (expression_id,interaction_id,pub_id) ); create index interaction_expression_idx1 on interaction_expression (expression_id); create index interaction_expression_idx2 on interaction_expression (interaction_id); create index interaction_expression_idx3 on interaction_expression (pub_id); -grant all on interaction_expression to public; -grant all on interaction_expression_interaction_expression_id_seq to public; --================================================ -- TABLE: interaction_expressionprop @@ -141,22 +132,17 @@ foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, value text null, rank int not null default 0, - unique (interaction_expression_id,type_id,rank) + constraint interaction_expressionprop_c1 unique (interaction_expression_id,type_id,rank) ); - - create index interaction_expressionprop_idx1 on interaction_expressionprop (interaction_expression_id); create index interaction_expressionprop_idx2 on interaction_expressionprop (type_id); -grant all on interaction_expressionprop to public; -grant all on interaction_expressionprop_interaction_expressionprop_id_seq to public; -- ================================================ -- TABLE: interaction_cvterm -- ================================================ drop table interaction_cvterm cascade; - create table interaction_cvterm ( interaction_cvterm_id serial not null, primary key (interaction_cvterm_id), @@ -164,20 +150,17 @@ foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, cvterm_id int not null, foreign key (cvterm_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, - unique(interaction_id,cvterm_id) + constraint interaction_cvterm_c1 unique (interaction_id,cvterm_id) ); create index interaction_cvterm_idx1 on interaction_cvterm (interaction_id); create index interaction_cvterm_idx2 on interaction_cvterm (cvterm_id); -create index interaction_cvterm_idx3 on interaction_cvterm (pub_id); -grant all on interaction_cvterm to public; -grant all on interaction_cvterm_interaction_cvterm_id_seq to public; --================================================ -- TABLE: interaction_cvtermprop -- ================================================ -drop table interaction_cvtermprop; +drop table interaction_cvtermprop cascade; create table interaction_cvtermprop ( interaction_cvtermprop_id serial not null, primary key (interaction_cvtermprop_id), @@ -187,42 +170,13 @@ foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, value text null, rank int not null default 0, - unique (interaction_cvterm_id,type_id,rank) + constraint interaction_cvtermprop_c1 unique (interaction_cvterm_id,type_id,rank) ); - - create index interaction_cvtermprop_idx1 on interaction_cvtermprop (interaction_cvterm_id); create index interaction_cvtermprop_idx2 on interaction_cvtermprop (type_id); -grant all on interaction_cvtermprop to public; -grant all on interaction_cvtermprop_interaction_cvtermprop_id_seq to public; - -- ================================================ --- TABLE: library_interaction --- ================================================ - -drop table library_interaction cascade; - -create table library_interaction ( - library_interaction_id serial not null, - primary key (library_interaction_id), - interaction_id int not null, - foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, - library_id int not null, - foreign key (library_id) references library (library_id) on delete cascade INITIALLY DEFERRED, - pub_id int not null, - foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, - unique(interaction_id,library_id,pub_id) -); -create index library_interaction_idx1 on library_interaction (interaction_id); -create index library_interaction_idx2 on library_interaction (library_id); -create index library_interaction_idx3 on library_interaction (pub_id); - -grant all on library_interaction to public; -grant all on library_interaction_library_interaction_id_seq to public; - --- ================================================ -- TABLE: feature_interaction -- ================================================ @@ -237,18 +191,16 @@ role_id int not null, foreign key (role_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, rank int not null default 0, - unique(feature_id,interaction_id, role_id) + constraint feature_interaction_c1 unique (feature_id,interaction_id, role_id) ); create index feature_interaction_idx1 on feature_interaction (feature_id); create index feature_interaction_idx2 on feature_interaction (interaction_id); create index feature_interaction_idx3 on feature_interaction (role_id); -grant all on feature_interaction to public; -grant all on feature_interaction_feature_interaction_id_seq to public; - -- ? do we want to add rank to the unique key ? thinking stochiometry issues -- and might we have one form modified and not another ? may be too much + -- ================================================ -- TABLE: feature_interactionprop -- ================================================ @@ -268,8 +220,6 @@ create index feature_interactionprop_idx1 on feature_interactionprop (feature_interaction_id); create index feature_interactionprop_idx2 on feature_interactionprop (type_id); -grant all on feature_interactionprop to public; -grant all on feature_interactionprop_feature_interactionprop_id_seq to public; -- ================================================ -- TABLE: feature_interaction_pub @@ -288,15 +238,12 @@ create index feature_interaction_pub_idx1 on feature_interaction_pub (feature_interaction_id); create index feature_interaction_pub_idx2 on feature_interaction_pub (pub_id); -grant all on feature_interaction_pub to public; -grant all on feature_interaction_pub_feature_interaction_pub_id_seq to public; -- ================================================ -- TABLE: interaction_cell_line -- ================================================ drop table interaction_cell_line cascade; - create table interaction_cell_line ( interaction_cell_line_id serial not null, primary key (interaction_cell_line_id), @@ -306,11 +253,43 @@ foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, pub_id int not null, foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, - unique(cell_line_id,interaction_id,pub_id) + constraint interaction_cell_line_c1 unique (cell_line_id,interaction_id,pub_id) ); create index interaction_cell_line_idx1 on interaction_cell_line (cell_line_id); create index interaction_cell_line_idx2 on interaction_cell_line (interaction_id); create index interaction_cell_line_idx3 on interaction_cell_line (pub_id); -grant all on interaction_cell_line to public; -grant all on interaction_cell_line_interaction_cell_line_id_seq to public; + +-- ================================================ +-- TABLE: interaction_group +-- ================================================ + +drop table interaction_group cascade; +create table interaction_group ( + interaction_group_id serial not null, + primary key (interaction_group_id), + uniquename text NOT NULL, + is_obsolete boolean not null default false, + description text, + constraint interaction_group_c1 unique (uniquename) +); +create index interaction_group_idx1 on interaction_group (uniquename); + + +-- ================================================ +-- TABLE: interaction_group_feature_interaction +-- ================================================ + +drop table interaction_group_feature_interaction cascade; +create table interaction_group_feature_interaction ( + interaction_group_feature_interaction_id serial not null, + primary key (interaction_group_feature_interaction_id), + interaction_group_id int not null, + foreign key (interaction_group_id) references interaction_group (interaction_group_id) on delete cascade INITIALLY DEFERRED, + feature_interaction_id int not null, + foreign key (feature_interaction_id) references feature_interaction (feature_interaction_id) on delete cascade INITIALLY DEFERRED, + rank int not null default 0, + constraint interaction_group_feature_interaction_c1 unique (interaction_group_id,feature_interaction_id,rank) +); +create index interaction_group_feature_interaction_idx1 on interaction_group_feature_interaction (interaction_group_id); +create index interaction_group_feature_interaction_idx2 on interaction_group_feature_interaction (feature_interaction_id); Modified: schema/trunk/chado/modules/library/library.sql =================================================================== --- schema/trunk/chado/modules/library/library.sql 2012-12-13 19:59:18 UTC (rev 25278) +++ schema/trunk/chado/modules/library/library.sql 2013-01-15 15:10:50 UTC (rev 25279) @@ -7,6 +7,9 @@ -- :import cvterm from cv -- :import pub from pub -- :import organism from organism +-- :import expression from expression +-- :import interaction from interaction +-- :import strain from strain -- ================================================================= -- ================================================ @@ -178,6 +181,133 @@ create index library_dbxref_idx2 on library_dbxref (dbxref_id); +-- ================================================ +-- TABLE: library_expression +-- ================================================ +create table library_expression ( + library_expression_id serial not null, + primary key (library_expression_id), + library_id int not null, + foreign key (library_id) references library (library_id) on delete cascade INITIALLY DEFERRED, + expression_id int not null, + foreign key (expression_id) references expression (expression_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id), + constraint library_expression_c1 unique (library_id,expression_id) +); +create index library_expression_idx1 on library_expression (library_id); +create index library_expression_idx2 on library_expression (expression_id); +create index library_expression_idx3 on library_expression (pub_id); +-- ================================================ +-- TABLE: library_expressionprop +-- ================================================ + +create table library_expressionprop ( + library_expressionprop_id serial not null, + primary key (library_expressionprop_id), + library_expression_id int not null, + foreign key (library_expression_id) references library_expression (library_expression_id) on delete cascade INITIALLY DEFERRED, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id), + value text null, + rank int not null default 0, + constraint library_expressionprop_c1 unique (library_expression_id,type_id,rank) +); +create index library_expressionprop_idx1 on library_expressionprop (library_expression_id); +create index library_expressionprop_idx2 on library_expressionprop (type_id); + + +-- ================================================ +-- TABLE: library_featureprop +-- ================================================ + +create table library_featureprop ( + library_featureprop_id serial not null, + primary key (library_featureprop_id), + library_feature_id int not null, + foreign key (library_feature_id) references library_feature (library_feature_id) on delete cascade INITIALLY DEFERRED, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id), + value text null, + rank int not null default 0, + constraint library_featureprop_c1 unique (library_feature_id,type_id,rank) +); +create index library_featureprop_idx1 on library_featureprop (library_feature_id); +create index library_featureprop_idx2 on library_featureprop (type_id); + + +-- ================================================ +-- TABLE: library_interaction +-- ================================================ + +create table library_interaction ( + library_interaction_id serial not null, + primary key (library_interaction_id), + library_id int not null, + foreign key (library_id) references library (library_id) on delete cascade INITIALLY DEFERRED, + interaction_id int not null, + foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id), + constraint library_interaction_c1 unique (interaction_id,library_id,pub_id) +); +create index library_interaction_idx1 on library_interaction (interaction_id); +create index library_interaction_idx2 on library_interaction (library_id); +create index library_interaction_idx3 on library_interaction (pub_id); + + +-- ================================================ +-- TABLE: library_relationship +-- ================================================ + +create table library_relationship ( + library_relationship_id serial not null, + primary key (library_relationship_id), + subject_id int not null, + foreign key (subject_id) references library (library_id) on delete cascade INITIALLY DEFERRED, + object_id int not null, + foreign key (object_id) references library (library_id) on delete cascade INITIALLY DEFERRED, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id), + constraint library_relationship_c1 unique (subject_id,object_id,type_id) +); +create index library_relationship_idx1 on library_relationship (subject_id); +create index library_relationship_idx2 on library_relationship (object_id); +create index library_relationship_idx3 on library_relationship (type_id); + + +-- ================================================ +-- TABLE: library_relationship_pub +-- ================================================ + +create table library_relationship_pub ( + library_relationship_pub_id serial not null, + primary key (library_relationship_pub_id), + library_relationship_id int not null, + foreign key (library_relationship_id) references library_relationship (library_relationship_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id), + constraint library_relationship_pub_c1 unique (library_relationship_id,pub_id) +); +create index library_relationship_pub_idx1 on library_relationship_pub (library_relationship_id); +create index library_relationship_pub_idx2 on library_relationship_pub (pub_id); + + +-- ================================================ +-- TABLE: library_strain +-- ================================================ + +create table library_strain ( + library_strain_id serial not null, + primary key (library_strain_id), + library_id int not null, + foreign key (library_id) references library (library_id) on delete cascade INITIALLY DEFERRED, + strain_id int not null, + foreign key (strain_id) references strain (strain_id) on delete cascade INITIALLY DEFERRED, + constraint library_strain_c1 unique (library_id,strain_id) +); +create index library_strain_idx1 on library_strain (library_id); +create index library_strain_idx2 on library_strain (strain_id); Modified: schema/trunk/chado/modules/organism/organism.sql =================================================================== --- schema/trunk/chado/modules/organism/organism.sql 2012-12-13 19:59:18 UTC (rev 25278) +++ schema/trunk/chado/modules/organism/organism.sql 2013-01-15 15:10:50 UTC (rev 25279) @@ -1,4 +1,4 @@ --- $Id: organism.sql,v 1.19 2007-04-01 18:45:41 briano Exp $ +-- $Id: organism.sql,v 1.19 2007/04/01 18:45:41 briano Exp $ -- ========================================== -- Chado organism module -- @@ -13,6 +13,7 @@ -- TABLE: organism -- ================================================ +drop table organism cascade; create table organism ( organism_id serial not null, primary key (organism_id), @@ -37,10 +38,12 @@ this is appended onto the species name. Follows standard NCBI taxonomy pattern.'; + -- ================================================ -- TABLE: organism_dbxref -- ================================================ +drop table organism_dbxref cascade; create table organism_dbxref ( organism_dbxref_id serial not null, primary key (organism_dbxref_id), @@ -53,10 +56,12 @@ create index organism_dbxref_idx1 on organism_dbxref (organism_id); create index organism_dbxref_idx2 on organism_dbxref (dbxref_id); + -- ================================================ -- TABLE: organismprop -- ================================================ +drop table organismprop cascade; create table organismprop ( organismprop_id serial not null, primary key (organismprop_id), @@ -73,3 +78,370 @@ COMMENT ON TABLE organismprop IS 'Tag-value properties - follows standard chado model.'; + +-- ================================================ +-- TABLE: organismprop_pub +-- ================================================ + +drop table organismprop_pub cascade; +create table organismprop_pub ( + organismprop_pub_id serial not null, + primary key (organismprop_pub_id), + organismprop_id int not null, + foreign key (organismprop_id) references organismprop (organismprop_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + constraint organismprop_pub_c1 unique (organismprop_id,pub_id) +); +create index organismprop_pub_idx1 on organismprop_pub (organismprop_id); +create index organismprop_pub_idx2 on organismprop_pub (pub_id); + +COMMENT ON TABLE organismprop_pub IS 'Attribution for organismprop.'; + + +-- ================================================ +-- TABLE: organism_pub +-- ================================================ + +drop table organism_pub cascade; +create table organism_pub ( + organism_pub_id serial not null, + primary key (organism_pub_id), + organism_id int not null, + foreign key (organism_id) references organism (organism_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + constraint organism_pub_c1 unique (organism_id,pub_id) +); +create index organism_pub_idx1 on organism_pub (organism_id); +create index organism_pub_idx2 on organism_pub (pub_id); + + +-- ================================================ +-- TABLE: organism_cvterm +-- ================================================ + +drop table organism_cvterm cascade; +create table organism_cvterm ( + organism_cvterm_id serial not null, + primary key (organism_cvterm_id), + organism_id int not null, + foreign key (organism_id) references organism (organism_id) on delete cascade INITIALLY +DEFERRED, + cvterm_id int not null, + foreign key (cvterm_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + rank int not null default 0, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + constraint organism_cvterm_c1 unique(organism_id,cvterm_id,pub_id) +); +create index organism_cvterm_idx1 on organism_cvterm (organism_id); +create index organism_cvterm_idx2 on organism_cvterm (cvterm_id); + +COMMENT ON TABLE organism_cvterm IS 'organism to cvterm associations. Examples: taxonomic name'; + +COMMENT ON COLUMN organism_cvterm.rank IS 'Property-Value +ordering. Any organism_cvterm can have multiple values for any particular +property type - these are ordered in a list using rank, counting from +zero. For properties that are single-valued rather than multi-valued, +the default 0 value should be used'; + + +--================================================ +-- TABLE: organism_cvtermprop +-- ================================================ + +drop table organism_cvtermprop cascade; +create table organism_cvtermprop ( + organism_cvtermprop_id serial not null, + primary key (organism_cvtermprop_id), + organism_cvterm_id int not null, + foreign key (organism_cvterm_id) references organism_cvterm (organism_cvterm_id) on delete cascade, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + constraint organism_cvtermprop_c1 unique (organism_cvterm_id,type_id,rank) +); +create index organism_cvtermprop_idx1 on organism_cvtermprop (organism_cvterm_id); +create index organism_cvtermprop_idx2 on organism_cvtermprop (type_id); + +COMMENT ON TABLE organism_cvtermprop IS 'Extensible properties for +organism to cvterm associations. Examples: qualifiers'; + +COMMENT ON COLUMN organism_cvtermprop.type_id IS 'The name of the +property/slot is a cvterm. The meaning of the property is defined in +that cvterm. '; + +COMMENT ON COLUMN organism_cvtermprop.value IS 'The value of the +property, represented as text. Numeric values are converted to their +text representation. This is less efficient than using native database +types, but is easier to query.'; + +COMMENT ON COLUMN organism_cvtermprop.rank IS 'Property-Value +ordering. Any organism_cvterm can have multiple values for any particular +property type - these are ordered in a list using rank, counting from +zero. For properties that are single-valued rather than multi-valued, +the default 0 value should be used'; + + +-- ================================================ +-- TABLE: strain +-- ================================================ + +drop table strain cascade; +create table strain ( + strain_id serial not null, + primary key (strain_id), + name varchar(255) null, + uniquename text not null, + organism_id int not null, + foreign key (organism_id) references organism (organism_id) on delete cascade INITIALLY DEFERRED, + dbxref_id int null, + foreign key (dbxref_id) references dbxref (dbxref_id) on delete cascade INITIALLY DEFERRED, + is_obsolete boolean not null default 'false', + constraint strain_c1 unique (organism_id, uniquename) +); + +create index strain_idx1 on strain (uniquename); +create index strain_idx2 on strain (name); + +COMMENT ON TABLE strain IS 'A characterized strain of a given organism.'; + + +-- ================================================ +-- TABLE: strain_cvterm +-- ================================================ + +drop table strain_cvterm cascade; +create table strain_cvterm ( + strain_cvterm_id serial not null, + primary key (strain_cvterm_id), + strain_id int not null, + foreign key (strain_id) references strain (strain_id) on delete cascade INITIALLY DEFERRED, + cvterm_id int not null, + foreign key (cvterm_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + constraint strain_cvterm_c1 unique(strain_id,cvterm_id,pub_id) +); +create index strain_cvterm_idx1 on strain_cvterm (strain_id); +create index strain_cvterm_idx2 on strain_cvterm (cvterm_id); + +COMMENT ON TABLE strain_cvterm IS 'strain to cvterm associations. Examples: GOid'; + +--================================================ +-- TABLE: strain_cvtermprop +-- ================================================ + +drop table strain_cvtermprop cascade; +create table strain_cvtermprop ( + strain_cvtermprop_id serial not null, + primary key (strain_cvtermprop_id), + strain_cvterm_id int not null, + foreign key (strain_cvterm_id) references strain_cvterm (strain_cvterm_id) on delete cascade, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + constraint strain_cvtermprop_c1 unique (strain_cvterm_id,type_id,rank) +); +create index strain_cvtermprop_idx1 on strain_cvtermprop (strain_cvterm_id); +create index strain_cvtermprop_idx2 on strain_cvtermprop (type_id); + +COMMENT ON TABLE strain_cvtermprop IS 'Extensible properties for +strain to cvterm associations. Examples: qualifiers'; + +COMMENT ON COLUMN strain_cvtermprop.type_id IS 'The name of the +property/slot is a cvterm. The meaning of the property is defined in +that cvterm. '; + +COMMENT ON COLUMN strain_cvtermprop.value IS 'The value of the +property, represented as text. Numeric values are converted to their +text representation. This is less efficient than using native database +types, but is easier to query.'; + +COMMENT ON COLUMN strain_cvtermprop.rank IS 'Property-Value +ordering. Any strain_cvterm can have multiple values for any particular +property type - these are ordered in a list using rank, counting from +zero. For properties that are single-valued rather than multi-valued, +the default 0 value should be used'; + + +-- ================================================ +-- TABLE: strain_relationship +-- ================================================ + +drop table strain_relationship cascade; +create table strain_relationship ( + strain_relationship_id serial not null, + primary key (strain_relationship_id), + subject_id int not null, + foreign key (subject_id) references strain (strain_id) on delete cascade INITIALLY DEFERRED, + object_id int not null, + foreign key (object_id) references strain (strain_id) on delete cascade INITIALLY DEFERRED, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + constraint strain_relationship_c1 unique (subject_id, object_id, type_id, rank) +); +create index strain_relationship_idx1 on strain_relationship (subject_id); +create index strain_relationship_idx2 on strain_relationship (object_id); + +COMMENT ON TABLE strain_relationship IS 'Relationships between strains, eg, progenitor.'; + + +-- ================================================ +-- TABLE: strainprop +-- ================================================ + +drop table strainprop cascade; +create table strainprop ( + strainprop_id serial not null, + primary key (strainprop_id), + strain_id int not null, + foreign key (strain_id) references strain (strain_id) on delete cascade INITIALLY DEFERRED, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + constraint strainprop_c1 unique (strain_id, type_id, rank) +); +create index strainprop_idx1 on strainprop (strain_id); +create index strainprop_idx2 on strainprop (type_id); + +COMMENT ON TABLE strainprop IS 'Attributes of a given strain'; + + +-- ================================================ +-- TABLE: strainprop_pub +-- ================================================ + +drop table strainprop_pub cascade; +create table strainprop_pub ( + strainprop_pub_id serial not null, + primary key (strainprop_pub_id), + strainprop_id int not null, + foreign key (strainprop_id) references strainprop (strainprop_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + constraint strainprop_pub_c1 unique (strainprop_id,pub_id) +); +create index strainprop_pub_idx1 on strainprop_pub (strainprop_id); +create index strainprop_pub_idx2 on strainprop_pub (pub_id); + +COMMENT ON TABLE strainprop_pub IS 'Provenance. Any strainprop assignment can optionally be supported by a publication.'; + + +-- ================================================ +-- TABLE: strain_dbxref +-- ================================================ + +drop table strain_dbxref cascade; +create table strain_dbxref ( + strain_dbxref_id serial not null, + primary key (strain_dbxref_id), + strain_id int not null, + foreign key (strain_id) references strain (strain_id) on delete cascade INITIALLY DEFERRED, + dbxref_id int not null, + foreign key (dbxref_id) references dbxref (dbxref_id) on delete cascade INITIALLY DEFERRED, + is_current boolean not null default 'true', + constraint strain_dbxref_c1 unique (strain_id,dbxref_id) +); +create index strain_dbxref_idx1 on strain_dbxref (strain_id); +create index strain_dbxref_idx2 on strain_dbxref (dbxref_id); + + +-- ================================================ +-- TABLE: strain_synonym +-- ================================================ + +drop table strain_synonym cascade; +create table strain_synonym ( + strain_synonym_id serial not null, + primary key (strain_synonym_id), + strain_id int not null, + foreign key (strain_id) references strain (strain_id) on delete cascade INITIALLY DEFERRED, + synonym_id int not null, + foreign key (synonym_id) references synonym (synonym_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + is_current boolean not null default 'false', + is_internal boolean not null default 'false', + constraint strain_synonym_c1 unique (synonym_id,strain_id,pub_id) +); +create index strain_synonym_idx1 on strain_synonym (synonym_id); +create index strain_synonym_idx2 on strain_synonym (strain_id); +create index strain_synonym_idx3 on strain_synonym (pub_id); + +COMMENT ON TABLE strain_synonym IS 'Linking table between strain and synonym.'; + + +-- ================================================ +-- TABLE: strain_feature +-- ================================================ + +drop table strain_feature cascade; +create table strain_feature ( + strain_feature_id serial not null, + primary key (strain_feature_id), + strain_id int not null, + foreign key (strain_id) references strain (strain_id) on delete cascade INITIALLY DEFERRED, + feature_id int not null, + foreign key (feature_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + constraint strain_feature_c1 unique (strain_id,feature_id,pub_id) +); +create index strain_feature_idx1 on strain_feature (strain_id); +create index strain_feature_idx2 on strain_feature (feature_id); + +COMMENT ON TABLE strain_feature IS 'strain_feature links a strain to features associated with the strain. Type may +be, eg, "homozygous" or "heterozygous".'; + + +-- ================================================ +-- TABLE: strain_featureprop +-- ================================================ + +drop table strain_featureprop cascade; +create table strain_featureprop ( + strain_featureprop_id serial not null, + primary key (strain_featureprop_id), + strain_feature_id int not null, + foreign key (strain_feature_id) references strain_feature (strain_feature_id) on delete cascade INITIALLY DEFERRED, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + constraint strain_featureprop_c1 unique (strain_feature_id,type_id,rank) +); +create index strain_featureprop_idx1 on strain_featureprop (strain_feature_id); +create index strain_featureprop_idx2 on strain_featureprop (type_id); + +COMMENT ON TABLE strain_featureprop IS 'Attributes of a strain_feature relationship. Eg, a comment'; + + +-- ================================================ +-- TABLE: strain_phenotype +-- ================================================ + +drop table strain_phenotype cascade; +create table strain_phenotype ( + strain_phenotype_id SERIAL NOT NULL, + primary key (strain_phenotype_id), + strain_id INT NOT NULL, + foreign key (strain_id) references strain (strain_id) on delete cascade, + phenotype_id INT NOT NULL, + foreign key (phenotype_id) references phenotype (phenotype_id) on delete cascade, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + constraint strain_phenotype_c1 unique (strain_id,phenotype_id,pub_id) +); +create index strain_phenotype_idx1 ON strain_phenotype (strain_id); +create index strain_phenotype_idx2 ON strain_phenotype (phenotype_id); + +COMMENT on table strain_phenotype IS 'Links phenotype(s) associated with a given strain. Types may be, eg, "selected" or "unassigned".'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sco...@us...> - 2012-12-13 19:59:26
|
Revision: 25278 http://gmod.svn.sourceforge.net/gmod/?rev=25278&view=rev Author: scottcain Date: 2012-12-13 19:59:18 +0000 (Thu, 13 Dec 2012) Log Message: ----------- chado release 1.23 Added Paths: ----------- schema/tags/chado-1.23/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sco...@us...> - 2012-12-11 17:25:49
|
Revision: 25277 http://gmod.svn.sourceforge.net/gmod/?rev=25277&view=rev Author: scottcain Date: 2012-12-11 17:25:38 +0000 (Tue, 11 Dec 2012) Log Message: ----------- Modified Makefile.PL so that if using PREFIX it won't stomp on the GMOD_ROOT envirnment variable (that is, everything goes in PREFIX, except what goes in GMOD_ROOT). Modified Paths: -------------- schema/trunk/chado/Changes schema/trunk/chado/Makefile.PL Modified: schema/trunk/chado/Changes =================================================================== --- schema/trunk/chado/Changes 2012-11-08 09:48:15 UTC (rev 25276) +++ schema/trunk/chado/Changes 2012-12-11 17:25:38 UTC (rev 25277) @@ -5,6 +5,9 @@ mishmash that was being used in various scripts. * Fixed the GFF3 preprocessor so that if an insert into the sorting table fails, the script will die to avoid losing GFF lines in the resulting file. +* Modified Makefile.PL so that if using PREFIX it won't stomp on the +GMOD_ROOT envirnment variable (that is, everything goes in PREFIX, except what +goes in GMOD_ROOT). Version 1.22 Thu Nov 17 12:48:10 EST 2011 * Created a script to automatically create the schemas dirs for a release and Modified: schema/trunk/chado/Makefile.PL =================================================================== --- schema/trunk/chado/Makefile.PL 2012-11-08 09:48:15 UTC (rev 25276) +++ schema/trunk/chado/Makefile.PL 2012-12-11 17:25:38 UTC (rev 25277) @@ -206,7 +206,7 @@ @ARGV = (); push @ARGV, "PREFIX=$opts{PREFIX}" if $opts{PREFIX}; push @ARGV, "INSTALL_BASE=$opts{INSTALL_BASE}" if $opts{INSTALL_BASE}; -$O{'GMOD_ROOT'} = $opts{PREFIX} if $opts{PREFIX}; +$O{'GMOD_ROOT'} = $opts{PREFIX} if ($opts{PREFIX} and !$ENV{GMOD_ROOT}); push @ARGV, "INSTALLSITEMAN1DIR=$opts{INSTALLSITEMAN1DIR}" if $opts{INSTALLSITEMAN1DIR}; push @ARGV, "INSTALLSITEMAN3DIR=$opts{INSTALLSITEMAN3DIR}" if $opts{INSTALLSITEMAN3DIR}; push @ARGV, "LIB=$opts{LIB}" if $opts{LIB}; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rb...@us...> - 2012-08-01 14:11:59
|
Revision: 25268 http://gmod.svn.sourceforge.net/gmod/?rev=25268&view=rev Author: rbuels Date: 2012-08-01 14:11:46 +0000 (Wed, 01 Aug 2012) Log Message: ----------- correct spelling error Modified Paths: -------------- schema/trunk/chado/chado-module-metadata.xml Modified: schema/trunk/chado/chado-module-metadata.xml =================================================================== --- schema/trunk/chado/chado-module-metadata.xml 2012-07-24 19:07:50 UTC (rev 25267) +++ schema/trunk/chado/chado-module-metadata.xml 2012-08-01 14:11:46 UTC (rev 25268) @@ -556,8 +556,8 @@ <status code='beta'> </status> <description> - A collection of bridge codes that have multiple dependancies - so they don't happily go where is most obvious + A collection of bridge codes that have multiple dependencies + so they don't happily go where is most obvious. </description> <component id='gff-bridge' type='bridge'> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nm...@us...> - 2012-07-24 19:15:02
|
Revision: 25267 http://gmod.svn.sourceforge.net/gmod/?rev=25267&view=rev Author: nm249 Date: 2012-07-24 19:07:50 +0000 (Tue, 24 Jul 2012) Log Message: ----------- messed up secondary dbxrefs are causing loading failure Modified Paths: -------------- schema/trunk/chado/bin/gmod_load_cvterms.pl Modified: schema/trunk/chado/bin/gmod_load_cvterms.pl =================================================================== --- schema/trunk/chado/bin/gmod_load_cvterms.pl 2012-06-12 11:36:58 UTC (rev 25266) +++ schema/trunk/chado/bin/gmod_load_cvterms.pl 2012-07-24 19:07:50 UTC (rev 25267) @@ -572,6 +572,7 @@ $new_term->add_secondary_dbxref($i); } foreach my $r ($novel_terms{$k}->get_dbxrefs() ) { #store definition's dbxrefs in cvterm_dbxref + if (!$r->database || !$r->primary_id) { next; } # skip def. dbxrefs without both db_name and accession my $def_dbxref= $r->database() . ':' . $r->primary_id(); message("adding definition dbxref $def_dbxref to cvterm_dbxref\n"); $new_term->add_secondary_dbxref($def_dbxref, 1); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rb...@us...> - 2012-04-06 18:05:31
|
Revision: 25264 http://gmod.svn.sourceforge.net/gmod/?rev=25264&view=rev Author: rbuels Date: 2012-04-06 18:05:19 +0000 (Fri, 06 Apr 2012) Log Message: ----------- added doc header to project module Modified Paths: -------------- schema/trunk/chado/modules/project/project.sql Modified: schema/trunk/chado/modules/project/project.sql =================================================================== --- schema/trunk/chado/modules/project/project.sql 2012-04-06 18:03:43 UTC (rev 25263) +++ schema/trunk/chado/modules/project/project.sql 2012-04-06 18:05:19 UTC (rev 25264) @@ -1,3 +1,8 @@ +-- ========================================== +-- Chado project module. Used primarily by other Chado modules to +-- group experiments, stocks, and so forth that are associated with +-- eachother administratively or organizationally. +-- -- ================================================================= -- Dependencies: -- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rb...@us...> - 2012-04-06 18:03:56
|
Revision: 25263 http://gmod.svn.sourceforge.net/gmod/?rev=25263&view=rev Author: rbuels Date: 2012-04-06 18:03:43 +0000 (Fri, 06 Apr 2012) Log Message: ----------- add more comments in the property module Modified Paths: -------------- schema/trunk/chado/modules/project/project.sql Modified: schema/trunk/chado/modules/project/project.sql =================================================================== --- schema/trunk/chado/modules/project/project.sql 2012-03-29 16:23:06 UTC (rev 25262) +++ schema/trunk/chado/modules/project/project.sql 2012-04-06 18:03:43 UTC (rev 25263) @@ -12,14 +12,17 @@ -- ================================================ create table project ( - project_id serial not null, + project_id serial not null, primary key (project_id), name varchar(255) not null, description varchar(255) not null, constraint project_c1 unique (name) ); -COMMENT ON TABLE project IS NULL; +COMMENT ON TABLE project IS +'A project is some kind of planned endeavor. Used primarily by other +Chado modules to group experiments, stocks, and so forth that are +associated with eachother administratively or organizationally.'; -- ================================================ -- TABLE: projectprop @@ -36,6 +39,8 @@ rank integer not null default 0, CONSTRAINT projectprop_c1 UNIQUE (project_id, type_id, rank) ); +COMMENT ON TABLE project IS +'Standard Chado flexible property table for projects.'; -- ================================================ -- TABLE: project_relationship @@ -52,10 +57,14 @@ FOREIGN KEY (type_id) REFERENCES cvterm (cvterm_id) ON DELETE RESTRICT, CONSTRAINT project_relationship_c1 UNIQUE (subject_project_id, object_project_id, type_id) ); -COMMENT ON TABLE project_relationship IS 'A project can be composed of several smaller scale projects'; -COMMENT ON COLUMN project_relationship.type_id IS 'The type of relationship being stated, such as "is part of".'; +COMMENT ON TABLE project_relationship IS +'Linking table for relating projects to each other. For example, a +given project could be composed of several smaller subprojects'; +COMMENT ON COLUMN project_relationship.type_id IS +'The cvterm type of the relationship being stated, such as "part of".'; + create table project_pub ( project_pub_id serial not null, primary key (project_pub_id), @@ -68,7 +77,7 @@ create index project_pub_idx1 on project_pub (project_id); create index project_pub_idx2 on project_pub (pub_id); -COMMENT ON TABLE project_pub IS 'Linking project(s) to publication(s)'; +COMMENT ON TABLE project_pub IS 'Linking table for associating projects and publications.'; create table project_contact ( @@ -83,4 +92,4 @@ create index project_contact_idx1 on project_contact (project_id); create index project_contact_idx2 on project_contact (contact_id); -COMMENT ON TABLE project_contact IS 'Linking project(s) to contact(s)'; +COMMENT ON TABLE project_contact IS 'Linking table for associating projects and contacts.'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sco...@us...> - 2012-03-29 16:23:25
|
Revision: 25262 http://gmod.svn.sourceforge.net/gmod/?rev=25262&view=rev Author: scottcain Date: 2012-03-29 16:23:06 +0000 (Thu, 29 Mar 2012) Log Message: ----------- commiting Dave's/FlyBase's interaction module Added Paths: ----------- schema/trunk/chado/modules/interaction/ schema/trunk/chado/modules/interaction/interaction.sql Added: schema/trunk/chado/modules/interaction/interaction.sql =================================================================== --- schema/trunk/chado/modules/interaction/interaction.sql (rev 0) +++ schema/trunk/chado/modules/interaction/interaction.sql 2012-03-29 16:23:06 UTC (rev 25262) @@ -0,0 +1,316 @@ + + +-- ========================================== +-- Chado interaction module +-- +-- ========================================== +-- NOTES: +-- +-- Designed to represent various types of interactions +-- initially to be deployed for physical interactions (protein-protein) +-- between n number of chado features +-- +-- prop and pub tables follow usual chado conventions +-- +-- table:interaction serves as a coalescing table for all aspects of the interaction +-- a uniquename and link to a cvterm for the type of interaction are stored here +-- +-- table:feature_interaction links features to the interaction +-- a cvterm_id for the role that the feature is playing in the interaction +-- must be specified (eg. prey, bait, evidence_for) +-- rank may be used to order interacting features in an interaction +-- + +-- ================================================ +-- TABLE: interaction +-- ================================================ +drop table interaction cascade; +create table interaction ( + interaction_id serial NOT NULL, + primary key (interaction_id), + uniquename text NOT NULL, + type_id int NOT NULL, + foreign key (type_id) references cvterm (cvterm_id) + on delete cascade INITIALLY DEFERRED, + description text, + is_obsolete boolean not null default false, + constraint interaction_c1 unique(uniquename,type_id) +); +create index interaction_idx1 on interaction (uniquename); +create index interaction_idx2 on interaction (type_id); + +grant all on interaction to public; +grant all on interaction_interaction_id_seq to public; + +-- ================================================ +-- TABLE: interactionprop +-- ================================================ + +drop table interactionprop cascade; +create table interactionprop ( + interactionprop_id serial not null, + primary key (interactionprop_id), + interaction_id int not null, + foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + constraint interactionprop_c1 unique (interaction_id,type_id,rank) +); +create index interactionprop_idx1 on interactionprop (interaction_id); +create index interactionprop_idx2 on interactionprop (type_id); + +grant all on interactionprop to public; +grant all on interactionprop_interactionprop_id_seq to public; + +-- ================================================ +-- TABLE: interactionprop_pub +-- ================================================ +create table interactionprop_pub ( + interactionprop_pub_id serial not null, + primary key (interactionprop_pub_id), + interactionprop_id int not null, + foreign key (interactionprop_id) references interactionprop (interactionprop_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + constraint interactionprop_pub_c1 unique (interactionprop_id,pub_id) +); +create index interactionprop_pub_idx1 on interactionprop_pub (interactionprop_id); +create index interactionprop_pub_idx2 on interactionprop_pub (pub_id); + + +grant all on interactionprop_pub to public; +grant all on interactionprop_pub_interactionprop_pub_id_seq to public; + +-- ================================================ +-- TABLE: interaction_pub +-- ================================================ + +drop table interaction_pub cascade; +create table interaction_pub ( + interaction_pub_id serial not null, + primary key (interaction_pub_id), + interaction_id int not null, + foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + constraint interaction_pub_c1 unique(interaction_id,pub_id) +); +create index interaction_pub_idx1 on interaction_pub (interaction_id); +create index interaction_pub_idx2 on interaction_pub (pub_id); + +grant all on interaction_pub to public; +grant all on interaction_pub_interaction_pub_id_seq to public; + +-- ================================================ +-- TABLE: interaction_expression +-- ================================================ + +drop table interaction_expression cascade; + +create table interaction_expression ( + interaction_expression_id serial not null, + primary key (interaction_expression_id), + expression_id int not null, + foreign key (expression_id) references expression (expression_id) on delete cascade INITIALLY DEFERRED, + interaction_id int not null, + foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + unique(expression_id,interaction_id,pub_id) +); +create index interaction_expression_idx1 on interaction_expression (expression_id); +create index interaction_expression_idx2 on interaction_expression (interaction_id); +create index interaction_expression_idx3 on interaction_expression (pub_id); + +grant all on interaction_expression to public; +grant all on interaction_expression_interaction_expression_id_seq to public; + +--================================================ +-- TABLE: interaction_expressionprop +-- ================================================ + +drop table interaction_expressionprop; +create table interaction_expressionprop ( + interaction_expressionprop_id serial not null, + primary key (interaction_expressionprop_id), + interaction_expression_id int not null, + foreign key (interaction_expression_id) references interaction_expression (interaction_expression_id) on delete cascade, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + unique (interaction_expression_id,type_id,rank) +); + + +create index interaction_expressionprop_idx1 on interaction_expressionprop (interaction_expression_id); +create index interaction_expressionprop_idx2 on interaction_expressionprop (type_id); + +grant all on interaction_expressionprop to public; +grant all on interaction_expressionprop_interaction_expressionprop_id_seq to public; + +-- ================================================ +-- TABLE: interaction_cvterm +-- ================================================ + +drop table interaction_cvterm cascade; + +create table interaction_cvterm ( + interaction_cvterm_id serial not null, + primary key (interaction_cvterm_id), + interaction_id int not null, + foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, + cvterm_id int not null, + foreign key (cvterm_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + unique(interaction_id,cvterm_id) +); +create index interaction_cvterm_idx1 on interaction_cvterm (interaction_id); +create index interaction_cvterm_idx2 on interaction_cvterm (cvterm_id); +create index interaction_cvterm_idx3 on interaction_cvterm (pub_id); + +grant all on interaction_cvterm to public; +grant all on interaction_cvterm_interaction_cvterm_id_seq to public; + +--================================================ +-- TABLE: interaction_cvtermprop +-- ================================================ + +drop table interaction_cvtermprop; +create table interaction_cvtermprop ( + interaction_cvtermprop_id serial not null, + primary key (interaction_cvtermprop_id), + interaction_cvterm_id int not null, + foreign key (interaction_cvterm_id) references interaction_cvterm (interaction_cvterm_id) on delete cascade, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + unique (interaction_cvterm_id,type_id,rank) +); + + +create index interaction_cvtermprop_idx1 on interaction_cvtermprop (interaction_cvterm_id); +create index interaction_cvtermprop_idx2 on interaction_cvtermprop (type_id); + +grant all on interaction_cvtermprop to public; +grant all on interaction_cvtermprop_interaction_cvtermprop_id_seq to public; + + +-- ================================================ +-- TABLE: library_interaction +-- ================================================ + +drop table library_interaction cascade; + +create table library_interaction ( + library_interaction_id serial not null, + primary key (library_interaction_id), + interaction_id int not null, + foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, + library_id int not null, + foreign key (library_id) references library (library_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + unique(interaction_id,library_id,pub_id) +); +create index library_interaction_idx1 on library_interaction (interaction_id); +create index library_interaction_idx2 on library_interaction (library_id); +create index library_interaction_idx3 on library_interaction (pub_id); + +grant all on library_interaction to public; +grant all on library_interaction_library_interaction_id_seq to public; + +-- ================================================ +-- TABLE: feature_interaction +-- ================================================ + +drop table feature_interaction cascade; +create table feature_interaction ( + feature_interaction_id serial not null, + primary key (feature_interaction_id), + feature_id int not null, + foreign key (feature_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED, + interaction_id int not null, + foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, + role_id int not null, + foreign key (role_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + rank int not null default 0, + unique(feature_id,interaction_id, role_id) +); +create index feature_interaction_idx1 on feature_interaction (feature_id); +create index feature_interaction_idx2 on feature_interaction (interaction_id); +create index feature_interaction_idx3 on feature_interaction (role_id); + +grant all on feature_interaction to public; +grant all on feature_interaction_feature_interaction_id_seq to public; + +-- ? do we want to add rank to the unique key ? thinking stochiometry issues +-- and might we have one form modified and not another ? may be too much + +-- ================================================ +-- TABLE: feature_interactionprop +-- ================================================ + +drop table feature_interactionprop cascade; +create table feature_interactionprop ( + feature_interactionprop_id serial not null, + primary key (feature_interactionprop_id), + feature_interaction_id int not null, + foreign key (feature_interaction_id) references feature_interaction (feature_interaction_id) on delete cascade INITIALLY DEFERRED, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + constraint feature_interactionprop_c1 unique (feature_interaction_id,type_id,rank) +); +create index feature_interactionprop_idx1 on feature_interactionprop (feature_interaction_id); +create index feature_interactionprop_idx2 on feature_interactionprop (type_id); + +grant all on feature_interactionprop to public; +grant all on feature_interactionprop_feature_interactionprop_id_seq to public; + +-- ================================================ +-- TABLE: feature_interaction_pub +-- ================================================ + +drop table feature_interaction_pub cascade; +create table feature_interaction_pub ( + feature_interaction_pub_id serial not null, + primary key (feature_interaction_pub_id), + feature_interaction_id int not null, + foreign key (feature_interaction_id) references feature_interaction (feature_interaction_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + constraint feature_interaction_pub_c1 unique(feature_interaction_id,pub_id) +); +create index feature_interaction_pub_idx1 on feature_interaction_pub (feature_interaction_id); +create index feature_interaction_pub_idx2 on feature_interaction_pub (pub_id); + +grant all on feature_interaction_pub to public; +grant all on feature_interaction_pub_feature_interaction_pub_id_seq to public; + +-- ================================================ +-- TABLE: interaction_cell_line +-- ================================================ + +drop table interaction_cell_line cascade; + +create table interaction_cell_line ( + interaction_cell_line_id serial not null, + primary key (interaction_cell_line_id), + cell_line_id int not null, + foreign key (cell_line_id) references cell_line (cell_line_id) on delete cascade INITIALLY DEFERRED, + interaction_id int not null, + foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + unique(cell_line_id,interaction_id,pub_id) +); +create index interaction_cell_line_idx1 on interaction_cell_line (cell_line_id); +create index interaction_cell_line_idx2 on interaction_cell_line (interaction_id); +create index interaction_cell_line_idx3 on interaction_cell_line (pub_id); + +grant all on interaction_cell_line to public; +grant all on interaction_cell_line_interaction_cell_line_id_seq to public; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sco...@us...> - 2012-03-14 02:34:12
|
Revision: 25261 http://gmod.svn.sourceforge.net/gmod/?rev=25261&view=rev Author: scottcain Date: 2012-03-14 02:33:59 +0000 (Wed, 14 Mar 2012) Log Message: ----------- quoting the password so special characters will be protected. Thanks to Hans Kraus for pointing it out. Modified Paths: -------------- schema/trunk/chado/lib/Bio/Chado/Builder.pm Modified: schema/trunk/chado/lib/Bio/Chado/Builder.pm =================================================================== --- schema/trunk/chado/lib/Bio/Chado/Builder.pm 2012-03-13 18:41:31 UTC (rev 25260) +++ schema/trunk/chado/lib/Bio/Chado/Builder.pm 2012-03-14 02:33:59 UTC (rev 25261) @@ -352,7 +352,7 @@ # loading chadoxml my $stag_string = "stag-storenode.pl -d 'dbi:Pg:dbname=$db_name;host=$db_host;port=$db_port'"; $stag_string .= " --user $db_user " if $db_user; - $stag_string .= " --password $db_pass " if $db_pass; + $stag_string .= " --password '$db_pass' " if $db_pass; $sys_call = join( ' ', $stag_string, catfile( $conf->{'path'}{'data'}, $file->{'local'}.'xml') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sco...@us...> - 2012-03-13 18:41:55
|
Revision: 25260 http://gmod.svn.sourceforge.net/gmod/?rev=25260&view=rev Author: scottcain Date: 2012-03-13 18:41:31 +0000 (Tue, 13 Mar 2012) Log Message: ----------- updating changes Modified Paths: -------------- schema/trunk/chado/Changes Modified: schema/trunk/chado/Changes =================================================================== --- schema/trunk/chado/Changes 2012-03-13 18:26:05 UTC (rev 25259) +++ schema/trunk/chado/Changes 2012-03-13 18:41:31 UTC (rev 25260) @@ -3,6 +3,8 @@ Bio::DB::Das::Chado it would be happy. * Changed all perl script #! lines to use /usr/bin/env perl instead of the mishmash that was being used in various scripts. +* Fixed the GFF3 preprocessor so that if an insert into the sorting table fails, +the script will die to avoid losing GFF lines in the resulting file. Version 1.22 Thu Nov 17 12:48:10 EST 2011 * Created a script to automatically create the schemas dirs for a release and This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sco...@us...> - 2012-03-13 18:26:24
|
Revision: 25259 http://gmod.svn.sourceforge.net/gmod/?rev=25259&view=rev Author: scottcain Date: 2012-03-13 18:26:05 +0000 (Tue, 13 Mar 2012) Log Message: ----------- making the GFF sorter die if it fails to insert a line (so it won't be lost from the resulting sorted GFF). Modified Paths: -------------- schema/trunk/chado/lib/Bio/GMOD/DB/Adapter.pm Modified: schema/trunk/chado/lib/Bio/GMOD/DB/Adapter.pm =================================================================== --- schema/trunk/chado/lib/Bio/GMOD/DB/Adapter.pm 2012-03-09 20:29:01 UTC (rev 25258) +++ schema/trunk/chado/lib/Bio/GMOD/DB/Adapter.pm 2012-03-13 18:26:05 UTC (rev 25259) @@ -4688,7 +4688,7 @@ refseq varchar(4000), id varchar(4000), parent varchar(4000), - gffline varchar(4000), + gffline varchar(8000), row_id serial not null, primary key(row_id) ) "); @@ -4720,7 +4720,8 @@ my $self = shift; my ($refseq, $id, $parent, $line) = @_; $self->{'queries'}{'insert_gff_sort_tmp'}->execute( - $refseq, $id, $parent, $line); + $refseq, $id, $parent, $line) + or die "Inserting into the sort table failed:$!,\nProbably due to this line: $line\n"; return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nm...@us...> - 2012-03-09 20:29:13
|
Revision: 25258 http://gmod.svn.sourceforge.net/gmod/?rev=25258&view=rev Author: nm249 Date: 2012-03-09 20:29:01 +0000 (Fri, 09 Mar 2012) Log Message: ----------- wrapped code in a transaction Modified Paths: -------------- schema/trunk/chado/bin/gmod_make_cvtermpath.pl Modified: schema/trunk/chado/bin/gmod_make_cvtermpath.pl =================================================================== --- schema/trunk/chado/bin/gmod_make_cvtermpath.pl 2012-03-09 18:51:04 UTC (rev 25257) +++ schema/trunk/chado/bin/gmod_make_cvtermpath.pl 2012-03-09 20:29:01 UTC (rev 25258) @@ -99,6 +99,7 @@ use Bio::GMOD::Config; use Bio::GMOD::DB::Config; use Getopt::Std; +use Try::Tiny; our ($opt_H, $opt_D, $opt_v, $opt_t, $opt_g, $opt_p, $opt_d, $opt_u, $opt_c, $opt_o); @@ -146,7 +147,7 @@ $dsn .= ";host=$dbhost"; $dsn .= ";port=$port"; -my $schema= Bio::Chado::Schema->connect($dsn, $user, $pass||'', { AutoCommit=>0 }); +my $schema= Bio::Chado::Schema->connect($dsn, $user, $pass||''); my $db=$schema->storage->dbh(); @@ -219,9 +220,9 @@ %sot = (); # this is a hash for storing the already-processed leaves for a given type term. -our %seen ; +our %seen ; - + while(keys %leaf){ foreach my $l (keys %leaf){ foreach my $type (keys %type){ @@ -256,107 +257,106 @@ sub recurse { my($subjects,$type,$dist) = @_; - + # start with the last subject my $subject = $subjects->[-1]; #get the parents for the subject with this type (defaults to IS_A) my @objects = objects($subject,$type); - + #if there are no parents for this path, exit the loop (and the next leaf will be sent here again) if(!@objects){ $leaf{$subject}++ ; return; } my $path; - + # foreach parent construct a path with each child foreach my $object (@objects){ - my $tdist = $dist; - # loop through the child terms - foreach my $s (@$subjects){ - #next if the path was seen (subject-object-type-distance) - next if $sot{$s}{$object}{$type}{$tdist}; - if (exists($sot{$s}{$object}) && exists($sot{$object}{$s})) { - die " YOU HAVE A CYCLE IN YOUR ONTOLOGY for $s, $object ($type, $tdist) C8-( \n" ; - } - $sot{$s}{$object}{$type}{$tdist}++; - - print $tdist,"\t"x$dist,"\t",$s,"\t" , $object,"\t" ,$type||'transitive',"\n"; - - # if type is defined , create a path using it (see the first looping through %leaf keys) - if($type){ - - $path = $schema->resultset("Cv::Cvtermpath")->find_or_create( - { - subject_id => $s, - object_id => $object, - type_id => $type, - cv_id => $cv_id, - pathdistance => $tdist - }, { key => 'cvtermpath_c1' } , ); - message( "Inserting ($s,$object,$type,$cv_id , $tdist) into cvtermpath...path_id = " . $path->cvtermpath_id(). "\n" ); - my $ttdist = -1 * $tdist; + my $coderef = sub { + my $tdist = $dist; + # loop through the child terms + foreach my $s (@$subjects){ + #next if the path was seen (subject-object-type-distance) + next if $sot{$s}{$object}{$type}{$tdist}; + if (exists($sot{$s}{$object}) && exists($sot{$object}{$s})) { + die " YOU HAVE A CYCLE IN YOUR ONTOLOGY for $s, $object ($type, $tdist) C8-( \n" ; + } + $sot{$s}{$object}{$type}{$tdist}++; + print $tdist,"\t"x$dist,"\t",$s,"\t" , $object,"\t" ,$type||'transitive',"\n"; - $path = $schema->resultset("Cv::Cvtermpath")->find_or_create( - { - subject_id => $object, - object_id => $subject, - type_id => $type, - cv_id => $cv_id, - pathdistance => $ttdist - }, { key => 'cvtermpath_c1' } , ); - message( "Inserting ($object,$subject,$type,$cv_id , $ttdist) into cvtermpath...path_id = " . $path->cvtermpath_id() . "\n" ); - } else { # if type exists (see second looping through %leaf keys) create a path using the is_a type - message("No type defined! Using default IS_A relationship\n"); - my $is_a = $schema->resultset("Cv::Cvterm")->search({ name => 'is_a' })->first(); + # if type is defined , create a path using it (see the first looping through %leaf keys) + if($type){ + $path = $schema->resultset("Cv::Cvtermpath")->find_or_create( + { + subject_id => $s, + object_id => $object, + type_id => $type, + cv_id => $cv_id, + pathdistance => $tdist + }, { key => 'cvtermpath_c1' } , ); + message( "Inserting ($s,$object,$type,$cv_id , $tdist) into cvtermpath...path_id = " . $path->cvtermpath_id(). "\n" ); + my $ttdist = -1 * $tdist; - $path = $schema->resultset("Cv::Cvtermpath")->find_or_create( - { - subject_id => $s, - object_id => $object, - type_id => $is_a->cvterm_id(), - cv_id => $cv_id, - pathdistance => $tdist - }, { key => 'cvtermpath_c1' } , ); - message("Inserting ($s,$object, $type, " . $is_a->cv_id() . " , $tdist) into cvtermpath...path_id = " . $path->cvtermpath_id() . "\n" ); + $path = $schema->resultset("Cv::Cvtermpath")->find_or_create( + { + subject_id => $object, + object_id => $subject, + type_id => $type, + cv_id => $cv_id, + pathdistance => $ttdist + }, { key => 'cvtermpath_c1' } , ); + message( "Inserting ($object,$subject,$type,$cv_id , $ttdist) into cvtermpath...path_id = " . $path->cvtermpath_id() . "\n" ); + } else { # if type exists (see second looping through %leaf keys) create a path using the is_a type + message("No type defined! Using default IS_A relationship\n"); + my $is_a = $schema->resultset("Cv::Cvterm")->search({ name => 'is_a' })->first(); - $path = $schema->resultset("Cv::Cvtermpath")->find_or_create( - { - subject_id => $object, - object_id => $subject, - type_id => $is_a->cvterm_id(), - cv_id => $cv_id, - pathdistance => -$tdist - }, { key => 'cvtermpath_c1' } , ); - message( "Inserting ($object,$subject, " . $is_a->cvterm_id() . " ,$cv_id , -$tdist) into cvtermpath... path_id = " . $path->cvtermpath_id() . "\n" ); - } - $tdist--; - } - $tdist = $dist; - # recurse with arrayref of subjects and the object, increment the pathdistance - recurse([@$subjects,$object],$type,$dist+1); - - $db->commit(); - } - -} + $path = $schema->resultset("Cv::Cvtermpath")->find_or_create( + { + subject_id => $s, + object_id => $object, + type_id => $is_a->cvterm_id(), + cv_id => $cv_id, + pathdistance => $tdist + }, { key => 'cvtermpath_c1' } , ); + message("Inserting ($s,$object, $type, " . $is_a->cv_id() . " , $tdist) into cvtermpath...path_id = " . $path->cvtermpath_id() . "\n" ); + $path = $schema->resultset("Cv::Cvtermpath")->find_or_create( + { + subject_id => $object, + object_id => $subject, + type_id => $is_a->cvterm_id(), + cv_id => $cv_id, + pathdistance => -$tdist + }, { key => 'cvtermpath_c1' } , ); + message( "Inserting ($object,$subject, " . $is_a->cvterm_id() . " ,$cv_id , -$tdist) into cvtermpath... path_id = " . $path->cvtermpath_id() . "\n" ); + } + $tdist--; + } + $tdist = $dist; + # recurse with arrayref of subjects and the object, increment the pathdistance + recurse([@$subjects,$object],$type,$dist+1); + }; + try { + $schema->txn_do($coderef); + } catch { + die "An error occured. Rolling back! " . $_ . "\n\n"; + }; + } #object +} #recurse + #------------------- sub objects { my($subject,$type) = @_; - my @cvterm_rel; if($type){ - + @cvterm_rel = $schema->resultset("Cv::CvtermRelationship")->search( { subject_id => $subject, type_id => $type , } ); - } else { - @cvterm_rel = $schema->resultset("Cv::CvtermRelationship")->search( { subject_id => $subject } ); @@ -368,7 +368,6 @@ sub subjects { my($object,$type) = @_; - my @cvterm_rel; if($type){ @@ -379,7 +378,6 @@ ); } else { - @cvterm_rel = $schema->resultset("Cv::CvtermRelationship")->search( { object_id => $object } ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nm...@us...> - 2012-03-09 18:51:18
|
Revision: 25257 http://gmod.svn.sourceforge.net/gmod/?rev=25257&view=rev Author: nm249 Date: 2012-03-09 18:51:04 +0000 (Fri, 09 Mar 2012) Log Message: ----------- disabling loading of cross-ontologies relationships. Temporary solution for loading PO which has cross references among anatomy and growth stages terms Modified Paths: -------------- schema/trunk/chado/bin/gmod_load_cvterms.pl Modified: schema/trunk/chado/bin/gmod_load_cvterms.pl =================================================================== --- schema/trunk/chado/bin/gmod_load_cvterms.pl 2012-03-06 18:54:12 UTC (rev 25256) +++ schema/trunk/chado/bin/gmod_load_cvterms.pl 2012-03-09 18:51:04 UTC (rev 25257) @@ -690,7 +690,7 @@ next RELATIONSHIP; } ############################################ - push @novel_relationships, $r; + push @novel_relationships, $r; my $predicate_term_name = $file_relationships{$r}->predicate_term()->name(); my $predicate_term; @@ -729,7 +729,11 @@ } if (!$opt_t) { message("Storing relationship $r. type cv_id=" . $predicate_term->cv_id() ."\n" ,1); - my $new_rel = $schema->resultset('Cv::CvtermRelationship')->create( + if ( $subject_term->cv_id != $object_term->cv_id ) { + message("Wait! subjcet term has cv namespace " . $subject_term->cv->name . " which is different from the namespace of the object term (" . $object_term->cv->name . "). Cross referencing relationships across namespaces is not supported (yet.. ) SKIPPING this relationship! \n"); + next RELATIONSHIP; + } + my $new_rel = $schema->resultset('Cv::CvtermRelationship')->create( { subject_id => $subject_term->cvterm_id(), object_id => $object_term->cvterm_id(), type_id => $predicate_term->cvterm_id(), @@ -744,14 +748,14 @@ die "TEST RUN! rolling back\n"; } }; - + try { $schema->txn_do($coderef); message("Committing! \n If you are using cvtermpath you should now run gmod_make_cvtermpath.pl . See the perldoc for more info. \n\n", 1); } catch { # Transaction failed die "An error occured! Rolling back! " . $_ . "\n"; - } + }; } sub recursive_children { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nm...@us...> - 2012-03-06 18:54:29
|
Revision: 25256 http://gmod.svn.sourceforge.net/gmod/?rev=25256&view=rev Author: nm249 Date: 2012-03-06 18:54:12 +0000 (Tue, 06 Mar 2012) Log Message: ----------- added lookup for organism by ncbi taxonomy id, since species names may change. This loader also assumes species names are unique, as used in NCBI taxonomy. Modified Paths: -------------- schema/trunk/chado/bin/load_ncbi_taxonomy.pl Modified: schema/trunk/chado/bin/load_ncbi_taxonomy.pl =================================================================== --- schema/trunk/chado/bin/load_ncbi_taxonomy.pl 2012-02-28 21:26:20 UTC (rev 25255) +++ schema/trunk/chado/bin/load_ncbi_taxonomy.pl 2012-03-06 18:54:12 UTC (rev 25256) @@ -53,7 +53,7 @@ http://www.ncbi.nlm.nih.gov/sites/entrez?db=Taxonomy and search by taxid (e.g. txis4070[Subtree] ) -=item -p +=item -n phylotree name [optional] @@ -80,7 +80,7 @@ driver. Override driver name in gmod_config -=item -s +=item -p password. Override password in gmod_config @@ -129,7 +129,7 @@ =head1 VERISON AND DATE -Version 2.0, October 2009. +Version 2.1, March 2012. =head1 TODO @@ -147,19 +147,19 @@ use Bio::GMOD::DB::Config; use Bio::Chado::Schema; - +use Try::Tiny; use Getopt::Std; -our ($opt_H, $opt_D, $opt_v, $opt_t, $opt_i, $opt_p, $opt_g, $opt_u, $opt_s, $opt_d); +our ($opt_H, $opt_D, $opt_v, $opt_t, $opt_i, $opt_p, $opt_g, $opt_u, $opt_n, $opt_d); -getopts('H:D:i:p:g:u:s:d:tv'); +getopts('H:D:i:p:g:u:n:d:tv'); my $dbhost = $opt_H; my $dbname = $opt_D; my $infile = $opt_i; -my $phylotree_name= $opt_p || 'NCBI taxonomy tree'; +my $phylotree_name= $opt_n || 'NCBI taxonomy tree'; my $user = $opt_u; -my $pass = $opt_s; +my $pass = $opt_p; my $driver = $opt_d; my $port; @@ -196,7 +196,7 @@ $dsn .= ";host=$dbhost"; $dsn .= ";port=$port" if $port; -$schema= Bio::Chado::Schema->connect( $dsn, $user, $pass, { AutoCommit=>0 }); +$schema= Bio::Chado::Schema->connect( $dsn, $user, $pass||''); $dbh=$schema->storage->dbh(); @@ -377,7 +377,7 @@ my %phylonode=(); my $node_count=0; -eval { +my $coderef = sub { my $root_id; my $organism_id = $maxval{'organism'}; NODE: foreach my $id ( keys %node ) { @@ -417,10 +417,13 @@ if (!$genus || !$species) { die "NO GENUS OR SPECIES FOUND FOR tax_id $genbank_taxon_accession! Check your input file! \n" ; } $organism = $schema->resultset('Organism::Organism')->search( { - genus => { 'ilike'=> $genus }, species => {'ilike' => $species } - })->single(); - if (!$organism) { #create a new empty row object + })->single; # lookup is by species only . NCBI species should be unique! + if (!$organism) { #maybe the organism is already loaded with the ncbi taxonomy id, but the species name has changed? + my $organism_dbxref = $dbxref->organism_dbxrefs->single; + $organism= $organism_dbxref->organism if $organism_dbxref; + } + if (!$organism) { #create a new empty row object $organism = $schema->resultset('Organism::Organism')->new({}); $insert=1; } else { $update = 1; } @@ -433,12 +436,12 @@ if ($update) { $organism->update(); message( "*Updating organism " . $organism->get_column('organism_id') . " (species=" . $organism->species . ")\n", 1); - } + } if ($insert) { $organism->insert(); - message("New organism " . $organism->get_column('organism_id') . " (species=" . $organism->species . ")\n", 1); + message("New organism " . $organism->get_column('organism_id') . " (species=" . $organism->species . ")\n", 1); } - my $organism_id= $organism->get_column('organism_id'); + my $organism_id= $organism->get_column('organism_id'); ########################################### #store the organism synonyms @@ -541,13 +544,16 @@ $setright->execute($ctr++, $phylonode_id); message( "Setting right index= $ctr for phylonode id $phylonode_id\n\n",1); } + if ($opt_t) { die "TEST RUN! rolling back!\n"; } }; +try { + $schema->txn_do($coderef); + message( "Commiting!! \n"); + message("Inserted $node_count phylonodes. \n",1 ); -if ($@ || $opt_t) { - $dbh->rollback(); +} catch { + message( "An error occured! Rolling back! \n $_ \n Resetting database sequences...\n", 1); - message( "Rolling back! \n $@\n Resetting database sequences...\n", 1); - #reset sequences foreach my $key ( keys %seq ) { my $value= $seq{$key}; @@ -555,14 +561,8 @@ if ($maxvalue) { $dbh->do("SELECT setval ('$value', $maxvalue, true)") ; } else { $dbh->do("SELECT setval ('$value', 1, false)"); } } -}else { - message( "Commiting!! \n"); - message("Inserted $node_count phylonodes. \n",1 ); - - $dbh->commit(); -} +}; - sub set_maxval { my $key=shift; my $id_column= $key . "_id"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |