Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
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
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
1
|
2
|
3
|
4
|
5
|
6
(1) |
7
|
8
|
9
(2) |
10
|
11
|
12
|
13
(2) |
14
(1) |
15
|
16
|
17
|
18
|
19
|
20
|
21
|
22
|
23
|
24
|
25
|
26
|
27
|
28
|
29
(1) |
30
|
31
|
From: <scottcain@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: <scottcain@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: <scottcain@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: <scottcain@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: <nm249@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: <nm249@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: <nm249@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. |