From scain at dev.open-bio.org Mon Oct 1 11:18:15 2007 From: scain at dev.open-bio.org (Scott Cain) Date: Mon, 01 Oct 2007 15:18:15 +0000 Subject: [Bioperl-guts-l] bioperl-live/scripts/Bio-DB-GFF genbank2gff3.PLS, 1.15, 1.16 Message-ID: <200710011518.l91FIFat013404@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/scripts/Bio-DB-GFF In directory dev.open-bio.org:/tmp/cvs-serv13383/scripts/Bio-DB-GFF Modified Files: genbank2gff3.PLS Log Message: Fix for the case when the Parent tag isn't present; also improving regex in GFF tool Index: genbank2gff3.PLS =================================================================== RCS file: /home/repository/bioperl/bioperl-live/scripts/Bio-DB-GFF/genbank2gff3.PLS,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** genbank2gff3.PLS 19 Jun 2007 18:41:09 -0000 1.15 --- genbank2gff3.PLS 1 Oct 2007 15:18:13 -0000 1.16 *************** *** 750,754 **** for my $expar ($rna_id, $ncrna_id) { next unless($expar); ! if ( $exonpar{$expar} ) { my @vals = $f->get_tag_values('Parent'); next if (grep {$expar eq $_} @vals); --- 750,754 ---- for my $expar ($rna_id, $ncrna_id) { next unless($expar); ! if ( $exonpar{$expar} and $f->has_tag('Parent') ) { my @vals = $f->get_tag_values('Parent'); next if (grep {$expar eq $_} @vals); From scain at dev.open-bio.org Mon Oct 1 11:18:15 2007 From: scain at dev.open-bio.org (Scott Cain) Date: Mon, 01 Oct 2007 15:18:15 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/Tools GFF.pm,1.67,1.68 Message-ID: <200710011518.l91FIFP7013399@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/Tools In directory dev.open-bio.org:/tmp/cvs-serv13383/Bio/Tools Modified Files: GFF.pm Log Message: Fix for the case when the Parent tag isn't present; also improving regex in GFF tool Index: GFF.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/Tools/GFF.pm,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** GFF.pm 9 Jul 2007 01:34:52 -0000 1.67 --- GFF.pm 1 Oct 2007 15:18:12 -0000 1.68 *************** *** 1050,1054 **** } $tag= lcfirst($tag) unless ($tag ! =~ /^ID|Name|Alias|Parent|Gap|Target|Derives_from|Note|Dbxref|Ontology_term$/); push @groups, "$tag=".join(",", at v); --- 1050,1054 ---- } $tag= lcfirst($tag) unless ($tag ! =~ /^(ID|Name|Alias|Parent|Gap|Target|Derives_from|Note|Dbxref|Ontology_term)$/); push @groups, "$tag=".join(",", at v); From cjfields at dev.open-bio.org Thu Oct 4 11:13:30 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Thu, 04 Oct 2007 15:13:30 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/DB/SeqFeature/Store/DBI mysql.pm, 1.31, 1.32 Message-ID: <200710041513.l94FDUXU020039@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/DB/SeqFeature/Store/DBI In directory dev.open-bio.org:/tmp/cvs-serv20014/Bio/DB/SeqFeature/Store/DBI Modified Files: mysql.pm Log Message: always use table type to MyISAM for FULLTEXT indexing Index: mysql.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/SeqFeature/Store/DBI/mysql.pm,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** mysql.pm 24 Aug 2007 21:15:40 -0000 1.31 --- mysql.pm 4 Oct 2007 15:13:27 -0000 1.32 *************** *** 411,415 **** my $table = $self->_qualify($_); $dbh->do("DROP table IF EXISTS $table") if $erase; ! my $query = "CREATE TABLE IF NOT EXISTS $table $tables->{$_}"; $dbh->do($query) or $self->throw($dbh->errstr); } --- 411,415 ---- my $table = $self->_qualify($_); $dbh->do("DROP table IF EXISTS $table") if $erase; ! my $query = "CREATE TABLE IF NOT EXISTS $table $tables->{$_} TYPE=MYISAM"; $dbh->do($query) or $self->throw($dbh->errstr); } *************** *** 423,427 **** my $table = $self->_qualify('meta'); my $tables = $self->table_definitions; ! $self->dbh->do("CREATE TABLE IF NOT EXISTS $table $tables->{meta}"); } --- 423,427 ---- my $table = $self->_qualify('meta'); my $tables = $self->table_definitions; ! $self->dbh->do("CREATE TABLE IF NOT EXISTS $table $tables->{meta} TYPE=MYISAM"); } *************** *** 432,436 **** for my $t (keys %$tables) { my $table = $self->_qualify($t); ! my $query = "CREATE TEMPORARY TABLE $table $tables->{$t}"; $dbh->do($query) or $self->throw($dbh->errstr); } --- 432,436 ---- for my $t (keys %$tables) { my $table = $self->_qualify($t); ! my $query = "CREATE TEMPORARY TABLE $table $tables->{$t} TYPE=MYISAM"; $dbh->do($query) or $self->throw($dbh->errstr); } From jason at dev.open-bio.org Thu Oct 4 15:03:23 2007 From: jason at dev.open-bio.org (Jason Stajich) Date: Thu, 04 Oct 2007 19:03:23 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/DB/SeqFeature/Store/DBI mysql.pm, 1.32, 1.33 Message-ID: <200710041903.l94J3Nea020332@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/DB/SeqFeature/Store/DBI In directory dev.open-bio.org:/tmp/cvs-serv20306/DBI Modified Files: mysql.pm Log Message: force MYISAM for FULLTEXT indexed tables Index: mysql.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/SeqFeature/Store/DBI/mysql.pm,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** mysql.pm 4 Oct 2007 15:13:27 -0000 1.32 --- mysql.pm 4 Oct 2007 19:03:21 -0000 1.33 *************** *** 280,284 **** index(attribute_id,attribute_value(10)), FULLTEXT(attribute_value) ! ) END --- 280,284 ---- index(attribute_id,attribute_value(10)), FULLTEXT(attribute_value) ! ) ENGINE=MYISAM END From cjfields at dev.open-bio.org Thu Oct 4 20:27:55 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Fri, 05 Oct 2007 00:27:55 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/SearchIO infernal.pm,1.11,1.12 Message-ID: <200710050027.l950RtVa020619@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/SearchIO In directory dev.open-bio.org:/tmp/cvs-serv20594/Bio/SearchIO Modified Files: infernal.pm Log Message: * bug fix from Jeffrey Barrick for cases where empty midline data occurs * add simple synopsis, update POD Index: infernal.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/SearchIO/infernal.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** infernal.pm 5 Sep 2007 03:59:52 -0000 1.11 --- infernal.pm 5 Oct 2007 00:27:52 -0000 1.12 *************** *** 17,30 **** =head1 SYNOPSIS ! =head1 DESCRIPTION ! This is a highly experimental SearchIO-based parser for Infernal output from ! the cmsearch program. It currently parses cmsearch output for Infernal ! versions 0.7-0.72; older versions may work but will not be supported. ! As output format for cmsearch is continually changing, support for this parser ! will only be for the latest Infernal version (v 0.81 at this time) or the latest ! stable version. Output for v. 0.81 is currently not parsed due to significant ! changes in the output style; I am hoping to rectify this soon. =head1 FEEDBACK --- 17,38 ---- =head1 SYNOPSIS ! my $parser = Bio::SearchIO->new(-format => 'infernal', ! -file => 'purine.inf'); ! while( my $result = $parser->next_result ) { ! # general result info, such as model used, Infernal version ! while( my $hit = $result->next_hit ) { ! while( my $hsp = $hit->next_hsp ) { ! # ... ! } ! } ! } ! =head1 DESCRIPTION ! This is a highly experimental SearchIO-based parser for Infernal output from the ! cmsearch program. It currently parses cmsearch output for Infernal versions ! 0.7-0.81; older versions may work but will not be supported. After the first ! stable version is released (and output has stabilized) it is very likely support ! for the older pre-v.1 developer releases will be dropped. =head1 FEEDBACK *************** *** 51,54 **** --- 59,66 ---- Email cjfields-at-uiuc-dot-edu + =head1 CONTRIBUTORS + + Jeffrey Barrick, Michigan State University + =head1 APPENDIX *************** *** 755,760 **** HSP: while (defined ($line = $self->_readline)) { - next if $line =~ m{^\s*$}; # toss empty lines chomp $line; # exit loop if at end of file or upon next hit/HSP if ($line =~ m{^\s{0,2}\S+}) { --- 767,777 ---- HSP: while (defined ($line = $self->_readline)) { chomp $line; + next if (!$line); # toss empty lines + # next if $line =~ m{^\s*$}; # toss empty lines + # it is possible to have homology lines consisting + # entirely of spaces if the subject has a large + # insertion where nothing matches the model + # exit loop if at end of file or upon next hit/HSP if ($line =~ m{^\s{0,2}\S+}) { *************** *** 767,775 **** $strln = length($line) if $iterator == 0; # only grab the data needed (hit start and stop in hit line above) ! my $data = substr($line, $offset, $strln-$offset); $hsp->{ $hsp_key{$iterator} } .= $data; $ct++; } # query start, end are from the actual query length (entire hit is # mapped to CM data, so all CM data is represented) --- 784,794 ---- $strln = length($line) if $iterator == 0; # only grab the data needed (hit start and stop in hit line above) ! my $data = substr($line, $offset, $strln-$offset); $hsp->{ $hsp_key{$iterator} } .= $data; + $ct++; } + # query start, end are from the actual query length (entire hit is # mapped to CM data, so all CM data is represented) From cjfields at dev.open-bio.org Fri Oct 5 12:36:15 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Fri, 05 Oct 2007 16:36:15 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio Range.pm,1.29,1.30 Message-ID: <200710051636.l95GaFhG022733@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio In directory dev.open-bio.org:/tmp/cvs-serv22708/Bio Modified Files: Range.pm Log Message: typo Index: Range.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/Range.pm,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** Range.pm 14 Jun 2007 14:16:09 -0000 1.29 --- Range.pm 5 Oct 2007 16:36:12 -0000 1.30 *************** *** 297,301 **** Title : contains Usage : if($r1->contains($r2) { do stuff } ! Function : tests wether $r1 totally contains $r2 Args : a range to test for being contained Returns : true if the argument is totally contained within this range --- 297,301 ---- Title : contains Usage : if($r1->contains($r2) { do stuff } ! Function : tests whether $r1 totally contains $r2 Args : a range to test for being contained Returns : true if the argument is totally contained within this range From cjfields at dev.open-bio.org Fri Oct 5 12:36:47 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Fri, 05 Oct 2007 16:36:47 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/Graphics Panel.pm,1.137,1.138 Message-ID: <200710051636.l95GalPe022807@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/Graphics In directory dev.open-bio.org:/tmp/cvs-serv22782/Bio/Graphics Modified Files: Panel.pm Log Message: typo Index: Panel.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/Graphics/Panel.pm,v retrieving revision 1.137 retrieving revision 1.138 diff -C2 -d -r1.137 -r1.138 *** Panel.pm 20 Sep 2007 15:07:16 -0000 1.137 --- Panel.pm 5 Oct 2007 16:36:45 -0000 1.138 *************** *** 1426,1430 **** object, passing it the desired width of the image to generate and an origin and length describing the coordinate range to display. The ! Bio::Graphics::Panel-Enew() method has may configuration variables that allow you to control the appearance of the image. --- 1426,1430 ---- object, passing it the desired width of the image to generate and an origin and length describing the coordinate range to display. The ! Bio::Graphics::Panel-Enew() method has many configuration variables that allow you to control the appearance of the image. From bugzilla-daemon at portal.open-bio.org Fri Oct 5 14:01:11 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Fri, 5 Oct 2007 14:01:11 -0400 Subject: [Bioperl-guts-l] [Bug 2086] EMBL parser should not look for FT, DE and other line prefixes when it is ID line In-Reply-To: Message-ID: <200710051801.l95I1BIE025627@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2086 ------- Comment #8 from mmokrejs at ribosome.natur.cuni.cz 2007-10-05 14:01 EST ------- Chris, it is fine with me, mainly I wanted to raise up this issue. Thanks. -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Fri Oct 5 16:19:51 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Fri, 5 Oct 2007 16:19:51 -0400 Subject: [Bioperl-guts-l] [Bug 2376] New: ID of match features in bp_search2gff.pl Message-ID: http://bugzilla.open-bio.org/show_bug.cgi?id=2376 Summary: ID of match features in bp_search2gff.pl Product: BioPerl Version: main-trunk Platform: PC OS/Version: Mac OS Status: NEW Severity: normal Priority: P2 Component: bioperl-run AssignedTo: bioperl-guts-l at bioperl.org ReportedBy: e-just at northwestern.edu The ID that gets generated for a match feature when the --match option is set can be problematic. The ID is set to the ID of the query sequence. This can be problematic if you are representing the query sequence and the blast hit in the same gff file. When using the resultant gff file for loading into Chado, it also creates a problem if you have more than one hit for a given query sequence, for example if you ran two different analyses that each had a hit for a given query. Would it be possible to have an option to create a unique ID for match features. One suggestion could be to create an ID based on the ID of the query + the id of the hit + the source currently a hit of the query DDDB0XXXX to DDB00000902 with the source blasntn10052007 would be output like DDB00000902 blasntn10052007 match 5006 55498 462 + . ID=DDB0XXXXX I propose a unique ID, for example: DDB00000902 blasntn10052007 match 5006 55498 462 + . ID=DDB0XXXXX.DDB00000902.blasntn10052007 -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Fri Oct 5 16:23:02 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Fri, 5 Oct 2007 16:23:02 -0400 Subject: [Bioperl-guts-l] [Bug 2377] New: Target tag format in bp_search2gff.pl Message-ID: http://bugzilla.open-bio.org/show_bug.cgi?id=2377 Summary: Target tag format in bp_search2gff.pl Product: BioPerl Version: main-trunk Platform: PC OS/Version: Mac OS Status: NEW Severity: normal Priority: P2 Component: bioperl-run AssignedTo: bioperl-guts-l at bioperl.org ReportedBy: e-just at northwestern.edu Currently the Target tag gets written as: Target=Sequence:SOME_ID I propose: Target=SOME_ID Or at least an option to generate it in this way. Thanks! -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Mon Oct 8 14:09:46 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Mon, 8 Oct 2007 14:09:46 -0400 Subject: [Bioperl-guts-l] [Bug 2378] New: Getting strand of query/hit features in Bio::Search::HSP::GenericHSP Message-ID: http://bugzilla.open-bio.org/show_bug.cgi?id=2378 Summary: Getting strand of query/hit features in Bio::Search::HSP::GenericHSP Product: BioPerl Version: main-trunk Platform: PC OS/Version: Mac OS Status: NEW Severity: normal Priority: P2 Component: Bio::Search/Bio::SearchIO AssignedTo: bioperl-guts-l at bioperl.org ReportedBy: e-just at northwestern.edu Hi there, I create an HSP feature my $bphsp1 = new Bio::Search::HSP::GenericHSP( -query_start => 1, -query_end => 18, -query_name => 'a', -query_length => 10000, -hit_start => 47360, -hit_end => 47343, -hit_name => 'b', -hit_length => 10000, -identical => 100, -conserved => 100 ); attempting to access the strand via $bphsp1->hit()->strand() and $bphsp1->query()->strand() always results in 0. Additionally the hit start is reported as 47343, and the end as 47360. This results in information loss regarding the strand of the hit (in this case it is -1 since the start > end when creating the feature. I am attaching a test. -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Mon Oct 8 14:11:32 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Mon, 8 Oct 2007 14:11:32 -0400 Subject: [Bioperl-guts-l] [Bug 2378] Getting strand of query/hit features in Bio::Search::HSP::GenericHSP In-Reply-To: Message-ID: <200710081811.l98IBWiV011632@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2378 ------- Comment #1 from e-just at northwestern.edu 2007-10-08 14:11 EST ------- Created an attachment (id=771) --> (http://bugzilla.open-bio.org/attachment.cgi?id=771&action=view) Test case for Bio::Search::HSP::GenericHSP -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Mon Oct 8 14:38:27 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Mon, 8 Oct 2007 14:38:27 -0400 Subject: [Bioperl-guts-l] [Bug 2378] Getting strand of query/hit features in Bio::Search::HSP::GenericHSP In-Reply-To: Message-ID: <200710081838.l98IcREX012928@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2378 ------- Comment #2 from cjfields at uiuc.edu 2007-10-08 14:38 EST ------- As a note, HSP objects are normally generated by Bio::SearchIO modules via the event-based handler and not directly generated. The strand for the query/hit is set only under specific circumstances, normally based upon the type of report being parsed; for instance, BLASTN would set it while BLASTP wouldn't, regardless of start being less or greater than the end (it would just flip start/end). If I pass a recognized algorithm to the constructor it works for me: my $bphsp1 = Bio::Search::HSP::GenericHSP->new( -query_start => 1, -query_end => 18, -query_name => 'a', -query_length => 10000, -hit_start => 47360, -hit_end => 47343, -hit_name => 'b', -hit_length => 10000, -identical => 100, -conserved => 100, -algorithm => 'BLASTN' ); If we intend on using these classes outside of Bio::SearchIO we could set something up which computes strandedness based on passed values vs the algorithm, maybe using a getter/setter or passed parameter with 'query', 'subject', or 'both'. -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Mon Oct 8 14:49:14 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Mon, 8 Oct 2007 14:49:14 -0400 Subject: [Bioperl-guts-l] [Bug 2378] Getting strand of query/hit features in Bio::Search::HSP::GenericHSP In-Reply-To: Message-ID: <200710081849.l98InEiY013426@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2378 ------- Comment #3 from e-just at northwestern.edu 2007-10-08 14:49 EST ------- Thanks, thats good to know. That pretty much solves the problem at hand! -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Mon Oct 8 15:11:07 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Mon, 8 Oct 2007 15:11:07 -0400 Subject: [Bioperl-guts-l] [Bug 2378] Getting strand of query/hit features in Bio::Search::HSP::GenericHSP In-Reply-To: Message-ID: <200710081911.l98JB73O015167@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2378 cjfields at uiuc.edu changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement ------- Comment #4 from cjfields at uiuc.edu 2007-10-08 15:11 EST ------- Changing to an enhancement request. I'll see if I can add something for HSPs so one can get around the use of algorithm() for strandedness. -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From cjfields at dev.open-bio.org Mon Oct 8 17:34:13 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Mon, 08 Oct 2007 21:34:13 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/Tools Glimmer.pm,1.10,1.11 Message-ID: <200710082134.l98LYDYv000448@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/Tools In directory dev.open-bio.org:/tmp/cvs-serv422/Bio/Tools Modified Files: Glimmer.pm Log Message: capture display_name, score data for Glimmer3 predict file Index: Glimmer.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/Tools/Glimmer.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Glimmer.pm 1 Jul 2007 22:02:51 -0000 1.10 --- Glimmer.pm 8 Oct 2007 21:34:10 -0000 1.11 *************** *** 39,43 **** # array of Bio::Tools::Prediction::Exon objects. # For prokaryotic input (Glimmer2.X/Glimmer3.X), $gene will be an ! $ instance of Bio::SeqFeature::Generic # all exons (eukaryotic only): --- 39,43 ---- # array of Bio::Tools::Prediction::Exon objects. # For prokaryotic input (Glimmer2.X/Glimmer3.X), $gene will be an ! # instance of Bio::SeqFeature::Generic # all exons (eukaryotic only): *************** *** 469,475 **** (\d+)\s+(\d+)\s+ # start, end ([\+\-])\d{1}\s+ # strand /ox)) { ! my ($genenum,$start,$end,$strand) = ! ( $1,$2,$3,$4 ); my $circular_prediction = 0; --- 469,476 ---- (\d+)\s+(\d+)\s+ # start, end ([\+\-])\d{1}\s+ # strand + ([\d\.]+) # score /ox)) { ! my ($genenum,$start,$end,$strand,$score) = ! ( $1,$2,$3,$4,$5 ); my $circular_prediction = 0; *************** *** 563,568 **** --- 564,571 ---- '-strand' => $strand eq '-' ? '-1' : '1', '-source_tag' => $source, + '-display_name' => "orf$genenum", '-primary_tag'=> 'gene', '-tag' => { 'Group' => "GenePrediction_$genenum"}, + '-score' => $score || undef ); From cjfields at dev.open-bio.org Tue Oct 9 00:17:34 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Tue, 09 Oct 2007 04:17:34 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/Tools Glimmer.pm,1.11,1.12 Message-ID: <200710090417.l994HYup000846@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/Tools In directory dev.open-bio.org:/tmp/cvs-serv821/Bio/Tools Modified Files: Glimmer.pm Log Message: start must always be < end; strand determines directionality Index: Glimmer.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/Tools/Glimmer.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Glimmer.pm 8 Oct 2007 21:34:10 -0000 1.11 --- Glimmer.pm 9 Oct 2007 04:17:32 -0000 1.12 *************** *** 536,539 **** --- 536,543 ---- } else { + # start must always be less than end for gene locations + if ($strand eq '-' && $start > $end) { + ($start, $end) = ($end, $start); + } $location_string = "$start..$end"; } *************** *** 541,560 **** my $location_object = $location_factory->from_string($location_string); - - # The Location Factory seems to produce Simple - # locations for minus strand genes with start < end. - # Fixup to be consistent with previous behaviour. - if ($strand eq '-') { - if ($location_object->isa('Bio::Location::Simple')) { - my $start = $location_object->start(); - my $end = $location_object->end(); - - if ($start < $end) { - ($start, $end) = ($end, $start); - $location_object->start($start); - $location_object->end($end); - } - } - } my $gene = Bio::SeqFeature::Generic->new --- 545,548 ---- From cjfields at dev.open-bio.org Tue Oct 9 00:19:36 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Tue, 09 Oct 2007 04:19:36 +0000 Subject: [Bioperl-guts-l] bioperl-live/t Genpred.t,1.28,1.29 Message-ID: <200710090419.l994JaeW000899@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/t In directory dev.open-bio.org:/tmp/cvs-serv874/t Modified Files: Genpred.t Log Message: start must always be < end; strand determines directionality Index: Genpred.t =================================================================== RCS file: /home/repository/bioperl/bioperl-live/t/Genpred.t,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Genpred.t 29 Aug 2007 21:39:49 -0000 1.28 --- Genpred.t 9 Oct 2007 04:19:34 -0000 1.29 *************** *** 210,215 **** $i++; if ($i == 2) { ! is($g2gene->start, 2349); ! is($g2gene->end, 2230); is($g2gene->strand, -1); } elsif ($i == 25) { --- 210,215 ---- $i++; if ($i == 2) { ! is($g2gene->start, 2230); ! is($g2gene->end, 2349); is($g2gene->strand, -1); } elsif ($i == 25) { *************** *** 249,254 **** $i++; if ($i == 13) { ! is($g3gene->start, 14781); ! is($g3gene->end, 13804); is($g3gene->strand, -1); my ($orfid) = $g3gene->has_tag('Group') ? $g3gene->get_tag_values('Group') : undef; --- 249,254 ---- $i++; if ($i == 13) { ! is($g3gene->start, 13804); ! is($g3gene->end, 14781); is($g3gene->strand, -1); my ($orfid) = $g3gene->has_tag('Group') ? $g3gene->get_tag_values('Group') : undef; From bugzilla-daemon at portal.open-bio.org Mon Oct 15 08:00:47 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Mon, 15 Oct 2007 08:00:47 -0400 Subject: [Bioperl-guts-l] [Bug 2332] Software for analysis of redundant fragments of affys human mitochip v2 In-Reply-To: Message-ID: <200710151200.l9FC0lru015020@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2332 marian.thieme at lycos.de changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #708 is|0 |1 obsolete| | Attachment #720 is|0 |1 obsolete| | ------- Comment #10 from marian.thieme at lycos.de 2007-10-15 08:00 EST ------- Created an attachment (id=772) --> (http://bugzilla.open-bio.org/attachment.cgi?id=772&action=view) Refactored Code new module name: Bio::Microarray::Tools::ReseqChip sourced out the parsing routine, reading the chip design file. That means there is a new module (MitoChipV2Parser.pm), indicating, that it is a parser for Affymetrix MitoChip V2 -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Mon Oct 15 11:27:08 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Mon, 15 Oct 2007 11:27:08 -0400 Subject: [Bioperl-guts-l] [Bug 2332] Software for analysis of redundant fragments of affys human mitochip v2 In-Reply-To: Message-ID: <200710151527.l9FFR8DD028395@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2332 ------- Comment #11 from marian.thieme at lycos.de 2007-10-15 11:27 EST ------- Created an attachment (id=773) --> (http://bugzilla.open-bio.org/attachment.cgi?id=773&action=view) fixed bug in the testscript -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From cjfields at dev.open-bio.org Mon Oct 15 11:39:08 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Mon, 15 Oct 2007 15:39:08 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/Microarray - New directory Message-ID: <200710151539.l9FFd7T5025722@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/Microarray In directory dev.open-bio.org:/tmp/cvs-serv25690/Bio/Microarray Log Message: Directory /home/repository/bioperl/bioperl-live/Bio/Microarray added to the repository From cjfields at dev.open-bio.org Mon Oct 15 11:39:08 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Mon, 15 Oct 2007 15:39:08 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/Microarray/Tools - New directory Message-ID: <200710151539.l9FFd8xY025723@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/Microarray/Tools In directory dev.open-bio.org:/tmp/cvs-serv25690/Bio/Microarray/Tools Log Message: Directory /home/repository/bioperl/bioperl-live/Bio/Microarray/Tools added to the repository From cjfields at dev.open-bio.org Mon Oct 15 11:39:28 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Mon, 15 Oct 2007 15:39:28 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/Microarray/Tools ReseqChip.pm, NONE, 1.1 MitoChipV2Parser.pm, NONE, 1.1 Message-ID: <200710151539.l9FFdSZq025800@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/Microarray/Tools In directory dev.open-bio.org:/tmp/cvs-serv25775/Bio/Microarray/Tools Added Files: ReseqChip.pm MitoChipV2Parser.pm Log Message: bug 2332 --- NEW FILE: ReseqChip.pm --- #------------------------------------------------------------------------------ # PACKAGE : Bio::Microarray::Tools::ReseqChip # PURPOSE : Analyse redundant fragments of Affymetrix Resequencing Chip # AUTHOR : Marian Thieme # CREATED : 21.09.2007 # REVISION: # STATUS : Beta # # For documentation, run this module through pod2html #------------------------------------------------------------------------------ =head1 NAME Bio::Microarray::Tools::ReseqChip - Class for extraction and incorporation of information about redundant fragments of Affy Mitochip v2.0 =head1 SYNOPSIS [...1037 lines suppressed...] } } } #fragmente schreiben else { my $offset=$self->_get_start_pos($seq->start()); while ($i<=$seq->length()+1) { my $zeile=$i+$seq->start()+$offset; my $wert=$seq->subseq($i-1,$i-1); #$worksheet->write($zeile, $j-$start, $wert); $worksheet->write($zeile, 0, $wert); $i+=1; } } #$seqno++; } } 1; --- NEW FILE: MitoChipV2Parser.pm --- #------------------------------------------------------------------------------ # PACKAGE : Bio::Microarray::Tools::MitoChipV2Parser.pm # PURPOSE : Parser for affy design file # AUTHOR : Marian Thieme # CREATED : 28.09.2007 # REVISION: # STATUS : Beta # # For documentation, run this module through pod2html #------------------------------------------------------------------------------ =head1 NAME Bio::Microarray::Tools::MitoChipV2Parser- Class for parsing design file for Affy MitoChip V2.0 =head1 SYNOPSIS =head1 DESCRIPTION =head1 AUTHORS Marian Thieme (marian.thieme at arcor.de) =head1 COPYRIGHT Copyright (c) 2007 Institute of Functional Genomics, University Regensburg, granted by Baygene. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 DISCLAIMER This software is provided "as is" without warranty of any kind. =head1 APPENDIX The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ =cut package Bio::Microarray::Tools::MitoChipV2Parser; use Spreadsheet::ParseExcel; use strict; use warnings; use base qw(Bio::Root::Root); #our @ISA = qw(Bio::Root::Root); =head2 new() Title : new/Creator method Usage : my $parser=Bio::Microarray::Tools::MitoChipV2Parser->new($file_name); Function : Creates 2 hashes by parsing the specified design file. Returns : MitoChipV2Parser object, consists mainly of 2 hashes: 1. $self->{_frags_hash} hash of hashs containing the fragment id as key and a hash as value. The nested hash has a position (covering a variying site hold by the fragment) as key and an array of length 4 (a,b,c,d) containing: a. the mutation type (ins, del, sub) b. the mutated base (A, C, G, T (in the case of subsititution or insertion of length 1), D (in the case of a deletion) and for instance CC, CCC, ... in the case of an insertion of length 2 or 3) c. the start position of the fragment d. the end position of the fragment (that information is identical for each array belonging to the same fragment) 2. $self->{_oligos2calc_hash} hash containing the start and stop position of location of fragments (key: start pos, value: end pos) Args : $filename - name of affy mitochip v2 design file (for instance: mtDNA_design_annotation_file_FINAL.xls) =cut sub new { my ($class, $file_name) = @_; my $self = $class->SUPER::new(); $self->{_frags_hash}=undef; $self->{_oligos2calc_hash}=undef; $self->throw("Must provide filename as first argument !") unless $file_name; my %max_ins_hash=(); $self->{_frags_hash}=$self->_parse_Affy_mtDNA_design_annotation_file($file_name); print "Created array of redundant fragments. \n"; print $self->{_frags_hash}; bless $self, $class; return $self; } =head2 _parse_Affy_mtDNA_design_annotation_file() Title : _parse_Affy_mtDNA_design_annotation_file() Usage : private Function, dont call directly Function : Creates Hash of insertions of maximal length, by parsing the affy chip design file and calcs the location of clusters of the Redundant Fragments Returns : Returns hash of maximal insertions and calls private function _calc_oligo_region_hash() Args : $filename - excel filename of the affy design file =cut sub _parse_Affy_mtDNA_design_annotation_file() { my ($self, $filename) = @_; my $oExcel = new Spreadsheet::ParseExcel; my $oBook = $oExcel->Parse($filename); $self->throw("File $filename not found") unless $oBook; #my ($iR, $iC, $oWkS, $oWkC); my %frags=(); #309.1C_309.2C_309.3C_315.1C_337D is parsed to hash: #mt228ref285-339 => 315 => ins ... C ... 285 .. 339 . # 309 => del ... D ... 285 .. 339 #mt211ref266-339 => 315 => ins ... C ... 266 .. 339 . # 309 => ins ... CC ... 266 .. 339 . # 291 => del ... D ... 266 .. 339 . # 290 => del ... D ... 266 .. 339 . my %oligo_region_hash=(0 => 0); my %hhash; my $oWkS = $oBook->{Worksheet}[0]; for(my $iR = $oWkS->{MinRow}+1 ; defined $oWkS->{MaxRow} && ($iR <= $oWkS->{MaxRow}) ; $iR++) { my $fragment_id = $oWkS->{Cells}[$iR][$oWkS->{MinCol}]; my $mutation_desc = $oWkS->{Cells}[$iR][$oWkS->{MinCol}+1]; my $frag_pos = $oWkS->{Cells}[$iR][$oWkS->{MinCol}+2]; my $mito_pos = $oWkS->{Cells}[$iR][$oWkS->{MinCol}+3]; my $insertion= $oWkS->{Cells}[$iR][$oWkS->{MinCol}+4]; my @array; #print $fragment_id->Value."\n"; @array= ($fragment_id->Value =~ m/(\d+)/g); my $start=$array[1]; my $stop=$array[2]; %oligo_region_hash=$self->_calc_oligo_region_hash($start, $stop, \%oligo_region_hash); my @mut_array=split("_",$mutation_desc->Value); #print "@mut_array\n"; push(@mut_array,'dummy'); my @pos_array; my @mut_pos=($mut_array[0] =~ m/(\d+)/g); my $mut_pos=$mut_pos[0]; my @res; my $i=0; my $length=@mut_array; #foreach my $item (@mut_array) { # print "$item\n"; #} foreach my $item (@mut_array) { my $test_write=1; $i++; if ($item eq 'dummy') { @array=(0); } else { @array= ($item =~ m/(\d+)/g); } #print @array." @array\n"; if (exists($frags{$fragment_id->Value}{$array[0]})) { $res[1]=$res[1].substr($item,-1); } else { if ($array[0] != $mut_pos or $i==$length) { #break(); $frags{$fragment_id->Value}{$mut_pos}=[@res]; $test_write=0; @res=(); } if ($i!=$length) { if ($item =~ /\./) { @res=('ins');} elsif (substr($item,-1) eq "D") {@res=('del')} else { @res=('sub');} push (@res, substr($item,-1), $start, $stop); $frags{$fragment_id->Value}{$array[0]}=(); } } $mut_pos=$array[0]; } } $self->{_oligos2calc_hash}=$self->_check_overlapping_regions(\%oligo_region_hash); return \%frags; } =head2 _calc_oligo_region_hash() Title : _calc_oligo_region_hash() Usage : private Function, dont call directly Function : Adds redundand fragment to hash of location of clusters of the Redundant Fragments Returns : oligo_region_hash, calculated so far Args : $start - start position of current fragment $stop - stop position of current fragment $oligo_region_hash (reference) - hash of cluster of oligo regions =cut sub _calc_oligo_region_hash() { my ($self, $start, $stop, $oligo_region_hash) = @_; my %hhash=%{$oligo_region_hash}; if (exists($oligo_region_hash->{0})) { delete($oligo_region_hash->{0}); $oligo_region_hash->{$start}=$stop; } else { my $test_new=1; foreach my $key (sort{$a<=>$b} keys %{$oligo_region_hash}) { if ($oligo_region_hash->{$key}>=$stop and $key<=$start) { $test_new=0; } elsif ($key <= $start and $oligo_region_hash->{$key}>= $start and $stop-1 >= $oligo_region_hash->{$key}) { $hhash{$key}=$stop; $test_new=0; } elsif ($oligo_region_hash->{$key}>=$stop and $key<=$stop and $start+1<=$key) { delete($hhash{$key}); $hhash{$start}=$oligo_region_hash->{$key}; $test_new=0; } ##both ends are outside the current elsif ($oligo_region_hash->{$key}<=$stop and $key>=$start) { $test_new=0; } } if ($test_new) { $oligo_region_hash->{$start}=$stop; } else { $oligo_region_hash=\%hhash; } } return %{$oligo_region_hash}; } =head2 _check_overlapping_regions() Title : _check_overlapping_regions() Usage : private Function, dont call directly Function : checks for overerlapping clusters Redundant Fragments and combines they to one if those are found Returns : (cleared) oligo_region_hash Args : $oligo_region_hash (reference) - hash of cluster of oligo regions =cut sub _check_overlapping_regions() { my ($self, $oligo_region_hash) = @_; my %hhash=%{$oligo_region_hash}; my $oldkey=0; my $oldvalue=0; foreach my $key (sort{$a<=>$b} keys %{$oligo_region_hash}) { if ($oldkey+1<=$key and $oldvalue>=$key and $oligo_region_hash->{$key}>=$oldvalue) { delete($hhash{$key}); $hhash{$oldkey}=$oligo_region_hash->{$key}; } $oldkey=$key; $oldvalue=$oligo_region_hash->{$key}; } return \%hhash; } 1; From bugzilla-daemon at portal.open-bio.org Mon Oct 15 11:42:13 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Mon, 15 Oct 2007 11:42:13 -0400 Subject: [Bioperl-guts-l] [Bug 2332] Software for analysis of redundant fragments of affys human mitochip v2 In-Reply-To: Message-ID: <200710151542.l9FFgDaT029414@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2332 ------- Comment #12 from cjfields at uiuc.edu 2007-10-15 11:42 EST ------- I have committed the modules to CVS. The test script works, but we need to pare down the data if possible so we don't incur too much overhead in tests (>3 MB for data files is a bit much). The tests also need specific conversion to Test::More: http://www.bioperl.org/wiki/HOWTO:Writing_BioPerl_Tests -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Mon Oct 15 12:43:18 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Mon, 15 Oct 2007 12:43:18 -0400 Subject: [Bioperl-guts-l] [Bug 2332] Software for analysis of redundant fragments of affys human mitochip v2 In-Reply-To: Message-ID: <200710151643.l9FGhI47000842@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2332 ------- Comment #13 from marian.thieme at lycos.de 2007-10-15 12:43 EST ------- Created an attachment (id=774) --> (http://bugzilla.open-bio.org/attachment.cgi?id=774&action=view) shorter Testdata. takes much less time, when testing the module -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bosborne at dev.open-bio.org Tue Oct 16 10:19:08 2007 From: bosborne at dev.open-bio.org (Brian Osborne) Date: Tue, 16 Oct 2007 14:19:08 +0000 Subject: [Bioperl-guts-l] bioperl-live/t PrimarySeq.t,1.26,1.27 Message-ID: <200710161419.l9GEJ8uu028339@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/t In directory dev.open-bio.org:/tmp/cvs-serv28330/t Modified Files: PrimarySeq.t Log Message: Check frame of 2, just for the sake of completeness Index: PrimarySeq.t =================================================================== RCS file: /home/repository/bioperl/bioperl-live/t/PrimarySeq.t,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** PrimarySeq.t 27 Jun 2007 10:16:37 -0000 1.26 --- PrimarySeq.t 16 Oct 2007 14:19:05 -0000 1.27 *************** *** 8,12 **** use BioperlTest; ! test_begin(-tests => 52); use_ok('Bio::PrimarySeq'); --- 8,12 ---- use BioperlTest; ! test_begin(-tests => 53); use_ok('Bio::PrimarySeq'); *************** *** 144,147 **** --- 144,150 ---- is $aa->seq, 'WWRQL' or diag("Translation: ". $aa->seq); + $aa = $seq->translate(-frame => 2); # GGT GGC GTC AAC TTA G + is $aa->seq, 'GGVNL' or diag("Translation: ". $aa->seq); + # TTG is initiator in Standard codon table? Afraid so. $seq->seq("ggggggttgtagcccc"); # ttg tag *************** *** 163,167 **** - # test for character '?' in the sequence string is $seq->seq('TTGGTGGCG?CAACT'), 'TTGGTGGCG?CAACT'; --- 166,169 ---- From lstein at dev.open-bio.org Tue Oct 16 15:28:24 2007 From: lstein at dev.open-bio.org (Lincoln Stein) Date: Tue, 16 Oct 2007 19:28:24 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/DB/SeqFeature Store.pm, 1.31, 1.32 Message-ID: <200710161928.l9GJSOfo028697@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/DB/SeqFeature In directory dev.open-bio.org:/tmp/cvs-serv28643/Bio/DB/SeqFeature Modified Files: Store.pm Log Message: all GFF and GFF3 stores now return the type of the feature in the information returned by search_notes() Index: Store.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/SeqFeature/Store.pm,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** Store.pm 24 Aug 2007 21:15:40 -0000 1.31 --- Store.pm 16 Oct 2007 19:28:22 -0000 1.32 *************** *** 1027,1031 **** column 2 The text of the note column 3 A relevance score. ! column 4 The unique ID of the feature NOTE: This search will fail to find features that do not have a display name! --- 1027,1032 ---- column 2 The text of the note column 3 A relevance score. ! column 4 The feature type ! column 5 The unique ID of the feature NOTE: This search will fail to find features that do not have a display name! *************** *** 1060,1063 **** --- 1061,1065 ---- column 2 The text of the note column 3 A relevance score. + column 4 The type NOTE: This is equivalent to $db-Esearch_attributes('full text search From lstein at dev.open-bio.org Tue Oct 16 15:28:23 2007 From: lstein at dev.open-bio.org (Lincoln Stein) Date: Tue, 16 Oct 2007 19:28:23 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/DB/GFF/Adaptor berkeleydb.pm, 1.29, 1.30 dbi.pm, 1.64, 1.65 memory.pm, 1.49, 1.50 Message-ID: <200710161928.l9GJSNxD028687@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/DB/GFF/Adaptor In directory dev.open-bio.org:/tmp/cvs-serv28643/Bio/DB/GFF/Adaptor Modified Files: berkeleydb.pm dbi.pm memory.pm Log Message: all GFF and GFF3 stores now return the type of the feature in the information returned by search_notes() Index: memory.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/GFF/Adaptor/memory.pm,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** memory.pm 16 Apr 2007 19:55:33 -0000 1.49 --- memory.pm 16 Oct 2007 19:28:21 -0000 1.50 *************** *** 266,270 **** } ! return \@found_segments; } --- 266,270 ---- } ! return \@found_segments; } *************** *** 296,305 **** my $featname = Bio::DB::GFF::Featname->new($feature->{gclass}=>$feature->{gname}); my $note; ! $note = join ' ',map {$_->[1]} grep {$_->[0] eq 'Note'} @{$feature->{attributes}}; ! $note .= join ' ',grep /$search/,map {$_->[1]} grep {$_->[0] ne 'Note'} @{$feature->{attributes}}; ! push @results,[$featname,$note,$relevance]; last if defined $limit && @results >= $limit; } ! #added result filtering so that this method returns the expected results #this section of code used to be in GBrowse's do_keyword_search method --- 296,306 ---- my $featname = Bio::DB::GFF::Featname->new($feature->{gclass}=>$feature->{gname}); my $note; ! $note = join ' ',map {$_->[1]} grep {$_->[0] eq 'Note'} @{$feature->{attributes}}; ! $note .= join ' ',grep /$search/,map {$_->[1]} grep {$_->[0] ne 'Note'} @{$feature->{attributes}}; ! my $type = Bio::DB::GFF::Typename->new($feature->{method},$feature->{source}); ! push @results,[$featname,$note,$relevance,$type]; last if defined $limit && @results >= $limit; } ! #added result filtering so that this method returns the expected results #this section of code used to be in GBrowse's do_keyword_search method Index: dbi.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/GFF/Adaptor/dbi.pm,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** dbi.pm 22 Apr 2007 17:08:41 -0000 1.64 --- dbi.pm 16 Oct 2007 19:28:21 -0000 1.65 *************** *** 796,799 **** --- 796,800 ---- column 2 The text of the note column 3 A relevance score. + column 4 A Bio::DB::GFF::Typename object =cut *************** *** 811,818 **** my $query = <dbh->do_query($query); my @results; ! while (my ($class,$name,$note) = $sth->fetchrow_array) { next unless $class && $name; # sorry, ignore NULL objects my @matches = $note =~ /($regex)/g; my $relevance = 10*@matches; my $featname = Bio::DB::GFF::Featname->new($class=>$name); ! push @results,[$featname,$note,$relevance]; last if $limit && @results >= $limit; } --- 823,833 ---- my $sth = $self->dbh->do_query($query); my @results; ! while (my ($class,$name,$note,$method,$source) = $sth->fetchrow_array) { next unless $class && $name; # sorry, ignore NULL objects my @matches = $note =~ /($regex)/g; my $relevance = 10*@matches; my $featname = Bio::DB::GFF::Featname->new($class=>$name); ! my $type = Bio::DB::GFF::Typename->new($method,$source); ! push @results,[$featname,$note,$relevance,$type]; last if $limit && @results >= $limit; } Index: berkeleydb.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/GFF/Adaptor/berkeleydb.pm,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** berkeleydb.pm 2 Aug 2007 03:35:15 -0000 1.29 --- berkeleydb.pm 16 Oct 2007 19:28:21 -0000 1.30 *************** *** 745,751 **** my $relevance = 10 * $matches; my $featname = Bio::DB::GFF::Featname->new($feature->{gclass}=>$feature->{gname}); my $note; $note = join ' ',map {$_->[1]} grep {$_->[0] eq 'Note'} @{$feature->{attributes}}; ! push @results,[$featname,$note,$relevance]; } --- 745,752 ---- my $relevance = 10 * $matches; my $featname = Bio::DB::GFF::Featname->new($feature->{gclass}=>$feature->{gname}); + my $type = Bio::DB::GFF::Typename->new($feature->{method}=>$feature->{source}); my $note; $note = join ' ',map {$_->[1]} grep {$_->[0] eq 'Note'} @{$feature->{attributes}}; ! push @results,[$featname,$note,$relevance,$type]; } From lstein at dev.open-bio.org Tue Oct 16 15:28:24 2007 From: lstein at dev.open-bio.org (Lincoln Stein) Date: Tue, 16 Oct 2007 19:28:24 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/Graphics FeatureBase.pm, 1.32, 1.33 FeatureFile.pm, 1.89, 1.90 Message-ID: <200710161928.l9GJSO3Z028707@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/Graphics In directory dev.open-bio.org:/tmp/cvs-serv28643/Bio/Graphics Modified Files: FeatureBase.pm FeatureFile.pm Log Message: all GFF and GFF3 stores now return the type of the feature in the information returned by search_notes() Index: FeatureFile.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/Graphics/FeatureFile.pm,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** FeatureFile.pm 6 Sep 2007 06:57:01 -0000 1.89 --- FeatureFile.pm 16 Oct 2007 19:28:22 -0000 1.90 *************** *** 1387,1393 **** my $n; $linkrule ||= ''; # prevent uninit warning $linkrule =~ s/\$(\w+)/ CGI::escape( ! $1 eq 'ref' ? (($n = $feature->location->seq_id) && "$n") || '' : $1 eq 'name' ? (($n = $feature->display_name) && "$n") || '' : $1 eq 'class' ? eval {$feature->class} || '' --- 1387,1394 ---- my $n; $linkrule ||= ''; # prevent uninit warning + my $seq_id = $feature->can('location') ? $feature->location->seq_id : $feature->seq_id; $linkrule =~ s/\$(\w+)/ CGI::escape( ! $1 eq 'ref' ? (($n = $seq_id) && "$n") || '' : $1 eq 'name' ? (($n = $feature->display_name) && "$n") || '' : $1 eq 'class' ? eval {$feature->class} || '' Index: FeatureBase.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/Graphics/FeatureBase.pm,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** FeatureBase.pm 6 Sep 2007 06:57:01 -0000 1.32 --- FeatureBase.pm 16 Oct 2007 19:28:22 -0000 1.33 *************** *** 58,62 **** } } ! sub feature_count { return scalar @{shift->{segments} || []} } --- 58,62 ---- } } ! sub is_remote { return } sub feature_count { return scalar @{shift->{segments} || []} } From lstein at dev.open-bio.org Tue Oct 16 15:28:24 2007 From: lstein at dev.open-bio.org (Lincoln Stein) Date: Tue, 16 Oct 2007 19:28:24 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/DB/SeqFeature/Store/DBI mysql.pm, 1.33, 1.34 Message-ID: <200710161928.l9GJSO0u028704@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/DB/SeqFeature/Store/DBI In directory dev.open-bio.org:/tmp/cvs-serv28643/Bio/DB/SeqFeature/Store/DBI Modified Files: mysql.pm Log Message: all GFF and GFF3 stores now return the type of the feature in the information returned by search_notes() Index: mysql.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/SeqFeature/Store/DBI/mysql.pm,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** mysql.pm 4 Oct 2007 19:03:21 -0000 1.33 --- mysql.pm 16 Oct 2007 19:28:22 -0000 1.34 *************** *** 829,832 **** --- 829,834 ---- my $attribute_table = $self->_attribute_table; my $attributelist_table = $self->_attributelist_table; + my $type_table = $self->_type_table; + my $typelist_table = $self->_typelist_table; my @tags = @$attribute_names; *************** *** 837,844 **** my $sql_regexp = join ' AND ',("a.attribute_value REGEXP ?") x @words; my $sql = <fetchrow_array) { my (@hits) = $value =~ /$perl_regexp/ig; my @words_in_row = split /\b/,$value; my $score = int(@hits*100/@words/@words_in_row); ! push @results,[$name,$value,$score,$id]; } $sth->finish; --- 855,863 ---- my @results; ! while (my($name,$value,$type,$id) = $sth->fetchrow_array) { my (@hits) = $value =~ /$perl_regexp/ig; my @words_in_row = split /\b/,$value; my $score = int(@hits*100/@words/@words_in_row); ! push @results,[$name,$value,$score,$type,$id]; } $sth->finish; From lstein at dev.open-bio.org Tue Oct 16 15:28:24 2007 From: lstein at dev.open-bio.org (Lincoln Stein) Date: Tue, 16 Oct 2007 19:28:24 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/DB/SeqFeature/Store berkeleydb.pm, 1.15, 1.16 memory.pm, 1.11, 1.12 Message-ID: <200710161928.l9GJSOSI028700@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/DB/SeqFeature/Store In directory dev.open-bio.org:/tmp/cvs-serv28643/Bio/DB/SeqFeature/Store Modified Files: berkeleydb.pm memory.pm Log Message: all GFF and GFF3 stores now return the type of the feature in the information returned by search_notes() Index: memory.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/SeqFeature/Store/memory.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** memory.pm 24 Aug 2007 21:15:40 -0000 1.11 --- memory.pm 16 Oct 2007 19:28:22 -0000 1.12 *************** *** 550,554 **** my $feature = $self->fetch($id); my $name = $feature->display_name or next; ! push @results,[$name,$note,$relevance,$id]; } --- 550,555 ---- my $feature = $self->fetch($id); my $name = $feature->display_name or next; ! my $type = $feature->type; ! push @results,[$name,$note,$relevance,$type,$id]; } Index: berkeleydb.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/SeqFeature/Store/berkeleydb.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** berkeleydb.pm 24 Aug 2007 21:15:40 -0000 1.15 --- berkeleydb.pm 16 Oct 2007 19:28:22 -0000 1.16 *************** *** 977,981 **** my $feature = $self->fetch($id) or next; my $name = $feature->display_name or next; ! push @results,[$name,$note,$relevance,$id]; } --- 977,982 ---- my $feature = $self->fetch($id) or next; my $name = $feature->display_name or next; ! my $type = $feature->type; ! push @results,[$name,$note,$relevance,$type,$id]; } From lstein at dev.open-bio.org Tue Oct 16 15:28:24 2007 From: lstein at dev.open-bio.org (Lincoln Stein) Date: Tue, 16 Oct 2007 19:28:24 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/DB/GFF/Adaptor/dbi mysql.pm, 1.67, 1.68 oracle.pm, 1.10, 1.11 pg_fts.pm, 1.6, 1.7 Message-ID: <200710161928.l9GJSO1L028692@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/DB/GFF/Adaptor/dbi In directory dev.open-bio.org:/tmp/cvs-serv28643/Bio/DB/GFF/Adaptor/dbi Modified Files: mysql.pm oracle.pm pg_fts.pm Log Message: all GFF and GFF3 stores now return the type of the feature in the information returned by search_notes() Index: oracle.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/GFF/Adaptor/dbi/oracle.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** oracle.pm 26 Sep 2006 22:03:06 -0000 1.10 --- oracle.pm 16 Oct 2007 19:28:21 -0000 1.11 *************** *** 859,862 **** --- 859,863 ---- column 2 The text of the note column 3 A relevance score. + column 4 A Bio::DB::GFF::Typename object =cut *************** *** 874,881 **** my $query = <new($class=>$name); ! push @results,[$featname,$note,$relevance]; last if $limit && @results >= $limit; } --- 891,896 ---- my $relevance = 10*@matches; my $featname = Bio::DB::GFF::Featname->new($class=>$name); ! my $type = Bio::DB::GFF::Typename->new($method,$source); ! push @results,[$featname,$note,$relevance,$type]; last if $limit && @results >= $limit; } Index: mysql.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/GFF/Adaptor/dbi/mysql.pm,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** mysql.pm 26 Sep 2006 22:03:06 -0000 1.67 --- mysql.pm 16 Oct 2007 19:28:21 -0000 1.68 *************** *** 86,93 **** use constant FULLTEXTSEARCH => < <dbh->do_query($query,$search_string,$search_string); my @results; ! while (my ($class,$name,$note,$relevance) = $sth->fetchrow_array) { next unless $class && $name; # sorry, ignore NULL objects $relevance = sprintf("%.2f",$relevance); # trim long floats my $featname = Bio::DB::GFF::Featname->new($class=>$name); ! push @results,[$featname,$note,$relevance]; } --- 409,418 ---- my $sth = $self->dbh->do_query($query,$search_string,$search_string); my @results; ! while (my ($class,$name,$note,$relevance,$method,$source) = $sth->fetchrow_array) { next unless $class && $name; # sorry, ignore NULL objects $relevance = sprintf("%.2f",$relevance); # trim long floats my $featname = Bio::DB::GFF::Featname->new($class=>$name); ! my $type = Bio::DB::GFF::Typename->new($method,$source); ! push @results,[$featname,$note,$relevance,$type]; } Index: pg_fts.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/GFF/Adaptor/dbi/pg_fts.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** pg_fts.pm 26 Sep 2006 22:03:06 -0000 1.6 --- pg_fts.pm 16 Oct 2007 19:28:21 -0000 1.7 *************** *** 142,149 **** use constant FULLTEXTSEARCH => < < < <fetchrow_array) { next unless $class && $name; # sorry, ignore NULL objects my $featname = Bio::DB::GFF::Featname->new($class=>$name); ! ! push @results,[$featname,$note,0]; #gbrowse expects a score, but ! #pg doesn't give one, thus the 0 } --- 215,225 ---- my @results; ! while (my ($class,$name,$note,$method,$source) = $sth->fetchrow_array) { next unless $class && $name; # sorry, ignore NULL objects my $featname = Bio::DB::GFF::Featname->new($class=>$name); ! my $type = Bio::DB::GFF::Typename->new($method,$source); ! push @results,[$featname,$note,0,$type]; #gbrowse expects a score, but ! #pg doesn't give one, thus the 0 } From lstein at dev.open-bio.org Tue Oct 16 21:22:31 2007 From: lstein at dev.open-bio.org (Lincoln Stein) Date: Wed, 17 Oct 2007 01:22:31 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/DB/GFF Segment.pm,1.32,1.33 Message-ID: <200710170122.l9H1MViE029110@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/DB/GFF In directory dev.open-bio.org:/tmp/cvs-serv29101/Bio/DB/GFF Modified Files: Segment.pm Log Message: squelched warning about empty sequence in Bio::DB::GFF::Feature->seq() call when no DNA has been attached Index: Segment.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/GFF/Segment.pm,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** Segment.pm 14 Jun 2007 14:16:11 -0000 1.32 --- Segment.pm 17 Oct 2007 01:22:29 -0000 1.33 *************** *** 309,312 **** --- 309,313 ---- my $dna = $self->dna; require Bio::PrimarySeq unless Bio::PrimarySeq->can('new'); + return Bio::PrimarySeq->new(-id => $self->display_name) unless $dna; return Bio::PrimarySeq->new(-seq => $dna, -id => $self->display_name); From lstein at dev.open-bio.org Tue Oct 16 21:31:34 2007 From: lstein at dev.open-bio.org (Lincoln Stein) Date: Wed, 17 Oct 2007 01:31:34 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/Graphics/Glyph dna.pm,1.31,1.32 Message-ID: <200710170131.l9H1VYlR029157@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/Graphics/Glyph In directory dev.open-bio.org:/tmp/cvs-serv29148/Bio/Graphics/Glyph Modified Files: dna.pm Log Message: accepted Danny Rice's proposed patch for improving performance and accuracy of %GC glyph Index: dna.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/Graphics/Glyph/dna.pm,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** dna.pm 24 Jul 2007 16:46:04 -0000 1.31 --- dna.pm 17 Oct 2007 01:31:32 -0000 1.32 *************** *** 100,141 **** $bin_size = 10 if $bin_size < 10; my $gc_window = $self->option('gc_window'); ! if ($gc_window && $gc_window eq 'auto' or $gc_window <= length($dna)) { ! $gc_window = length($dna)/100; } # Calculate the GC content... ! my @bins; ! my @datapoints; my $maxgc = -1000; my $mingc = +1000; - if ($gc_window) - { ! # ...using a sliding window... ! for (my $i=$gc_window/2; $i <= length($dna) - $gc_window/2; $i++) ! { ! my $subseq = substr($dna, $i-$gc_window/2, $gc_window); ! my $gc = $subseq =~ tr/gcGC/gcGC/; ! my $content = $gc / $gc_window; ! push @datapoints, $content; ! $maxgc = $content if ($content > $maxgc); ! $mingc = $content if ($content < $mingc); } ! push @datapoints, 0.5 unless @datapoints; my $scale = $maxgc - $mingc; $scale = 1 unless $scale; ! foreach (my $i; $i < @datapoints; $i++) ! { ! $datapoints[$i] = ($datapoints[$i] - $mingc) / $scale; ! } ! $maxgc = int($maxgc * 100); ! $mingc = int($mingc * 100); ! } ! else ! { ! # ...or a fixed number of bins. for (my $i = 0; $i < length($dna) - $bin_size; $i+= $bin_size) { --- 100,152 ---- $bin_size = 10 if $bin_size < 10; my $gc_window = $self->option('gc_window'); ! # if ($gc_window && $gc_window eq 'auto' or $gc_window <= length($dna)) { ! if ($gc_window) { ! if ($gc_window eq 'auto') { ! $gc_window = length($dna)/100; ! } elsif ($gc_window > length($dna)) { ! $gc_window = length($dna); ! } } # Calculate the GC content... ! my (@bins, @datapoints, $i); ! my $gc = 0; my $maxgc = -1000; my $mingc = +1000; ! if ($gc_window) { # ...using a sliding window... ! ! my @dna = split '', $dna; ! for ($i = 0; $i < @dna; $i++) { ! if ($dna[$i] eq 'G' or $dna[$i] eq 'C' or $dna[$i] eq 'g' or $dna[$i] eq 'c') { ! $dna[$i] = 1; ! } else { ! $dna[$i] = 0; } ! } ! ! for ($i = 0; $i < $gc_window; $i++) {$gc += $dna[$i]} ! ! push @datapoints, $gc; ! $datapoints[$#datapoints] > $maxgc and $maxgc = $datapoints[$#datapoints]; ! $datapoints[$#datapoints] < $mingc and $mingc = $datapoints[$#datapoints]; ! for ($i = 0; $i < @dna - $gc_window; $i++) { ! $gc -= $dna[$i]; ! $gc += $dna[$i + $gc_window]; ! push @datapoints, $gc; ! $datapoints[$#datapoints] > $maxgc and $maxgc = $datapoints[$#datapoints]; ! $datapoints[$#datapoints] < $mingc and $mingc = $datapoints[$#datapoints]; ! } my $scale = $maxgc - $mingc; $scale = 1 unless $scale; ! for ($i = 0; $i < @datapoints; $i++) { ! $datapoints[$i] = ($datapoints[$i] - $mingc) / $scale; ! } ! $maxgc = int($maxgc * 100 / $gc_window); ! $mingc = int($mingc * 100 / $gc_window); ! } else { # ...or a fixed number of bins. for (my $i = 0; $i < length($dna) - $bin_size; $i+= $bin_size) { *************** *** 159,163 **** # Calculate values that will be used in the layout ! push @bins,0.5 unless @bins; # avoid div by zero my $bin_width = ($x2-$x1)/@bins; --- 170,174 ---- # Calculate values that will be used in the layout ! push @bins,0.5 unless @bins; # avoid div by zero my $bin_width = ($x2-$x1)/@bins; *************** *** 192,211 **** # Draw the GC content graph itself ! if ($gc_window) ! { my $graphwidth = $x2 - $x1; ! my $scale = $graphwidth / @datapoints; ! my $gc_window_width = $gc_window/2 * $self->panel->scale; ! for (my $i = 1; $i < @datapoints; $i++) ! { ! my $x = $i + $gc_window_width; ! my $xlo = $x1 + ($x - 1) * $scale; ! my $xhi = $x1 + $x * $scale; ! last if $xhi >= $self->panel->right-$gc_window_width; ! my $y = $y2 - ($bin_height*$datapoints[$i]); ! $gd->line($xlo, $y2 - ($bin_height*$datapoints[$i-1]), ! $xhi, $y, ! $fgcolor); ! } } else --- 203,235 ---- # Draw the GC content graph itself ! if ($gc_window) { ! my $graphwidth = $x2 - $x1; ! ! # the $points_to_draw variable here can be used in various ways to adjust the ! # sampling of the graphic output. It could be converted to a glphy ! # option that can be set by user. Here we are just using $graphwidth ! ! # my $points_to_draw = 1800; ! my $points_to_draw = $graphwidth; ! ! # if $points_to_draw is taken to mean the total number of points to show along the graph then ! my $inc = int (length($dna) / $points_to_draw) + 1; ! # it might be useful to set this to the x pixel resolution of your ! # screen or the "default width" option in the gbrowse config file or current pixel width ! ! # if $points_to_draw is taken to mean the number of points per $gc_window length then ! # my $inc = int ($gc_window / $points_to_draw) + 1; ! ! my $gc_window_width = $gc_window * $self->panel->scale; # pixels for the gc_window length ! my $scale = ($graphwidth - $gc_window_width) / @datapoints; ! for ($i = $inc; $i < @datapoints; $i += $inc) { ! my $x = $i + $gc_window / 2; # the base at the center of the gc_window ! my $xlo = $x1 + ($x - $inc) * $scale; # pixel coordinate for previous point ! my $xhi = $x1 + $x * $scale; ! $gd->line($xlo, $y2 - ($bin_height * $datapoints[$i-$inc]), ! $xhi, $y2 - ($bin_height * $datapoints[$i]), ! $fgcolor); ! } } else From cjfields at dev.open-bio.org Wed Oct 17 23:34:56 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Thu, 18 Oct 2007 03:34:56 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/DB EUtilities.pm, 1.44, 1.45 EUtilParameters.pm, 1.7, 1.8 Message-ID: <200710180334.l9I3YuQ4002333@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/DB In directory dev.open-bio.org:/tmp/cvs-serv2304/Bio/DB Modified Files: EUtilities.pm EUtilParameters.pm Log Message: some tweaks Index: EUtilParameters.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/EUtilParameters.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** EUtilParameters.pm 20 Aug 2007 01:01:45 -0000 1.7 --- EUtilParameters.pm 18 Oct 2007 03:34:53 -0000 1.8 *************** *** 190,193 **** --- 190,194 ---- -methods => [@PARAMS, qw(eutil history correspondence id_file)]); $self->eutil() || $self->eutil('efetch'); + $self->tool() || $self->tool('bioperl'); # set default retmode if not explicitly set $self->set_default_retmode if (!$retmode); Index: EUtilities.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/EUtilities.pm,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** EUtilities.pm 20 Aug 2007 01:01:45 -0000 1.44 --- EUtilities.pm 18 Oct 2007 03:34:53 -0000 1.45 *************** *** 24,28 **** =head1 DESCRIPTION ! ...To be added! =head1 FEEDBACK --- 24,29 ---- =head1 DESCRIPTION ! This is a general webagent which posts and retrieves data to NCBI's eUtilities ! service using their CGI interface. =head1 FEEDBACK *************** *** 185,189 **** Title : get_Parser Usage : $agent->get_Parser; ! Function: Parse HTTP::Response content/file/fh using defined parser Returns : The Bio::Tools::EUtilities parser used to parse the HTTP::Response content --- 186,190 ---- Title : get_Parser Usage : $agent->get_Parser; ! Function: Retrieve the parser used for last agent request Returns : The Bio::Tools::EUtilities parser used to parse the HTTP::Response content From bugzilla-daemon at portal.open-bio.org Thu Oct 18 10:49:32 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Thu, 18 Oct 2007 10:49:32 -0400 Subject: [Bioperl-guts-l] [Bug 2383] New: missing XML::DOM::Document error Message-ID: http://bugzilla.open-bio.org/show_bug.cgi?id=2383 Summary: missing XML::DOM::Document error Product: BioPerl Version: 1.5 branch Platform: PC OS/Version: Linux Status: NEW Severity: blocker Priority: P2 Component: Bio::SeqIO AssignedTo: bioperl-guts-l at bioperl.org ReportedBy: filippobernante at yahoo.com 'use XML::DOM::XPath' should be added in Bio::SeqIO::interpro. Package XML::DOM::Document, required by 'findnodes()' function, is there and is missing in the interpro.pm package. -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Thu Oct 18 10:58:58 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Thu, 18 Oct 2007 10:58:58 -0400 Subject: [Bioperl-guts-l] [Bug 2383] missing XML::DOM::Document error In-Reply-To: Message-ID: <200710181458.l9IEwwiQ004087@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2383 cjfields at uiuc.edu changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Comment #1 from cjfields at uiuc.edu 2007-10-18 10:58 EST ------- Make sure to always check against bioperl-live via CVS. This has already been committed. -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Thu Oct 18 16:53:15 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Thu, 18 Oct 2007 16:53:15 -0400 Subject: [Bioperl-guts-l] [Bug 2384] New: Segmentation Fault in Bio::Tools::dpAlign::pairwise_alignment_score Message-ID: http://bugzilla.open-bio.org/show_bug.cgi?id=2384 Summary: Segmentation Fault in Bio::Tools::dpAlign::pairwise_alignment_score Product: BioPerl Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: blocker Priority: P2 Component: bioperl-ext AssignedTo: bioperl-guts-l at bioperl.org ReportedBy: florent.angly at gmail.com Some sequences produce an segmentation fault in the external dpAlign C code. I have isolated 2 sequences that produce the bug to happen. If the query sequence (that makes the profile) and target sequence are interverted, the score is calculated without problems. -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Thu Oct 18 16:54:09 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Thu, 18 Oct 2007 16:54:09 -0400 Subject: [Bioperl-guts-l] [Bug 2384] Segmentation Fault in Bio::Tools::dpAlign::pairwise_alignment_score In-Reply-To: Message-ID: <200710182054.l9IKs96F021748@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2384 ------- Comment #1 from florent.angly at gmail.com 2007-10-18 16:54 EST ------- Created an attachment (id=775) --> (http://bugzilla.open-bio.org/attachment.cgi?id=775&action=view) Script to reproduce the crash -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Thu Oct 18 16:54:44 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Thu, 18 Oct 2007 16:54:44 -0400 Subject: [Bioperl-guts-l] [Bug 2384] Segmentation Fault in Bio::Tools::dpAlign::pairwise_alignment_score In-Reply-To: Message-ID: <200710182054.l9IKsi18021794@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2384 ------- Comment #2 from florent.angly at gmail.com 2007-10-18 16:54 EST ------- Created an attachment (id=776) --> (http://bugzilla.open-bio.org/attachment.cgi?id=776&action=view) Backtrace produced by GDB -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Thu Oct 18 18:57:39 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Thu, 18 Oct 2007 18:57:39 -0400 Subject: [Bioperl-guts-l] [Bug 2384] Segmentation Fault in Bio::Tools::dpAlign::pairwise_alignment_score In-Reply-To: Message-ID: <200710182257.l9IMvd1l028885@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2384 florent.angly at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #775 is|0 |1 obsolete| | ------- Comment #3 from florent.angly at gmail.com 2007-10-18 18:57 EST ------- Created an attachment (id=777) --> (http://bugzilla.open-bio.org/attachment.cgi?id=777&action=view) Script to reproduce the crash -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Thu Oct 18 21:57:33 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Thu, 18 Oct 2007 21:57:33 -0400 Subject: [Bioperl-guts-l] [Bug 2385] New: Bio::Align::PairwiseStatistics::score_nuc method Message-ID: http://bugzilla.open-bio.org/show_bug.cgi?id=2385 Summary: Bio::Align::PairwiseStatistics::score_nuc method Product: BioPerl Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: enhancement Priority: P2 Component: Core Components AssignedTo: bioperl-guts-l at bioperl.org ReportedBy: florent.angly at gmail.com I needed a function to simply calculate the score of an existing alignment between 2 nucleic acid sequences. After looking around, I did not really find anything that did the job, and so did it myself. I figured the Bio::Align::PairwiseStatistics Perl module would be the right place to put the method in. -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Thu Oct 18 21:58:36 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Thu, 18 Oct 2007 21:58:36 -0400 Subject: [Bioperl-guts-l] [Bug 2385] Bio::Align::PairwiseStatistics::score_nuc method In-Reply-To: Message-ID: <200710190158.l9J1wanG005141@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2385 ------- Comment #1 from florent.angly at gmail.com 2007-10-18 21:58 EST ------- Created an attachment (id=778) --> (http://bugzilla.open-bio.org/attachment.cgi?id=778&action=view) The score_nuc method -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Thu Oct 18 21:59:17 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Thu, 18 Oct 2007 21:59:17 -0400 Subject: [Bioperl-guts-l] [Bug 2385] Bio::Align::PairwiseStatistics::score_nuc method In-Reply-To: Message-ID: <200710190159.l9J1xHAT005217@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2385 ------- Comment #2 from florent.angly at gmail.com 2007-10-18 21:59 EST ------- Created an attachment (id=779) --> (http://bugzilla.open-bio.org/attachment.cgi?id=779&action=view) The test file -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Mon Oct 22 21:30:56 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Mon, 22 Oct 2007 21:30:56 -0400 Subject: [Bioperl-guts-l] [Bug 2387] New: connect not allowed with PostgreSQL ident-based authentication Message-ID: http://bugzilla.open-bio.org/show_bug.cgi?id=2387 Summary: connect not allowed with PostgreSQL ident-based authentication Product: BioPerl Version: main-trunk Platform: PC OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: bioperl-db AssignedTo: bioperl-guts-l at bioperl.org ReportedBy: er at xs4all.nl ( using bioperl-live, bioperl-db - latest CVS version ) While trying bioperl-live/scripts/DB/biogetseq.PLS I noticed it doesn't let the user connect (and emits 'uninitialized value' messages) when that user is using postgres' ident-based-authentication. It is easily remedied by only using the entries from .~/.bioinformatics/seqdatabase.ini that are actually there. Two patches for bioperl-db: bioperl-db/Bio/DB/BioSQL/OBDA.pm bioperl-db/Bio/DB/DBI/base.pm to make 'ident-based' connect possible (and to prevent 'uninitialised value' messages) see also: http://www.postgresql.org/docs/current/static/auth-methods.html#AUTH-IDENT -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Mon Oct 22 21:36:09 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Mon, 22 Oct 2007 21:36:09 -0400 Subject: [Bioperl-guts-l] [Bug 2387] connect not allowed with PostgreSQL ident-based authentication In-Reply-To: Message-ID: <200710230136.l9N1a9rZ007202@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2387 ------- Comment #1 from er at xs4all.nl 2007-10-22 21:36 EST ------- Created an attachment (id=780) --> (http://bugzilla.open-bio.org/attachment.cgi?id=780&action=view) allow postgresql ident-based authentication allow postgresql ident-based authentication (only read $conf{'location'} in configuration file if it is actually defined) -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Mon Oct 22 21:40:32 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Mon, 22 Oct 2007 21:40:32 -0400 Subject: [Bioperl-guts-l] [Bug 2387] connect not allowed with PostgreSQL ident-based authentication In-Reply-To: Message-ID: <200710230140.l9N1eWrq007456@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2387 ------- Comment #2 from er at xs4all.nl 2007-10-22 21:40 EST ------- Created an attachment (id=781) --> (http://bugzilla.open-bio.org/attachment.cgi?id=781&action=view) postgres ident-based authentication - allow undef username allow postgresql ident-based authentication (username must be allowed to be undef) -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Mon Oct 22 22:00:25 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Mon, 22 Oct 2007 22:00:25 -0400 Subject: [Bioperl-guts-l] [Bug 2387] connect not allowed with PostgreSQL ident-based authentication In-Reply-To: Message-ID: <200710230200.l9N20PI3008571@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2387 er at xs4all.nl changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Mon Oct 22 22:12:34 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Mon, 22 Oct 2007 22:12:34 -0400 Subject: [Bioperl-guts-l] [Bug 2387] connect emits 'uninitialied value' messages with PostgreSQL ident-based authentication In-Reply-To: Message-ID: <200710230212.l9N2CYe5009977@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2387 er at xs4all.nl changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|connect not allowed with |connect emits 'uninitialied |PostgreSQL ident-based |value' messages with |authentication |PostgreSQL ident-based | |authentication ------- Comment #3 from er at xs4all.nl 2007-10-22 22:12 EST ------- It seems I was mistaken about the ident-based connect being prevented; in fact, the connect goes through but with 'uninitialised value' messages. The patches will prevent these. severity: normal. -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Tue Oct 23 05:41:18 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 23 Oct 2007 05:41:18 -0400 Subject: [Bioperl-guts-l] [Bug 2074] bioperl-ext: make test fails using io_lib v. 1.9 or higher In-Reply-To: Message-ID: <200710230941.l9N9fILb001794@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2074 ------- Comment #8 from J_Martin at lbl.gov 2007-10-23 05:41 EST ------- Created an attachment (id=782) --> (http://bugzilla.open-bio.org/attachment.cgi?id=782&action=view) Changes Inline::C to just an xs module that installs into arch tree -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Tue Oct 23 05:42:59 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 23 Oct 2007 05:42:59 -0400 Subject: [Bioperl-guts-l] [Bug 2074] bioperl-ext: make test fails using io_lib v. 1.9 or higher In-Reply-To: Message-ID: <200710230942.l9N9gxCc001994@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2074 J_Martin at lbl.gov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |J_Martin at lbl.gov ------- Comment #9 from J_Martin at lbl.gov 2007-10-23 05:42 EST ------- (In reply to comment #8) > Created an attachment (id=782) --> (http://bugzilla.open-bio.org/attachment.cgi?id=782&action=view) [details] > Changes Inline::C to just an xs module that installs into arch tree > I thought that would eat my comments... and it did. Attached is a version unchanged except ... It doesn't use Inline::C, it's a standard xs module and the module gets installed into the architecture dependent tree ( I was having trouble installing the Inline version into a multi-architecture perl tree ). The Makefile.PL will use stadens io_lib-configure if it can find it, then try the environment variables, then try the wild guessing from previous Makefile.PL The include "read.h" is changed to include "io_lib/Read.h" as I didn't see a version of staden that's set up differently. This passes all tests with io_lib-1.11.0b3 and io_lib-1.8.11 ( after copying stadens config.h, os.h to stadens *INSTALLDIR*/include/io_lib for the older version ). But we haven't put it into production yet so maybe it will have problems with the newer staden libraries. -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Tue Oct 23 11:49:31 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 23 Oct 2007 11:49:31 -0400 Subject: [Bioperl-guts-l] [Bug 2219] Bio::Tree - Trees generated from subtrees contain extraneous branchlength information In-Reply-To: Message-ID: <200710231549.l9NFnV9e026246@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2219 cjfields at uiuc.edu changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX ------- Comment #9 from cjfields at uiuc.edu 2007-10-23 11:49 EST ------- Closing out per discussion in the report. -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From cjfields at dev.open-bio.org Tue Oct 23 12:09:52 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Tue, 23 Oct 2007 16:09:52 +0000 Subject: [Bioperl-guts-l] bioperl-live/t/data/dbqual - New directory Message-ID: <200710231609.l9NG9qAM027533@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/t/data/dbqual In directory dev.open-bio.org:/tmp/cvs-serv27506/t/data/dbqual Log Message: Directory /home/repository/bioperl/bioperl-live/t/data/dbqual added to the repository From cjfields at dev.open-bio.org Tue Oct 23 12:11:45 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Tue, 23 Oct 2007 16:11:45 +0000 Subject: [Bioperl-guts-l] bioperl-live/t DBQual.t,NONE,1.1 Message-ID: <200710231611.l9NGBj5x027667@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/t In directory dev.open-bio.org:/tmp/cvs-serv27626/t Added Files: DBQual.t Log Message: bug 2367 --- NEW FILE: DBQual.t --- BEGIN { use lib 't/lib'; use BioperlTest; test_begin( -tests => 38, -requires_module => 'Bio::DB::Qual'); use_ok('Bio::Root::IO'); use_ok('File::Copy'); } my $DEBUG = test_debug(); # this obfuscation is to deal with lockfiles by GDBM_File which can # only be created on local filesystems apparently so will cause test # to block and then fail when the testdir is on an NFS mounted system my $io = Bio::Root::IO->new(-verbose => $DEBUG); my $tempdir = $io->tempdir('CLEANUP' => 1); my $test_dbdir = $io->catfile($tempdir, 'dbqual'); mkdir($test_dbdir); # make the directory my $indir = test_input_file('dbqual'); opendir(INDIR,$indir) || die("cannot open dir $indir"); # effectively do a cp -r but only copy the files that are in there, no subdirs for my $file ( map { $io->catfile($indir,$_) } readdir(INDIR) ) { next unless (-f $file ); copy($file, $test_dbdir); } closedir(INDIR); # now use this temporary dir for the db file my $db = Bio::DB::Qual->new($test_dbdir, -reindex => 1); ok($db); my @ids = $db->ids; is(scalar(@ids), 15); @ids = sort {$a <=> $b} @ids; is($ids[0], '17601976'); is($ids[14], '17601991'); my $seqid = '17601979'; # direct indexed qual file database access is(ref($db->qual($seqid)), 'ARRAY'); is($db->length($seqid), 14); is($db->length($seqid.':3,12'), 10); is($db->length($seqid, -1000, 1000), 14); ok($db->header($seqid)); # the bioperl way my $obj = $db->get_Qual_by_id($seqid); ok(!defined $db->get_Qual_by_id('foobarbaz')); isa_ok($obj, 'Bio::Seq::PrimaryQual'); is(ref($obj->qual($seqid)), 'ARRAY'); is($obj->length, 14); ok($obj->id); ok($obj->display_id); ok($obj->accession_number); ok($obj->primary_id); is($obj->validate_qual($obj, (join ' ', @{$obj->qual($seqid)})), 1); is($obj->translate, 0); is($obj->qualat(12), 31); ok(!defined($obj->header)); ok(!defined($obj->desc)); my $truncobj = $obj->trunc(1,3); isa_ok($truncobj, 'Bio::Seq::PrimaryQual'); is(ref($truncobj->qual($seqid)), 'ARRAY'); is($truncobj->length, 3); my $revobj = $obj->revcom; isa_ok($revobj, 'Bio::Seq::PrimaryQual'); is(ref($revobj->qual), 'ARRAY'); is($revobj->length, 14); undef $obj; undef $truncobj; undef $revobj; # using get_PrimaryQual_stream streaming my $stream = $db->get_PrimaryQual_stream; ok($stream); my $streamqual = $stream->next_seq; isa_ok($streamqual, 'Bio::Seq::PrimaryQual'); # using newFh streaming my $fh = Bio::DB::Qual->newFh($test_dbdir); ok($fh); my $fhqual = <$fh>; isa_ok($fhqual, 'Bio::Seq::PrimaryQual'); undef $fh; # tied-hash access my (%h,$dna1,$dna2); ok(tie(%h,'Bio::DB::Qual',$test_dbdir)); ok($h{$seqid}); ok($dna1 = $h{"$seqid:1,10"}); ok($dna2 = $h{"$seqid:10,1"}); From cjfields at dev.open-bio.org Tue Oct 23 12:11:46 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Tue, 23 Oct 2007 16:11:46 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/DB Qual.pm,NONE,1.1 Message-ID: <200710231611.l9NGBk1Z027671@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/DB In directory dev.open-bio.org:/tmp/cvs-serv27626/Bio/DB Added Files: Qual.pm Log Message: bug 2367 --- NEW FILE: Qual.pm --- # # $Id: Qual.pm,v 1.23 2007/06/14 14:16:10 sendu Exp $ # # BioPerl module for Bio::DB::Qual # # You may distribute this module under the same terms as perl itself # # POD documentation - main docs before the code =head1 NAME Bio::DB::Qual -- Fast indexed access to a directory of quality files =head1 SYNOPSIS use Bio::DB::Qual; # create database from directory of qual files [...1162 lines suppressed...] } my $value = $db->get_Qual_by_id($key); $self->{key} = $db->NEXTKEY($key); $value; } sub TIEHANDLE { my ($class, $db) = @_; return $class->new($db); } sub READLINE { my $self = shift; $self->next_seq; } 1; __END__ From cjfields at dev.open-bio.org Tue Oct 23 12:11:46 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Tue, 23 Oct 2007 16:11:46 +0000 Subject: [Bioperl-guts-l] bioperl-live/t/data/dbqual 1.qual, NONE, 1.1 3.qual, NONE, 1.1 2.qual, NONE, 1.1 Message-ID: <200710231611.l9NGBkgA027675@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/t/data/dbqual In directory dev.open-bio.org:/tmp/cvs-serv27626/t/data/dbqual Added Files: 1.qual 3.qual 2.qual Log Message: bug 2367 --- NEW FILE: 2.qual --- >17601981 27 31 25 27 18 28 33 25 27 27 28 28 27 28 28 28 27 27 27 24 33 26 32 26 23 27 28 32 24 20 27 26 24 27 26 27 28 18 28 26 27 31 22 33 26 25 27 28 18 27 26 27 26 21 27 30 25 4 27 28 27 28 28 28 27 27 28 26 28 28 33 25 26 31 23 31 23 28 19 32 25 27 26 27 27 26 27 27 17 24 28 28 28 25 28 >17601982 25 27 25 32 24 33 25 25 33 25 24 25 33 28 9 28 18 27 28 27 28 26 31 23 27 27 26 27 31 22 28 24 26 27 28 26 28 27 27 25 33 26 28 23 28 28 27 25 28 28 35 31 13 33 25 27 25 27 26 27 35 30 13 28 26 28 25 28 27 32 24 28 28 26 27 28 26 26 28 27 23 23 33 25 28 26 27 28 18 27 33 25 >17601983 28 36 32 20 9 28 31 25 26 27 25 27 27 27 27 28 25 33 25 26 23 31 23 28 27 27 27 27 26 28 29 19 32 24 28 27 27 27 28 33 25 19 26 27 27 27 27 33 25 27 19 33 25 27 27 27 27 28 27 14 33 26 25 27 26 27 28 18 22 23 11 28 28 27 28 26 20 32 24 28 25 27 21 28 24 31 22 27 27 36 32 20 8 29 19 25 27 28 21 23 23 >17601984 24 28 20 17 27 22 23 36 32 19 7 25 28 26 30 21 23 27 33 25 25 33 25 27 23 36 32 20 8 27 27 28 26 28 28 35 31 15 18 24 27 27 26 34 29 11 26 31 22 31 22 32 24 35 31 14 26 24 21 24 20 25 23 24 28 27 30 24 2 36 32 21 12 2 27 27 32 25 31 25 27 28 32 25 21 8 28 22 26 33 29 10 31 22 28 24 26 34 30 11 26 28 19 27 28 36 32 20 8 28 31 22 >17601985 23 32 24 26 27 25 28 26 26 31 22 27 28 33 25 31 23 27 27 27 28 27 28 27 26 27 26 27 27 27 33 25 27 27 28 28 26 24 32 24 27 28 27 27 27 25 27 33 25 28 27 31 22 31 23 28 28 27 26 27 27 27 32 24 27 27 32 24 28 28 28 34 30 16 1 33 25 32 24 28 26 32 24 27 24 28 27 36 32 22 13 5 20 7 19 33 25 11 27 17 27 --- NEW FILE: 3.qual --- >17601986 25 27 27 28 27 27 31 22 28 27 28 29 19 26 15 27 28 24 27 32 24 27 33 28 9 28 28 27 27 27 26 28 28 34 30 12 27 27 28 28 33 25 27 27 28 26 26 33 28 9 27 27 32 24 33 25 27 27 27 26 32 24 27 27 26 28 28 28 32 24 33 25 27 26 26 27 31 23 28 28 28 27 27 27 28 28 28 28 >17601987 27 27 25 28 27 21 28 27 21 25 25 31 23 26 28 28 33 28 9 27 28 25 27 19 25 28 27 27 28 28 26 24 23 33 26 27 27 32 24 32 26 22 28 20 26 23 28 27 28 25 27 27 26 35 31 16 32 24 17 28 24 28 30 21 27 22 28 22 25 28 23 36 32 20 7 23 18 27 34 30 16 25 30 25 3 18 22 6 19 27 23 12 26 30 25 3 >17601988 36 32 20 8 27 35 31 16 >17601989 29 11 33 29 10 36 32 20 7 24 27 34 30 12 31 23 27 27 27 27 32 24 27 27 25 28 27 27 28 27 28 28 31 23 27 28 25 27 31 22 27 26 32 24 26 27 32 24 27 22 27 27 26 32 23 27 28 28 33 29 10 28 26 27 28 27 26 28 18 28 28 34 30 12 27 27 28 28 20 27 35 31 15 34 30 12 27 34 30 12 24 33 25 31 22 28 32 24 28 27 17 27 >17601990 27 16 25 27 27 17 28 17 27 33 28 9 27 28 27 33 25 25 31 22 34 30 12 19 23 26 31 22 28 27 27 28 30 21 25 14 27 29 20 35 32 19 6 31 23 27 33 26 28 23 28 33 26 27 27 32 26 27 32 24 33 26 28 24 25 27 27 32 25 28 27 28 28 27 36 32 20 8 28 16 26 28 27 35 31 15 27 28 27 27 33 25 26 32 24 26 36 32 21 9 27 33 26 15 32 24 27 27 28 31 22 24 >17601991 28 27 35 31 18 4 26 35 31 15 27 34 30 12 28 25 27 28 28 28 32 26 34 30 12 26 22 26 28 26 27 28 28 27 30 21 27 33 25 27 33 28 9 28 25 14 27 33 25 28 27 35 31 14 27 25 27 32 24 27 35 31 14 27 28 28 28 27 26 28 33 25 27 24 27 28 28 27 28 21 28 33 26 28 25 33 26 27 33 26 27 32 25 28 33 26 28 27 28 32 24 34 30 16 27 26 27 28 27 28 33 25 27 --- NEW FILE: 1.qual --- >17601976 27 27 28 32 24 33 25 27 25 26 28 28 26 27 27 32 24 29 19 28 27 28 28 28 28 28 24 28 27 27 32 24 27 27 28 27 28 27 28 27 27 28 33 25 28 28 27 28 28 28 28 28 27 26 31 22 28 28 26 26 32 23 28 24 27 27 25 28 28 27 28 28 26 27 26 26 32 24 29 19 27 33 25 28 27 27 27 33 25 28 >17601977 28 26 23 27 30 21 28 28 28 28 27 23 35 31 15 27 32 26 24 22 25 33 26 27 25 22 27 27 28 28 27 31 22 23 25 31 23 30 21 28 23 27 27 31 22 19 28 23 12 25 34 30 12 27 20 28 28 33 25 28 22 32 24 26 31 22 20 26 25 36 32 19 7 22 26 26 25 28 33 25 25 14 32 27 8 27 17 28 29 19 27 28 33 25 >17601978 24 27 27 27 27 27 28 30 20 28 27 31 22 32 24 27 26 28 35 31 14 26 33 26 28 33 25 26 27 26 27 28 30 21 28 27 27 33 28 9 33 25 35 31 14 33 28 9 35 31 14 25 23 35 30 12 27 25 25 35 30 12 27 18 27 33 25 33 25 34 30 16 27 31 25 27 36 32 21 9 34 30 12 28 7 28 28 36 32 22 14 6 30 21 10 26 25 32 24 25 18 28 32 23 33 26 19 27 31 25 27 >17601979 23 32 24 27 26 27 27 27 28 23 28 31 23 27 From bugzilla-daemon at portal.open-bio.org Tue Oct 23 12:12:34 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 23 Oct 2007 12:12:34 -0400 Subject: [Bioperl-guts-l] [Bug 2367] Bio::DB::Qual In-Reply-To: Message-ID: <200710231612.l9NGCYgo028030@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2367 cjfields at uiuc.edu changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #6 from cjfields at uiuc.edu 2007-10-23 12:12 EST ------- All tests pass; committed to CVS. Thanks! -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From cjfields at dev.open-bio.org Tue Oct 23 12:19:01 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Tue, 23 Oct 2007 16:19:01 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/SeqIO qual.pm,1.34,1.35 Message-ID: <200710231619.l9NGJ15u027911@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/SeqIO In directory dev.open-bio.org:/tmp/cvs-serv27884/Bio/SeqIO Modified Files: qual.pm Log Message: bug 2368 Index: qual.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/SeqIO/qual.pm,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** qual.pm 14 Jun 2007 14:16:17 -0000 1.34 --- qual.pm 23 Oct 2007 16:18:59 -0000 1.35 *************** *** 184,193 **** Title : write_seq Usage : $obj->write_seq( -source => $source, ! -header => "some information"); Function: Write out a list of quality values to a fasta-style file. Returns : Nothing. Args : Requires a reference to a Bio::Seq::Quality object or a ! PrimaryQual object as the -source. Optional: information ! for the header. Notes : If no -header is provided, $obj->id() will be used where $obj is a reference to either a Quality object or a --- 184,195 ---- Title : write_seq Usage : $obj->write_seq( -source => $source, ! -header => "some information" ! -oneline => 0); Function: Write out a list of quality values to a fasta-style file. Returns : Nothing. Args : Requires a reference to a Bio::Seq::Quality object or a ! PrimaryQual object as the -source. Option 1: information ! for the header. Option 2: whether the quality score should be ! on a single line or not Notes : If no -header is provided, $obj->id() will be used where $obj is a reference to either a Quality object or a *************** *** 202,206 **** sub write_seq { my ($self, at args) = @_; ! my ($source) = $self->_rearrange([qw(SOURCE HEADER)], @args); if (!$source || ( !$source->isa('Bio::Seq::Quality') && !$source->isa('Bio::Seq::PrimaryQual') )) { --- 204,208 ---- sub write_seq { my ($self, at args) = @_; ! my ($source, $head, $oneline) = $self->_rearrange([qw(SOURCE HEADER ONELINE)], @args); if (!$source || ( !$source->isa('Bio::Seq::Quality') && !$source->isa('Bio::Seq::PrimaryQual') )) { *************** *** 222,225 **** --- 224,230 ---- # } # print("Printing $header to a file.\n"); + + if ( not(defined($oneline)) || $oneline == 0) { + # 50 quality values per line for (my $count = 1; $count<=$length; $count+= 50) { if ($count+50 > $length) { $max = $length; } *************** *** 228,231 **** --- 233,241 ---- $self->_print (join(' ', at slice), "\n"); } + } else { + # quality values on a single line + my @slice = @{$source->qual}; + $self->_print (join(' ', at slice), "\n"); + } $self->flush if $self->_flush_on_write && defined $self->_fh; From bugzilla-daemon at portal.open-bio.org Tue Oct 23 12:19:15 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 23 Oct 2007 12:19:15 -0400 Subject: [Bioperl-guts-l] [Bug 2368] Flag to write quality scores on one line in Bio::SeqIO::qual In-Reply-To: Message-ID: <200710231619.l9NGJFQU028602@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2368 cjfields at uiuc.edu changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #2 from cjfields at uiuc.edu 2007-10-23 12:19 EST ------- Patch added. Thanks again! -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Tue Oct 23 12:21:11 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 23 Oct 2007 12:21:11 -0400 Subject: [Bioperl-guts-l] [Bug 2376] ID of match features in bp_search2gff.pl In-Reply-To: Message-ID: <200710231621.l9NGLBbB028738@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2376 ------- Comment #1 from cjfields at uiuc.edu 2007-10-23 12:21 EST ------- See bug 2377. -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Tue Oct 23 12:27:28 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 23 Oct 2007 12:27:28 -0400 Subject: [Bioperl-guts-l] [Bug 2377] Target tag format in bp_search2gff.pl In-Reply-To: Message-ID: <200710231627.l9NGRS98029051@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2377 cjfields at uiuc.edu changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement ------- Comment #1 from cjfields at uiuc.edu 2007-10-23 12:27 EST ------- It is very likely we will come up with new GFF-related tools (modules) to handle Bio::SearchIO-derived data, primarily in relation to getting BioPerl producing GFF3-relevant code (the idea being we make it as flexible as possible). When that occurs, we'll probably deprecate much of the older GFF-related code in favor of the new way. As such, we're probably not going fix the script in question (bp_search2gff.pl) for this bug or bug 2376 but we'll leave them open as a request for change to incorporate into any new tools. -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Tue Oct 23 12:28:00 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 23 Oct 2007 12:28:00 -0400 Subject: [Bioperl-guts-l] [Bug 2377] Target tag format in bp_search2gff.pl In-Reply-To: Message-ID: <200710231628.l9NGS0BE029101@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2377 cjfields at uiuc.edu changed: What |Removed |Added ---------------------------------------------------------------------------- Component|bioperl-run |Bio::Search/Bio::SearchIO -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Tue Oct 23 12:28:28 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 23 Oct 2007 12:28:28 -0400 Subject: [Bioperl-guts-l] [Bug 2376] ID of match features in bp_search2gff.pl In-Reply-To: Message-ID: <200710231628.l9NGSSwU029203@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2376 cjfields at uiuc.edu changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement Component|bioperl-run |Bio::Search/Bio::SearchIO -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at portal.open-bio.org Tue Oct 23 12:46:52 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 23 Oct 2007 12:46:52 -0400 Subject: [Bioperl-guts-l] [Bug 2384] Segmentation Fault in Bio::Tools::dpAlign::pairwise_alignment_score In-Reply-To: Message-ID: <200710231646.l9NGkqLi030136@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2384 ------- Comment #4 from cjfields at uiuc.edu 2007-10-23 12:46 EST ------- Florent, this works for me on my MacBook (Mac OS X, Tiger, perl 5.8.6), though I do get a warning (though the sequences are obviously there): --------------------- WARNING --------------------- MSG: Replacing one sequence [ABC|9944760/1-104] --------------------------------------------------- Getting score for ABC|9944760 -> ABC|9986984 = 300 Getting score for ABC|9986984 -> ABC|9944760 = 303 This may be a platform-related issue. Could you give a bit more information on os, perl version, etc.? -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From cjfields at dev.open-bio.org Tue Oct 23 12:50:07 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Tue, 23 Oct 2007 16:50:07 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/Align PairwiseStatistics.pm, 1.12, 1.13 Message-ID: <200710231650.l9NGo7Zm028396@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/Align In directory dev.open-bio.org:/tmp/cvs-serv28364/Bio/Align Modified Files: PairwiseStatistics.pm Log Message: bug 2385 Index: PairwiseStatistics.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/Align/PairwiseStatistics.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** PairwiseStatistics.pm 13 Sep 2007 14:29:49 -0000 1.12 --- PairwiseStatistics.pm 23 Oct 2007 16:50:05 -0000 1.13 *************** *** 23,26 **** --- 23,28 ---- my $pwaln; print $stats->number_of_comparable_bases($pwaln); + my $score = $stats->score_nuc($pwaln); + =head1 DESCRIPTION *************** *** 85,93 **** sub number_of_comparable_bases{ my ($self,$aln) = @_; ! if( ! defined $aln || ! $aln->isa('Bio::Align::AlignI') ) { ! $self->warn("Must provide a Bio::Align::AlignI compliant object to Bio::Align::PairwiseStatistics"); return 0; ! } elsif( $aln->no_sequences != 2 ) { ! $self->warn("only pairwise calculations currently supported ". $aln->no_sequences."\n"); } my $L = $aln->length - $self->number_of_gaps($aln); --- 87,97 ---- sub number_of_comparable_bases{ my ($self,$aln) = @_; ! if ( ! defined $aln || ! $aln->isa('Bio::Align::AlignI') ) { ! $self->throw("Must provide a Bio::Align::AlignI compliant object to ". ! "Bio::Align::PairwiseStatistics"); return 0; ! } elsif ( $aln->no_sequences != 2 ) { ! $self->throw("Only pairwise calculations supported. Found ". ! $aln->no_sequences." sequences in alignment\n"); } my $L = $aln->length - $self->number_of_gaps($aln); *************** *** 109,128 **** my ($self,$aln) = @_; if( ! defined $aln || ! $aln->isa('Bio::Align::AlignI') ) { ! $self->warn("Must provide a Bio::Align::AlignI compliant object to Bio::Align::PairwiseStatistics"); ! return 0; ! } elsif( $aln->no_sequences != 2 ) { ! $self->warn("only pairwise calculations currently supported"); } my (@seqs); ! foreach my $seq ( $aln->each_seq) { push @seqs, [ split(//,$seq->seq())]; } my $firstseq = shift @seqs; ! # my $secondseq = shift @seqs; my $diffcount = 0; for (my $i = 0;$i<$aln->length; $i++ ) { ! next if( $firstseq->[$i] =~ /^$GapChars$/); foreach my $seq ( @seqs ) { ! next if( $seq->[$i] =~ /^$GapChars$/); if( $firstseq->[$i] ne $seq->[$i] ) { $diffcount++; --- 113,133 ---- my ($self,$aln) = @_; if( ! defined $aln || ! $aln->isa('Bio::Align::AlignI') ) { ! $self->throw("Must provide a Bio::Align::AlignI compliant object to ". ! "Bio::Align::PairwiseStatistics"); ! } elsif ( $aln->no_sequences != 2 ) { ! $self->throw("Only pairwise calculations supported. Found ". ! $aln->no_sequences." sequences in alignment\n"); } my (@seqs); ! foreach my $seq ( $aln->each_seq ) { push @seqs, [ split(//,$seq->seq())]; } my $firstseq = shift @seqs; ! #my $secondseq = shift @seqs; my $diffcount = 0; for (my $i = 0;$i<$aln->length; $i++ ) { ! next if ( $firstseq->[$i] =~ /^$GapChars$/ ); foreach my $seq ( @seqs ) { ! next if ( $seq->[$i] =~ /^$GapChars$/ ); if( $firstseq->[$i] ne $seq->[$i] ) { $diffcount++; *************** *** 146,152 **** sub number_of_gaps{ my ($self,$aln) = @_; ! if( ! defined $aln || ! $aln->isa('Bio::Align::AlignI') ) { ! $self->warn("Must provide a Bio::Align::AlignI compliant object to Bio::Align::PairwiseStatistics"); ! return 0; } my $gapline = $aln->gap_line; --- 151,160 ---- sub number_of_gaps{ my ($self,$aln) = @_; ! if ( ! defined $aln || ! $aln->isa('Bio::Align::AlignI') ) { ! $self->throw("Must provide a Bio::Align::AlignI compliant object to ". ! "Bio::Align::PairwiseStatistics"); ! } elsif ( $aln->no_sequences != 2 ) { ! $self->throw("Only pairwise calculations supported. Found ". ! $aln->no_sequences." sequences in alignment\n"); } my $gapline = $aln->gap_line; *************** *** 155,157 **** --- 163,245 ---- } + + =head2 score_nuc + + Title : score_nuc + Usage : my $score = $stat->score_nuc($aln); + or + my $score = $stat->score_nuc( + -aln =>$aln, + -match => 1, + -mismatch => -1, + -gap_open => -1, + -gap_ext => -1 + ); + Function: Calculate the score of an alignment of 2 nucleic acid sequences. The + scoring parameters can be specified. Otherwise the blastn default + parameters are used: match = 2, mismatch = -3, gap opening = -5, gap + extension = -2 + Returns : alignment score (number) + Args : L + match score [optional] + mismatch score [optional] + gap opening score [optional] + gap extension score [optional] + + =cut + + sub score_nuc { + my ($self, @args) = @_; + my ( $aln, $match, $mismatch, $gap_open, $gap_ext) = $self->_rearrange( [qw( + ALN MATCH MISMATCH GAP_OPEN GAP_EXT)], @args ); + if ( ! defined $aln || ! $aln->isa('Bio::Align::AlignI') ) { + $self->throw("Must provide a Bio::Align::AlignI compliant object to ". + "Bio::Align::PairwiseStatistics"); + } elsif ( $aln->no_sequences != 2 ) { + $self->throw("Only pairwise calculations supported. Found ". + $aln->no_sequences." sequences in alignment\n"); + } + my $seq1 = $aln->get_seq_by_pos(1); + my $seq2 = $aln->get_seq_by_pos(2); + if (! ( ($seq1->alphabet eq 'dna' || $seq1->alphabet eq 'rna') && + ($seq2->alphabet eq 'dna' || $seq2->alphabet eq 'rna') )) { + $self->throw("Can only score nucleic acid alignments"); + } + $match ||= 2; # Blastn scoring defaults + $mismatch ||= -3; + $gap_open ||= -5; + $gap_ext ||= -2; + my $score = 0; + my $prevres1 = '-'; + my $prevres2 = '-'; + for (my $pos = 1 ; $pos <= $aln->length ; $pos++) { + my $res1 = $seq1->subseq($pos, $pos); + my $res2 = $seq2->subseq($pos, $pos); + if (!($res1 eq '-' || $res2 eq '-')) { # no gap + if ($res1 eq $res2) { # same residue + $score += $match; + } else { # other residue + $score += $mismatch; + } + } else { # open or ext gap? + my $open = 0; + if (!($res1 eq '-' && $res2 eq '-')) { # exactly one gap + my $prevres = $prevres1; + $prevres = $prevres2 if $res2 eq '-'; + $open = 1 unless $prevres eq '-'; + } else { # 2 gaps + $open = 1 unless $prevres1 eq '-' && $prevres2 eq '-'; + } + if ($open) { + $score += $gap_open; # gap opening + } else { + $score += $gap_ext; # gap extension + } + } + $prevres1 = $res1; + $prevres2 = $res2; + } + return $score; + } + 1; From cjfields at dev.open-bio.org Tue Oct 23 12:50:07 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Tue, 23 Oct 2007 16:50:07 +0000 Subject: [Bioperl-guts-l] bioperl-live/t AlignStats.t,1.17,1.18 Message-ID: <200710231650.l9NGo7xK028401@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/t In directory dev.open-bio.org:/tmp/cvs-serv28364/t Modified Files: AlignStats.t Log Message: bug 2385 Index: AlignStats.t =================================================================== RCS file: /home/repository/bioperl/bioperl-live/t/AlignStats.t,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** AlignStats.t 27 Jun 2007 10:16:37 -0000 1.17 --- AlignStats.t 23 Oct 2007 16:50:05 -0000 1.18 *************** *** 8,12 **** use BioperlTest; ! test_begin(-tests => 39); use_ok('Bio::Align::DNAStatistics'); --- 8,12 ---- use BioperlTest; ! test_begin(-tests => 43); use_ok('Bio::Align::DNAStatistics'); *************** *** 27,30 **** --- 27,33 ---- is( $stats->pairwise_stats->number_of_comparable_bases($aln),173); is( $stats->pairwise_stats->number_of_differences($aln),13); + is( $stats->pairwise_stats->score_nuc($aln), 224); + is( $stats->pairwise_stats->score_nuc( -aln => $aln, -match => 1, + -mismatch => -1, -gap_open => -1, -gap_ext => -1), 126); my $d = $stats->distance(-align => $aln, *************** *** 63,66 **** --- 66,72 ---- is( $stats->pairwise_stats->number_of_comparable_bases($aln),170); is( $stats->pairwise_stats->number_of_differences($aln),27); + is( $stats->pairwise_stats->score_nuc($aln), 134); + is( $stats->pairwise_stats->score_nuc( -aln => $aln, -match => 1, + -mismatch => -1, -gap_open => -1, -gap_ext => -1), 97); # now test the distance calculations From bugzilla-daemon at portal.open-bio.org Tue Oct 23 12:50:44 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 23 Oct 2007 12:50:44 -0400 Subject: [Bioperl-guts-l] [Bug 2385] Bio::Align::PairwiseStatistics::score_nuc method In-Reply-To: Message-ID: <200710231650.l9NGoiYO030572@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2385 cjfields at uiuc.edu changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #3 from cjfields at uiuc.edu 2007-10-23 12:50 EST ------- Added to CVS (along with tests). We need to get you a dev account! -- Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From cjfields at dev.open-bio.org Tue Oct 23 12:55:36 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Tue, 23 Oct 2007 16:55:36 +0000 Subject: [Bioperl-guts-l] bioperl-db/Bio/DB/DBI base.pm,1.10,1.11 Message-ID: <200710231655.l9NGtavX028481@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-db/Bio/DB/DBI In directory dev.open-bio.org:/tmp/cvs-serv28449/Bio/DB/DBI Modified Files: base.pm Log Message: bug 2387 Index: base.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-db/Bio/DB/DBI/base.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** base.pm 4 Jul 2006 04:38:07 -0000 1.10 --- base.pm 23 Oct 2007 16:55:34 -0000 1.11 *************** *** 246,250 **** unless $dbc; my $dsn = $self->build_dsn($dbc); ! $self->debug("new_connection(): dsn=$dsn; user=" .$dbc->username() ."\n"); my $dbh; --- 246,250 ---- unless $dbc; my $dsn = $self->build_dsn($dbc); ! $self->debug("new_connection(): dsn=$dsn; user=" . (defined $dbc->username() ? $dbc->username() : 'undef') ."\n"); # undef: postgres 'ident sameuser' login my $dbh; From cjfields at dev.open-bio.org Tue Oct 23 12:55:36 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Tue, 23 Oct 2007 16:55:36 +0000 Subject: [Bioperl-guts-l] bioperl-db/Bio/DB/BioSQL OBDA.pm,1.3,1.4 Message-ID: <200710231655.l9NGtavF028486@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-db/Bio/DB/BioSQL In directory dev.open-bio.org:/tmp/cvs-serv28449/Bio/DB/BioSQL Modified Files: OBDA.pm Log Message: bug 2387 Index: OBDA.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-db/Bio/DB/BioSQL/OBDA.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** OBDA.pm 3 Oct 2006 12:49:41 -0000 1.3 --- OBDA.pm 23 Oct 2007 16:55:34 -0000 1.4 *************** *** 84,94 **** my ($class, %conf) = @_; my $self = $class->SUPER::new(); ! my ($host,$port) = split ":", $conf{'location'}; ! my $db = Bio::DB::BioDB->new(-database => 'biosql', -host => $host, -port => $port, -dbname => $conf{'dbname'}, -driver => $conf{'driver'}, ! -user => $conf{'user'}, -pass => $conf{'passwd'} ); $self->_db($db); --- 84,98 ---- my ($class, %conf) = @_; my $self = $class->SUPER::new(); ! my ($host,$port); ! # prevent warning msg by allowing location to be undef for postgresql 'ident sameuser' login) ! if (defined $conf{'location'}) { ! ($host,$port) = split ":", $conf{'location'}; ! } ! my $db = Bio::DB::BioDB->new( -database => 'biosql', -host => $host, -port => $port, -dbname => $conf{'dbname'}, -driver => $conf{'driver'}, ! -user => $conf{'user' }, -pass => $conf{'passwd'} ); $self->_db($db); From bugzilla-daemon at portal.open-bio