From: Scott C. <sco...@us...> - 2006-04-21 20:50:02
|
Update of /cvsroot/gmod/schema/chado/load/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14313/load/bin Modified Files: new_bulk_load_gff3.PLS Log Message: started work on handling CDS features, though I've yet to write the handle_CDS method Index: new_bulk_load_gff3.PLS =================================================================== RCS file: /cvsroot/gmod/schema/chado/load/bin/new_bulk_load_gff3.PLS,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** new_bulk_load_gff3.PLS 13 Apr 2006 20:39:17 -0000 1.5 --- new_bulk_load_gff3.PLS 21 Apr 2006 20:49:57 -0000 1.6 *************** *** 516,561 **** } ! ! ####################################################### ! # Load cache with existing synonym, dbxref, and ! # analysis records. prevents failure of load if they ! # already existed. ! # ! # ! # I don't want to do this due to overhead issues ! #my %label = ( ! # #add more tables here. key is tablename, ! # #value is label to lookup by. ! # analysis => 'name', ! # synonym => 'name', ! # dbxref => 'accession', ! # ); ! # ! #my $iterator; ! # ! #foreach my $table (keys %label){ ! # print STDERR "caching $table... "; ! # my $class = 'Chado::'.ucfirst($table); ! # $iterator = $class->retrieve_all(); ! # my $label = $label{$table}; ! # while(my $obj = $iterator->next()){ ! # $cache{$table}{$obj->$label} = $obj; ! # } ! # print STDERR "done!\n"; ! #} ! # ! # ! # End load cache. ! ####################################################### ! ! ! ! ######################## ! ! ####################################################### ! #prepare a bunch of sql queries to be used in the loop: ! # ! ! $chado->organism_id($ORGANISM) or die "$ORGANISM organism not found in the database"; $chado->file_handles(); --- 516,521 ---- } ! $chado->organism_id($ORGANISM) ! or die "$ORGANISM organism not found in the database"; $chado->file_handles(); *************** *** 579,589 **** warn "(This may take a while ...)\n"; ! while(my $feature = $gffio->next_feature()){ my $nextfeature = $chado->nextfeature(); my $nextfeatureloc = $chado->nextfeatureloc(); - my $featuretype = $feature->type->name; - my $type = $chado->get_type($featuretype); my ($src, $seqlen) = $chado->get_src_seqlen($feature); --- 539,557 ---- warn "(This may take a while ...)\n"; ! my $feature_iterator; ! FEATURE: ! while(my $feature = $feature_iterator->next_feature || $gffio->next_feature){ ! ! my $featuretype = $feature->type->name; ! ! if ($featuretype =~ /CDS/) { ! #handle_CDS returns a feature iterator if it has a complete set ! my $feature_iterator = $chado->handle_CDS($feature); ! next FEATURE; ! } my $nextfeature = $chado->nextfeature(); my $nextfeatureloc = $chado->nextfeatureloc(); my $type = $chado->get_type($featuretype); my ($src, $seqlen) = $chado->get_src_seqlen($feature); *************** *** 634,638 **** } - #FIXME potential $chado->nextfeature bug if ($ANALYSIS && $featuretype =~ /match/ --- 602,605 ---- |