From cjfields at dev.open-bio.org Sun Apr 1 20:47:06 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Mon, 02 Apr 2007 00:47:06 +0000 Subject: [Bioperl-guts-l] bioperl-live/t Index.t,1.47,1.48 Message-ID: <200704020047.l320l6AP003057@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/t In directory dev.open-bio.org:/tmp/cvs-serv3021/t Modified Files: Index.t Log Message: bug 2237 Index: Index.t =================================================================== RCS file: /home/repository/bioperl/bioperl-live/t/Index.t,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** Index.t 29 Aug 2006 03:42:10 -0000 1.47 --- Index.t 2 Apr 2007 00:47:04 -0000 1.48 *************** *** 8,12 **** use vars qw($NUMTESTS); $DEBUG = $ENV{"BIOPERLDEBUG"} || 0; ! $NUMTESTS = 50; if ( $@ ) { use lib 't'; --- 8,12 ---- use vars qw($NUMTESTS); $DEBUG = $ENV{"BIOPERLDEBUG"} || 0; ! $NUMTESTS = 56; if ( $@ ) { use lib 't'; *************** *** 60,67 **** --- 60,70 ---- my $seq = $ind->fetch('HSEARLOBE'); ok($seq->length,321); + ok($seq->primary_id(),'HSEARLOBE'); $seq = $ind->fetch('HSMETOO'); ok($seq->length,134); + ok($seq->primary_id(),'HSMETOO'); $seq = $ind->fetch('MMWHISK'); ok($seq->length,62); + ok($seq->primary_id(),'MMWHISK'); $seq = $ind->fetch('gi|238775|bbs|65126'); ok($seq->length,70); *************** *** 88,95 **** --- 91,101 ---- $seq = $ind->fetch('HSEARLOBE'); ok($seq->length,321); + ok($seq->primary_id(),'HSEARLOBE'); $seq = $ind->fetch('HSMETOO'); ok($seq->length,134); + ok($seq->primary_id(),'HSMETOO'); $seq = $ind->fetch('MMWHISK'); ok($seq->length,62); + ok($seq->primary_id(),'MMWHISK'); $seq = $ind->fetch('NONEXISTENT_SEQ'); ok(! defined $seq); From cjfields at dev.open-bio.org Sun Apr 1 20:47:06 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Mon, 02 Apr 2007 00:47:06 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/Index Fasta.pm, 1.38, 1.39 Qual.pm, 1.11, 1.12 Message-ID: <200704020047.l320l6sG003053@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/Index In directory dev.open-bio.org:/tmp/cvs-serv3021/Bio/Index Modified Files: Fasta.pm Qual.pm Log Message: bug 2237 Index: Qual.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/Index/Qual.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Qual.pm 27 Sep 2006 00:35:09 -0000 1.11 --- Qual.pm 2 Apr 2007 00:47:03 -0000 1.12 *************** *** 175,179 **** if (/^>/) { # $begin is the position of the first character after the '>' ! my $begin = tell($QUAL) - length( $_ ) + 1; foreach my $id (&$id_parser($_)) { --- 175,180 ---- if (/^>/) { # $begin is the position of the first character after the '>' ! my $offset = ( $^O =~ /mswin/i ) ? 0 : 1; ! my $begin = tell($QUAL) - length( $_ ) + $offset; foreach my $id (&$id_parser($_)) { Index: Fasta.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/Index/Fasta.pm,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** Fasta.pm 6 Feb 2007 04:13:10 -0000 1.38 --- Fasta.pm 2 Apr 2007 00:47:03 -0000 1.39 *************** *** 174,178 **** if (/^>/) { # $begin is the position of the first character after the '>' ! my $begin = tell($FASTA) - length( $_ ) + 1; foreach my $id (&$id_parser($_)) { --- 174,179 ---- if (/^>/) { # $begin is the position of the first character after the '>' ! my $offset = ( $^O =~ /mswin/i ) ? 0 : 1; ! my $begin = tell($FASTA) - length( $_ ) + $offset; foreach my $id (&$id_parser($_)) { From bugzilla-daemon at portal.open-bio.org Sun Apr 1 20:48:32 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Sun, 1 Apr 2007 20:48:32 -0400 Subject: [Bioperl-guts-l] [Bug 2237] Bio::Index::Fasta truncates ID in Windows (with patch) In-Reply-To: Message-ID: <200704020048.l320mWlZ030008@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2237 cjfields at uiuc.edu changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #4 from cjfields at uiuc.edu 2007-04-01 20:48 EST ------- I have committed these to CVS. These pass on Mac OS X but may require testing on other platforms; hopefully tests will catch this. If we run into problems we can roll tests back as needed. -- 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 Sun Apr 1 20:52:17 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Sun, 1 Apr 2007 20:52:17 -0400 Subject: [Bioperl-guts-l] [Bug 2238] Half of tests for t/Index.t do not run In-Reply-To: Message-ID: <200704020052.l320qHah030214@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2238 ------- Comment #1 from cjfields at uiuc.edu 2007-04-01 20:52 EST ------- I'm not able to reproduce this on Mac OS X. Will try on Windows at some point. -- 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 Sun Apr 1 20:55:51 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Mon, 02 Apr 2007 00:55:51 +0000 Subject: [Bioperl-guts-l] bioperl-run/t tRNAscanSE.t,NONE,1.1 Message-ID: <200704020055.l320tpl7003145@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-run/t In directory dev.open-bio.org:/tmp/cvs-serv3109/t Added Files: tRNAscanSE.t Log Message: wrapper for tRNAscanSE --- NEW FILE: tRNAscanSE.t --- #-*-Perl-*- # ## Bioperl Test Harness Script for Modules # # use strict; BEGIN { eval { require Test::More; }; if( $@ ) { use lib 't/lib'; } use Test::More; use vars qw($NTESTS); $NTESTS = 12; plan tests => $NTESTS; use_ok('Bio::Tools::Run::tRNAscanSE'); use_ok('Bio::Root::IO'); use_ok('Bio::Seq'); } my $verbose = 1 if $ENV{'BIOPERLDEBUG'}; my $fasta_file = Bio::Root::IO->catfile('t','data','H_pylori_J99.fasta'); my $factory = Bio::Tools::Run::tRNAscanSE->new(-program => 'tRNAscan-SE'); isa_ok $factory, 'Bio::Tools::Run::tRNAscanSE'; my $seqstream = Bio::SeqIO->new(-file => $fasta_file, -format => 'fasta'); my $seq = $seqstream->next_seq(); SKIP: { my $tRNAscanSE_present = $factory->executable(); unless ($tRNAscanSE_present) { skip("tRNAscanSE program not found. Skipping tests 5 to $NTESTS",12); } my $tRNAscanSE = $factory->run($seq); isa_ok $tRNAscanSE, 'Bio::Tools::tRNAscanSE'; while (my $gene = $tRNAscanSE->next_prediction()) { isa_ok $gene, 'Bio::SeqFeature::Generic'; } } 1; From cjfields at dev.open-bio.org Sun Apr 1 20:55:51 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Mon, 02 Apr 2007 00:55:51 +0000 Subject: [Bioperl-guts-l] bioperl-run/Bio/Tools/Run tRNAscanSE.pm,NONE,1.1 Message-ID: <200704020055.l320tpeU003141@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-run/Bio/Tools/Run In directory dev.open-bio.org:/tmp/cvs-serv3109/Bio/Tools/Run Added Files: tRNAscanSE.pm Log Message: wrapper for tRNAscanSE --- NEW FILE: tRNAscanSE.pm --- # BioPerl module for Bio::Tools::Run::tRNAscanSE # # Cared for by Bioperl # # Copyright Bioperl, Mark Johnson # # Special thanks to Chris Fields, Sendu Bala # # You may distribute this module under the same terms as perl itself # # POD documentation - main docs before the code =head1 NAME Bio::Tools::Run::tRNAscanSE - Wrapper for local execution of tRNAscan-SE =head1 SYNOPSIS my $factory = Bio::Tools::Run::tRNAscanSE->new('-program' => 'tRNAscan-SE'); # Pass the factory Bio::Seq objects # returns a Bio::Tools::tRNAscanSE object my $factory = $factory->run($seq); or my $factory = $factory->run(@seq); =head1 DESCRIPTION Wrapper module for tRNAscan-SE. tRNAscan-SE is open source and available at L. =head1 FEEDBACK =head2 Mailing Lists User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated. bioperl-l at bioperl.org - General discussion http://bioperl.org/wiki/Mailing_lists - About the mailing lists =head2 Reporting Bugs Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web: http://bugzilla.open-bio.org/ =head1 AUTHOR - Mark Johnson Email: mjohnson-at-watson-dot-wustl-dot-edu =head1 APPENDIX The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ =cut package Bio::Tools::Run::tRNAscanSE; use strict; use warnings; use Bio::SeqIO; use Bio::Root::Root; use Bio::Tools::Run::WrapperBase; use Bio::Tools::tRNAscanSE; use English; use IPC::Run; # Should be okay on WIN32 (See IPC::Run Docs) use base qw(Bio::Root::Root Bio::Tools::Run::WrapperBase); our @params = (qw(program)); our @tRNAscanSE_switches = (qw(A B C G O P)); =head2 program_name Title : program_name Usage : $factory>program_name() Function: gets/sets the program name Returns: string Args : string =cut sub program_name { my ($self, $val) = @_; $self->program($val) if $val; return $self->program(); } =head2 program_dir Title : program_dir Usage : $factory->program_dir() Function: gets/sets the program dir Returns: string Args : string =cut sub program_dir { my ($self, $val) = @_; $self->{'_program_dir'} = $val if $val; return $self->{'_program_dir'}; } =head2 new Title : new Usage : $tRNAscanSE->new(@params) Function: creates a new tRNAscanSE factory Returns: Bio::Tools::Run::tRNAscanSE Args : =cut sub new { my ($class, at args) = @_; my $self = $class->SUPER::new(@args); $self->io->_initialize_io(); $self->_set_from_args( \@args, -methods => [ @params, @tRNAscanSE_switches, ], -create => 1, ); unless (defined($self->program())) { $self->throw('Must specify program'); } return $self; } =head2 run Title : run Usage : $obj->run($seq_file) Function: Runs tRNAscan-SE Returns : A Bio::Tools::tRNAscanSE object Args : An array of Bio::PrimarySeqI objects =cut sub run{ my ($self, @seq) = @_; unless (@seq) { $self->throw("Must supply at least one Bio::PrimarySeqI"); } foreach my $seq (@seq) { unless ($seq->isa('Bio::PrimarySeqI')) { $self->throw("Object does not implement Bio::PrimarySeqI"); } } my $program_name = $self->program_name(); my $file_name = $self->_write_seq_file(@seq); return $self->_run($file_name); } =head2 _run Title : _run Usage : $obj->_run() Function: Internal(not to be used directly) Returns : An instance of Bio::Tools::tRNAscanSE Args : file name =cut sub _run { my ($self, $seq_file_name) = @_; my @cmd = ( $self->executable(), split(/\s+/, $self->_setparams()), $seq_file_name, ); my $cmd = join(' ', @cmd); $self->debug("tRNAscan-SE Command = $cmd"); my $program_name = $self->program_name(); my ($program_stderr); my ($output_fh, $output_file_name) = $self->io->tempfile(-dir=> $self->tempdir()); my @ipc_args = (\@cmd, \undef, '>', $output_file_name, '2>', \$program_stderr); # Run the program via IPC::Run so: # 1) The console doesn't get cluttered up with the program's STDERR/STDOUT # 2) We don't have to embed STDERR/STDOUT redirection in $cmd # 3) We don't have to deal with signal handling (IPC::Run should take care # of everything automagically. eval { IPC::Run::run(@ipc_args) || die $OS_ERROR;; }; if ($EVAL_ERROR) { $self->throw("tRNAscan-SE call crashed: $EVAL_ERROR"); } $self->debug(join("\n", 'tRNAscanSE STDERR:', $program_stderr)) if $program_stderr; return Bio::Tools::tRNAscanSE->new(-file => $output_file_name); } sub _setparams { my ($self) = @_; my $param_string = $self->SUPER::_setparams( -params => [ ], -switches => [ @tRNAscanSE_switches, ], -dash => 1 ); # Kill leading and trailing whitespace $param_string =~ s/^\s+//g; $param_string =~ s/\s+$//g; return $param_string; } =head2 _write_seq_file Title : _write_seq_file Usage : obj->_write_seq_file($seq) or obj->_write_seq_file(@seq) Function: Internal(not to be used directly) Returns : Name of a temp file containing program output Args : One or more Bio::PrimarySeqI objects =cut sub _write_seq_file { my ($self, @seq) = @_; my ($fh, $file_name) = $self->io->tempfile(-dir=>$self->tempdir()); my $out = Bio::SeqIO->new(-fh => $fh , '-format' => 'Fasta'); foreach my $seq (@seq){ $out->write_seq($seq); } close($fh); $out->close(); return $file_name; } 1; From bugzilla-daemon at portal.open-bio.org Sun Apr 1 20:56:38 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Sun, 1 Apr 2007 20:56:38 -0400 Subject: [Bioperl-guts-l] [Bug 2252] Implement Bio::Tools::Run::tRNAscanSE In-Reply-To: Message-ID: <200704020056.l320ucbH030452@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2252 cjfields at uiuc.edu changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #3 from cjfields at uiuc.edu 2007-04-01 20:56 EST ------- I have added these to CVS. Closing out... -- 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 Sun Apr 1 21:04:29 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Sun, 1 Apr 2007 21:04:29 -0400 Subject: [Bioperl-guts-l] [Bug 2217] Bug in Bio::Tools::GFF::_gff3_string In-Reply-To: Message-ID: <200704020104.l3214TJL030823@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2217 cjfields at uiuc.edu changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #1 from cjfields at uiuc.edu 2007-04-01 21:04 EST ------- Looks like this was taken care of independently in CVS by Malcolm. -- 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 Sun Apr 1 21:05:16 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Sun, 1 Apr 2007 21:05:16 -0400 Subject: [Bioperl-guts-l] [Bug 2239] CVS tarballs useless In-Reply-To: Message-ID: <200704020105.l3215GJh030886@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2239 cjfields at uiuc.edu changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Comment #2 from cjfields at uiuc.edu 2007-04-01 21:05 EST ------- No response. Marking invalid. -- 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 Sun Apr 1 21:18:36 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Mon, 02 Apr 2007 01:18:36 +0000 Subject: [Bioperl-guts-l] bioperl-live/t SearchIO.t,1.113,1.114 Message-ID: <200704020118.l321IaB4003228@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/t In directory dev.open-bio.org:/tmp/cvs-serv3196 Modified Files: SearchIO.t Log Message: bug 2246 Index: SearchIO.t =================================================================== RCS file: /home/repository/bioperl/bioperl-live/t/SearchIO.t,v retrieving revision 1.113 retrieving revision 1.114 diff -C2 -d -r1.113 -r1.114 *** SearchIO.t 7 Mar 2007 14:36:02 -0000 1.113 --- SearchIO.t 2 Apr 2007 01:18:34 -0000 1.114 *************** *** 1996,2013 **** is($hits[7]->score, 624); ! # Bug 2189 ! $searchio = new Bio::SearchIO(-format => 'blast', -file => Bio::Root::IO->catfile ! (qw(t data blastp2215.blast))); ! $result = $searchio->next_result; ! is($result->database_entries, 4460989); ! is($result->database_letters, 1533424333); ! is($result->algorithm, 'BLASTP'); ! is($result->algorithm_version, '2.2.15 [Oct-15-2006]'); ! is($result->query_name, 'gi|15608519|ref|NP_215895.1|'); ! is($result->query_length, 193); ! @hits = $result->hits; ! # some utilities --- 1996,2012 ---- is($hits[7]->score, 624); ! # Bug 2246 ! $searchio = Bio::SearchIO->new(-format => 'blast', ! -verbose => -1, -file => Bio::Root::IO->catfile ! (qw(t data bug2246.blast))); $result = $searchio->next_result; ! $hit = $result->next_hit; ! is $hit->name, 'UniRef50_Q9X0H5'; ! is $hit->length, 0; ! is $hit->accession, 'UniRef50_Q9X0H5'; ! is $hit->description, 'Cluster: Histidyl-tRNA synthetase; n=4; Thermoto...'; ! is $hit->raw_score, 23; ! is $hit->significance, 650; # some utilities From cjfields at dev.open-bio.org Sun Apr 1 21:18:36 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Mon, 02 Apr 2007 01:18:36 +0000 Subject: [Bioperl-guts-l] bioperl-live/t/data bug2246.blast,NONE,1.1 Message-ID: <200704020118.l321Iau5003233@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/t/data In directory dev.open-bio.org:/tmp/cvs-serv3196/data Added Files: bug2246.blast Log Message: bug 2246 --- NEW FILE: bug2246.blast --- (This appears to be a binary file; contents omitted.) From bugzilla-daemon at portal.open-bio.org Sun Apr 1 21:19:44 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Sun, 1 Apr 2007 21:19:44 -0400 Subject: [Bioperl-guts-l] [Bug 2246] data on description line gets into raw score In-Reply-To: Message-ID: <200704020119.l321Ji9V031470@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2246 cjfields at uiuc.edu changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #3 from cjfields at uiuc.edu 2007-04-01 21:19 EST ------- Seems to work and passes tests. I have added tests and data to SearchIO.t (and removed some redundant tests for bug 2189). -- 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 Apr 2 10:41:31 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Mon, 02 Apr 2007 14:41:31 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/SeqIO kegg.pm,1.20,1.21 Message-ID: <200704021441.l32EfVj5005330@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/SeqIO In directory dev.open-bio.org:/tmp/cvs-serv5305 Modified Files: kegg.pm Log Message: write_seq() is not implemented Index: kegg.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/SeqIO/kegg.pm,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** kegg.pm 26 Sep 2006 22:03:15 -0000 1.20 --- kegg.pm 2 Apr 2007 14:41:29 -0000 1.21 *************** *** 296,298 **** --- 296,309 ---- } + =head2 write_seq + + Title : write_seq + Note : write_seq() is not implemented for KEGG format output. + + =cut + + sub write_seq { + shift->throw("write_seq() not implemented for KEGG format output."); + } + 1; From scain at dev.open-bio.org Mon Apr 2 11:55:58 2007 From: scain at dev.open-bio.org (Scott Cain) Date: Mon, 02 Apr 2007 15:55:58 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/FeatureIO gff.pm,1.51,1.52 Message-ID: <200704021555.l32Ftw0v005468@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/FeatureIO In directory dev.open-bio.org:/tmp/cvs-serv5459 Modified Files: gff.pm Log Message: added support for a new directive: ##organism (should use common name if available) Index: gff.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/FeatureIO/gff.pm,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** gff.pm 27 Mar 2007 15:09:45 -0000 1.51 --- gff.pm 2 Apr 2007 15:55:56 -0000 1.52 *************** *** 493,496 **** --- 493,501 ---- } + elsif($directive eq 'organism') { + my $organism = $arg[0]; + $self->organism($organism); + } + else { $self->throw("don't know what do do with directive: '##".$directive."'"); *************** *** 785,788 **** --- 790,807 ---- } + =head1 organims + + Gets/sets the organims from the organism directive + + =cut + + sub organism { + my $self = shift; + my $organism = shift if defined(@_); + return $self->{'organism'} = $organism if defined($organism); + return $self->{'organism'}; + } + + =head1 _write_feature_1() From bugzilla-daemon at portal.open-bio.org Tue Apr 3 10:47:54 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 3 Apr 2007 10:47:54 -0400 Subject: [Bioperl-guts-l] [Bug 2202] EMBOSSApplication.pm error In-Reply-To: Message-ID: <200704031447.l33Elsv4028948@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2202 ------- Comment #1 from cjfields at uiuc.edu 2007-04-03 10:47 EST ------- Don't know if this in in your program but there's a spelling error: '-sequencea' => $seq_to_test, should be: '-sequences' => $seq_to_test, I'll look at the code and try replicating this on WinXP. -- 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 Apr 3 10:52:52 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 3 Apr 2007 10:52:52 -0400 Subject: [Bioperl-guts-l] [Bug 2203] Signalp extension or new module In-Reply-To: Message-ID: <200704031452.l33Eqq6u029233@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2203 ------- Comment #14 from cjfields at uiuc.edu 2007-04-03 10:52 EST ------- (In reply to comment #13) ... > Hi Chris, hi Neil, > > Regarding the modification from Neil, it is a good thing. Nevertheless, if you > look closely the code for Signalp module, you'll see that it only returns > results for scores 'mean S' and 'max Y'. Moreover it is more stringent because > it needs to have 'YES' for this two scores to get a Seq feature. > On the other hand, my module is able to return all results, wihtout any filter > or and can filter on 0 to 5 score and returns only sequence having 'YES' for > these scores whereas the original Signalp only takes into account 'mean S' and > 'max Y'. > So the question is, should we only keep this stringent filter from original > Signalp, or introduce more flexibility by using mine? We want a module with more flexibility, in my opinion, falling back to a strict (default) behavior unless indicated. > I'll try to add some more functionalities by being able to parse 'short' > output, where the results are displayed on one line. Do youthink this could be > a good improvement? Sounds good! > Regards > > Emmanuel -- 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 Apr 3 11:19:11 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 3 Apr 2007 11:19:11 -0400 Subject: [Bioperl-guts-l] [Bug 2202] EMBOSSApplication.pm error In-Reply-To: Message-ID: <200704031519.l33FJBG2030684@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2202 ------- Comment #2 from jason at open-bio.org 2007-04-03 11:19 EST ------- (In reply to comment #1) > Don't know if this in in your program but there's a spelling error: > > '-sequencea' => $seq_to_test, > > should be: > > '-sequences' => $seq_to_test, > > I'll look at the code and try replicating this on WinXP. > It used to be -sequencea now it might be -asequence? http://www.hku.hk/bruhk/emboss/water.html http://emboss.sourceforge.net/apps/release/4.0/emboss/apps/water.html or maybe I'm just confused. -- 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 Apr 3 11:21:07 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 3 Apr 2007 11:21:07 -0400 Subject: [Bioperl-guts-l] [Bug 2203] Signalp extension or new module In-Reply-To: Message-ID: <200704031521.l33FL7Ms030903@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2203 ------- Comment #15 from tuco at pasteur.fr 2007-04-03 11:21 EST ------- (In reply to comment #14) > (In reply to comment #13) > ... > > Hi Chris, hi Neil, > > > > Regarding the modification from Neil, it is a good thing. Nevertheless, if you > > look closely the code for Signalp module, you'll see that it only returns > > results for scores 'mean S' and 'max Y'. Moreover it is more stringent because > > it needs to have 'YES' for this two scores to get a Seq feature. > > On the other hand, my module is able to return all results, wihtout any filter > > or and can filter on 0 to 5 score and returns only sequence having 'YES' for > > these scores whereas the original Signalp only takes into account 'mean S' and > > 'max Y'. > > So the question is, should we only keep this stringent filter from original > > Signalp, or introduce more flexibility by using mine? > > We want a module with more flexibility, in my opinion, falling back to a strict > (default) behavior unless indicated. > Chris, What I can implement is a default behavior (subroutine or preloaded preferences) in case user did not give any filter to only return results having YES for mean S and max Y, i.e. the original signalp module. What do you think? > > I'll try to add some more functionalities by being able to parse 'short' > > output, where the results are displayed on one line. Do you think this could be > > a good improvement? > > Sounds good! > I'll try to it as soon as possible, I promises. BTW, is there any deadline somehow? Emmanuel > > Regards > > > > Emmanuel > -- 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 Apr 3 11:33:16 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 3 Apr 2007 11:33:16 -0400 Subject: [Bioperl-guts-l] [Bug 2202] EMBOSSApplication.pm error In-Reply-To: Message-ID: <200704031533.l33FXGJ6032062@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2202 ------- Comment #3 from cjfields at uiuc.edu 2007-04-03 11:33 EST ------- (In reply to comment #2) > (In reply to comment #1) > It used to be -sequencea now it might be -asequence? > http://www.hku.hk/bruhk/emboss/water.html > http://emboss.sourceforge.net/apps/release/4.0/emboss/apps/water.html > > or maybe I'm just confused. My bad! You're right; from EMBOSS 4.1.0 'water -help': ... [-asequence] sequence Sequence filename and optional format, or reference (input USA) [-bsequence] seqall Sequence(s) filename and optional format, or reference (input USA) ... Not sure about older ones but I assume 'sequencea' is correct. I wonder if this is a problem with indirect object syntax again popping up (the isa() seems to indicate object instantiation issues). May be something I'll try on my WinXP box when it's freed up. -- 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 Apr 3 12:08:45 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 3 Apr 2007 12:08:45 -0400 Subject: [Bioperl-guts-l] [Bug 2203] Signalp extension or new module In-Reply-To: Message-ID: <200704031608.l33G8jYb001495@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2203 ------- Comment #16 from cjfields at uiuc.edu 2007-04-03 12:08 EST ------- (In reply to comment #15) > (In reply to comment #14) > > (In reply to comment #13) ... > Chris, > > What I can implement is a default behavior (subroutine or preloaded > preferences) in case user did not give any filter to only return results > having YES for mean S and max Y, i.e. the original signalp module. > What do you think? You can try to replicate the default behavior of the original Signalp module if that's feasible, then combine the various Signalp tests together. The idea would be to not break anyone's code out there that still relies on the older Bio::Tools::Signalp behavior. One addition: I think we should (if possible) have Bio::Tools::Signalp implement a consistent interface (Bio::SequenceAnalysisResultI, via inheriting Bio::Tools::AnalysisResult). The long-range goal would be having the other Bio::Tools* do the same. This way they can be all called in a consistent way. Note this won't restrict you from adding in your own parameters or getter/setters for flexibility; it just makes the basic interface for retrieving SeqFeatureI's the same: my @params = (#report-specific parameters -foo => 1, -min => 20 # etc... ); my $parser = Bio::Tools::Foo(-file => $file, @params); while (my $feat = $parser->next_feature) { # do stuff here... } next_feature() could just delegate to Signalp::next_result() ... > I'll try to it as soon as possible, I promises. BTW, is there any deadline > somehow? > > Emmanuel There's not a real deadline. We have tossed around the idea of having a quick release (1.5.3 maybe) sometime in the next several months, but I think we're all pretty busy with $jobs. -- 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 Wed Apr 4 07:34:49 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Wed, 4 Apr 2007 07:34:49 -0400 Subject: [Bioperl-guts-l] [Bug 2262] New: Bio::Seq object loses sequence data when blessed as Bio::Seq::Meta::Array Message-ID: http://bugzilla.open-bio.org/show_bug.cgi?id=2262 Summary: Bio::Seq object loses sequence data when blessed as Bio::Seq::Meta::Array Product: BioPerl Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Core Components AssignedTo: bioperl-guts-l at bioperl.org ReportedBy: roy at colibase.bham.ac.uk When I bless a Bio::Seq object as a Bio::Seq::Meta::Array (as instructed by the POD) it loses the primary sequence information (and other PrimarySeqI information such as length and accession). Features and annotation are not affected. Bio::Seq::Meta suffers from a worse bug- Bio::SeqIO warns that the Bio::Seq::Meta object is not SeqI compliant. This seems to be due to the omission of Bio::Seq from the use base line in Bio::Seq::Meta (but not Bio::Seq::Meta::Array). When I add Bio::Seq into the use base line the behaviour is the same as for Bio::Seq::Meta::Array. The following code demonstrates the problem: #!/usr/bin/perl use warnings; use strict; use Bio::SeqIO; use Bio::Seq::Meta::Array; my $seq=Bio::SeqIO->new(-fh=>\*ARGV, -format=>'genbank')->next_seq; bless $seq, 'Bio::Seq::Meta::Array'; Bio::SeqIO->new(-format=>'genbank')->write_seq($seq); -- 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 Wed Apr 4 08:51:42 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Wed, 4 Apr 2007 08:51:42 -0400 Subject: [Bioperl-guts-l] [Bug 2262] Bio::Seq object loses sequence data when blessed as Bio::Seq::Meta::Array In-Reply-To: Message-ID: <200704041251.l34CpgQP018918@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2262 ------- Comment #1 from cjfields at uiuc.edu 2007-04-04 08:51 EST ------- The odd thing about Bio::Seq::Meta::Array is that it has a funky inheritance tree: use base qw(Bio::LocatableSeq Bio::Seq Bio::Seq::MetaI); so works to a certain extent but falls apart when you use accessors for data stored differently in the two. For instance, calling seq() on a Meta::Array object on the above uses LocatableSeq::seq() (which is a raw sequence stored in $obj->{'seq'} ) vs Bio::Seq::seq() (which calls Bio::PrimarySeq::seq() from the PrimarySeq stored in $self->{'primary_seq'}). When you instantiate the Bio::Seq from SeqIO it expects the latter (the call on an internally stored PrimarySeqI), but when you bless it into a Bio::Seq::Meta::Array it looks for the former instead (a raw sequence) and finds nothing (since $obj->{'seq'} is undef), so prints nothing. Very likely the others are similar. As for the problem with 'bless' and Bio::Seq::Meta, you lack the accessor methods altogether since it inherits only Bio::LocatableSeq and the MetaI interface: use base qw(Bio::LocatableSeq Bio::Seq::MetaI); Bio::Seq::Meta is-a Bio::LocatableSeq, which in turn are Bio::PrimarySeqI (not Bio::SeqI), so the error message is correct. Not sure how we want to handle this at the moment. I find the use of 'bless' in this way with Bio::Seq/Bio::PrimarySeq mixing is semantically tricky. I may post something to the mail list later today on this (unless you want to). -- 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 Wed Apr 4 09:35:32 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Wed, 4 Apr 2007 09:35:32 -0400 Subject: [Bioperl-guts-l] [Bug 2262] Bio::Seq object loses sequence data when blessed as Bio::Seq::Meta::Array In-Reply-To: Message-ID: <200704041335.l34DZWJ6021796@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2262 ------- Comment #2 from roy at colibase.bham.ac.uk 2007-04-04 09:35 EST ------- Thanks for a very clear explanation. I'll look forward to following any further discussion. -- 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 Thu Apr 5 10:35:39 2007 From: bosborne at dev.open-bio.org (Brian Osborne) Date: Thu, 05 Apr 2007 14:35:39 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/Tools GFF.pm,1.62,1.63 Message-ID: <200704051435.l35EZdBZ015613@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/Tools In directory dev.open-bio.org:/tmp/cvs-serv15604/Bio/Tools Modified Files: GFF.pm Log Message: Don's patch, this allows simple Target values and supports existing Bioperl scripts Index: GFF.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/Tools/GFF.pm,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** GFF.pm 19 Feb 2007 17:46:36 -0000 1.62 --- GFF.pm 5 Apr 2007 14:35:37 -0000 1.63 *************** *** 965,1096 **** sub _gff3_string { ! my ($gff, $origfeat) = @_; ! my $feat; ! if ($origfeat->isa('Bio::SeqFeature::FeaturePair')){ ! $feat = $origfeat->feature2; ! } else { ! $feat = $origfeat; ! } ! my $ID = $gff->_incrementGFF3ID(); ! my ($score,$frame,$name,$strand); ! if( $feat->can('score') ) { ! $score = $feat->score(); ! } ! $score = '.' unless defined $score; ! if( $feat->can('frame') ) { ! $frame = $feat->frame(); ! } ! $frame = '.' unless defined $frame; ! $strand = $feat->strand(); ! if(! $strand) { ! $strand = "."; ! } elsif( $strand == 1 ) { ! $strand = '+'; ! } elsif ( $feat->strand == -1 ) { ! $strand = '-'; ! } ! if( $feat->can('seqname') ) { ! $name = $feat->seq_id(); ! $name ||= 'SEQ'; ! } else { ! $name = 'SEQ'; ! } ! my @groups; ! # force leading ID and Parent tags ! my @all_tags = grep { !/ID/ && !/Parent/ } $feat->all_tags; ! unshift @all_tags, 'Parent' if $feat->has_tag('Parent'); ! unshift @all_tags, 'ID' if $feat->has_tag('ID'); ! for my $tag ( @all_tags ) { ! next if $tag eq 'Target'; ! my $valuestr; # a string which will hold one or more values ! # for this tag, with quoted free text and ! # space-separated individual values. ! my @v; ! for my $value ( $feat->each_tag_value($tag) ) { ! if( defined $value && length($value) ) { ! #$value =~ tr/ /+/; #spaces are allowed now ! if ($value =~ /[^a-zA-Z0-9\,\;\=\.:\%\^\*\$\@\!\+\_\?\-]/) { ! $value =~ s/\t/\\t/g; # substitute tab and newline ! # characters ! $value =~ s/\n/\\n/g; # to their UNIX equivalents ! # Unescaped quotes are not allowed in GFF3 ! # $value = '"' . $value . '"'; } ! $value =~ s/([\t\n\r%&\=;,])/sprintf("%%%X",ord($1))/ge; ! } else { ! # if it is completely empty, ! # then just make empty double ! # quotes ! $value = '""'; ! } ! push @v, $value; ! } ! $tag= lcfirst($tag) unless ($tag ! =~ /^ID|Name|Alias|Parent|Gap|Target|Derives_from|Note|Dbxref|Ontology_term$/); ! push @groups, "$tag=".join(",", at v); ! } ! # Add Target information for Feature Pairs ! if( $feat->has_tag('Target') && ! ! $feat->has_tag('Group') && ! $origfeat->isa('Bio::SeqFeature::FeaturePair') ) { ! my $target_id = $origfeat->feature1->seq_id; ! $target_id =~ s/([\t\n\r%&\=;,])/sprintf("%%%X",ord($1))/ge; ! push @groups, sprintf("Target=%s %d %d", ! $target_id, ! ( $origfeat->feature1->strand < 0 ? ! ( $origfeat->feature1->end, ! $origfeat->feature1->start) : ! ( $origfeat->feature1->start, ! $origfeat->feature1->end) ! )); ! } ! # unshift @groups, "ID=autogenerated$ID" unless ($feat->has_tag('ID')); ! my $gff_string = ""; ! if ($feat->location->isa("Bio::Location::SplitLocationI")) { ! my @locs = $feat->location->each_Location; ! foreach my $loc (@locs) { ! $gff_string .= join("\t", ! $name, ! $feat->source_tag() || '.', ! $feat->primary_tag(), ! $loc->start(), ! $loc->end(), ! $score, ! $strand, ! $frame, ! join(';', @groups)) . "\n"; } - chop $gff_string; return $gff_string; - } else { - $gff_string = join("\t", - $name, - $feat->source_tag() || '.', - $feat->primary_tag(), - $feat->start(), - $feat->end(), - $score, - $strand, - $frame, - join(';', @groups)); - } - return $gff_string; } --- 965,1106 ---- sub _gff3_string { ! my ($gff, $origfeat) = @_; ! my $feat; ! if ($origfeat->isa('Bio::SeqFeature::FeaturePair')){ ! $feat = $origfeat->feature2; ! } else { ! $feat = $origfeat; ! } ! my $ID = $gff->_incrementGFF3ID(); ! my ($score,$frame,$name,$strand); ! if( $feat->can('score') ) { ! $score = $feat->score(); ! } ! $score = '.' unless defined $score; ! if( $feat->can('frame') ) { ! $frame = $feat->frame(); ! } ! $frame = '.' unless defined $frame; ! $strand = $feat->strand(); ! if(! $strand) { ! $strand = "."; ! } elsif( $strand == 1 ) { ! $strand = '+'; ! } elsif ( $feat->strand == -1 ) { ! $strand = '-'; ! } ! if( $feat->can('seqname') ) { ! $name = $feat->seq_id(); ! $name ||= 'SEQ'; ! } else { ! $name = 'SEQ'; ! } ! my @groups; ! # force leading ID and Parent tags ! my @all_tags = grep { !/ID/ && !/Parent/ } $feat->all_tags; ! unshift @all_tags, 'Parent' if $feat->has_tag('Parent'); ! unshift @all_tags, 'ID' if $feat->has_tag('ID'); ! for my $tag ( @all_tags ) { ! # next if $tag eq 'Target'; ! if ($tag eq 'Target' && ! $origfeat->isa('Bio::SeqFeature::FeaturePair')){ ! # simple Target,start,stop ! my($target_id, $b,$e,$strand)= $feat->get_tag_values($tag); ! ($b,$e)= ($e,$b) if(defined $strand && $strand<0); ! $target_id =~ s/([\t\n\r%&\=;,])/sprintf("%%%X",ord($1))/ge; ! push @groups, sprintf("Target=%s %d %d", $target_id,$b,$e); ! next; ! } ! ! my $valuestr; ! # a string which will hold one or more values ! # for this tag, with quoted free text and ! # space-separated individual values. ! my @v; ! for my $value ( $feat->each_tag_value($tag) ) { ! if( defined $value && length($value) ) { ! #$value =~ tr/ /+/; #spaces are allowed now ! if ($value =~ /[^a-zA-Z0-9\,\;\=\.:\%\^\*\$\@\!\+\_\?\-]/) { ! $value =~ s/\t/\\t/g; # substitute tab and newline ! # characters ! $value =~ s/\n/\\n/g; # to their UNIX equivalents ! # Unescaped quotes are not allowed in GFF3 ! # $value = '"' . $value . '"'; ! } ! $value =~ s/([\t\n\r%&\=;,])/sprintf("%%%X",ord($1))/ge; ! } else { ! # if it is completely empty, ! # then just make empty double ! # quotes ! $value = '""'; ! } ! push @v, $value; } ! $tag= lcfirst($tag) unless ($tag ! =~ /^ID|Name|Alias|Parent|Gap|Target|Derives_from|Note|Dbxref|Ontology_term$/); ! push @groups, "$tag=".join(",", at v); ! } ! # Add Target information for Feature Pairs ! if( $feat->has_tag('Target') && ! ! $feat->has_tag('Group') && ! $origfeat->isa('Bio::SeqFeature::FeaturePair') ) { ! my $target_id = $origfeat->feature1->seq_id; ! $target_id =~ s/([\t\n\r%&\=;,])/sprintf("%%%X",ord($1))/ge; ! push @groups, sprintf("Target=%s %d %d", ! $target_id, ! ( $origfeat->feature1->strand < 0 ? ! ( $origfeat->feature1->end, ! $origfeat->feature1->start) : ! ( $origfeat->feature1->start, ! $origfeat->feature1->end) ! )); ! } ! # unshift @groups, "ID=autogenerated$ID" unless ($feat->has_tag('ID')); ! my $gff_string = ""; ! if ($feat->location->isa("Bio::Location::SplitLocationI")) { ! my @locs = $feat->location->each_Location; ! foreach my $loc (@locs) { ! $gff_string .= join("\t", ! $name, ! $feat->source_tag() || '.', ! $feat->primary_tag(), ! $loc->start(), ! $loc->end(), ! $score, ! $strand, ! $frame, ! join(';', @groups)) . "\n"; ! } ! chop $gff_string; ! return $gff_string; ! } else { ! $gff_string = join("\t", ! $name, ! $feat->source_tag() || '.', ! $feat->primary_tag(), ! $feat->start(), ! $feat->end(), ! $score, ! $strand, ! $frame, ! join(';', @groups)); } return $gff_string; } From bugzilla-daemon at portal.open-bio.org Thu Apr 5 12:30:34 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Thu, 5 Apr 2007 12:30:34 -0400 Subject: [Bioperl-guts-l] [Bug 2263] New: Calling revcom() on Bio::Seq::Quality dispatches the wrong method Message-ID: http://bugzilla.open-bio.org/show_bug.cgi?id=2263 Summary: Calling revcom() on Bio::Seq::Quality dispatches the wrong method Product: BioPerl Version: main-trunk Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Core Components AssignedTo: bioperl-guts-l at bioperl.org ReportedBy: mkiwala at watson.wustl.edu Calling revcom() on a Bio::Seq::Quality invokes Bio::LocatableSeq::revcom() instead of Bio::Seq::Meta::Array::revcom(). The problem is a bad "use base" statement in Bio::Seq::Quality. -- 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 Apr 5 12:41:54 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Thu, 5 Apr 2007 12:41:54 -0400 Subject: [Bioperl-guts-l] [Bug 2263] Calling revcom() on Bio::Seq::Quality dispatches the wrong method In-Reply-To: Message-ID: <200704051641.l35GfsHU024043@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2263 ------- Comment #1 from mkiwala at watson.wustl.edu 2007-04-05 12:41 EST ------- I cannot attach files to this bug for some reason. Since my diff are very short I'll just include them here. The first diff is for a new tests in t/seq_quality.t. The second diff is a single line change in Bio/Seq/Quality.pm. Index: t/seq_quality.t =================================================================== RCS file: /home/repository/bioperl/bioperl-live/t/seq_quality.t,v retrieving revision 1.1 diff -B -u -b -r1.1 seq_quality.t --- t/seq_quality.t 11 Jul 2005 14:22:39 -0000 1.1 +++ t/seq_quality.t 5 Apr 2007 16:40:07 -0000 @@ -14,7 +14,7 @@ use lib 't'; } use Test; - plan tests => 48; + plan tests => 52; } my $DEBUG = $ENV{'BIOPERLDEBUG'}; @@ -261,3 +261,15 @@ ok join (' ', @{$seq->named_submeta('trace', 2, 3, "9 9")}), '9 9'; ok $seq->named_submeta_text('trace', 2, 3, "8 8"), '8 8'; + +ok $seq = Bio::Seq::Quality->new( + -seq => "ATGGGGGTGGTGGTACCCTATGGGGGTGGTGGTACCCT", + -qual => "10 59 12 75 63 76 84 36 42 10 35 97 81 50 81 53 93 13 38 10 59 12 75 63 76 84 36 42 10 35 97 81 50 81 53 93 13 38", + -trace_indices => "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38" +); + +my $rev; +ok $rev = $seq->revcom; +ok $rev->seq eq 'AGGGTACCACCACCCCCATAGGGTACCACCACCCCCAT'; +ok $rev->qual_text eq "38 13 93 53 81 50 81 97 35 10 42 36 84 76 63 75 12 59 10 38 13 93 53 81 50 81 97 35 10 42 36 84 76 63 75 12 59 10"; + Index: Bio/Seq/Quality.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/Seq/Quality.pm,v retrieving revision 1.10.4.1 diff -B -u -b -r1.10.4.1 Quality.pm --- Bio/Seq/Quality.pm 2 Oct 2006 23:10:27 -0000 1.10.4.1 +++ Bio/Seq/Quality.pm 5 Apr 2007 16:40:00 -0000 @@ -158,7 +158,7 @@ #use overload '""' => \&to_string; -use base qw(Bio::LocatableSeq Bio::Seq::Meta::Array); +use base qw(Bio::Seq::Meta::Array); BEGIN { That is all. 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 Thu Apr 5 13:07:10 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Thu, 05 Apr 2007 17:07:10 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/Seq Quality.pm,1.11,1.12 Message-ID: <200704051707.l35H7A2w016546@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/Seq In directory dev.open-bio.org:/tmp/cvs-serv16521 Modified Files: Quality.pm Log Message: bug 2263 Index: Quality.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/Seq/Quality.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Quality.pm 26 Sep 2006 22:03:14 -0000 1.11 --- Quality.pm 5 Apr 2007 17:07:08 -0000 1.12 *************** *** 159,163 **** #use overload '""' => \&to_string; ! use base qw(Bio::LocatableSeq Bio::Seq::Meta::Array); --- 159,163 ---- #use overload '""' => \&to_string; ! use base qw(Bio::Seq::Meta::Array); From cjfields at dev.open-bio.org Thu Apr 5 13:07:23 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Thu, 05 Apr 2007 17:07:23 +0000 Subject: [Bioperl-guts-l] bioperl-live/t seq_quality.t,1.1,1.2 Message-ID: <200704051707.l35H7N3B016579@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/t In directory dev.open-bio.org:/tmp/cvs-serv16554 Modified Files: seq_quality.t Log Message: bug 2263 Index: seq_quality.t =================================================================== RCS file: /home/repository/bioperl/bioperl-live/t/seq_quality.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** seq_quality.t 11 Jul 2005 14:22:39 -0000 1.1 --- seq_quality.t 5 Apr 2007 17:07:21 -0000 1.2 *************** *** 15,19 **** } use Test; ! plan tests => 48; } --- 15,19 ---- } use Test; ! plan tests => 52; } *************** *** 262,263 **** --- 262,275 ---- ok $seq->named_submeta_text('trace', 2, 3, "8 8"), '8 8'; + + ok $seq = Bio::Seq::Quality->new( + -seq => "ATGGGGGTGGTGGTACCCTATGGGGGTGGTGGTACCCT", + -qual => "10 59 12 75 63 76 84 36 42 10 35 97 81 50 81 53 93 13 38 10 59 12 75 63 76 84 36 42 10 35 97 81 50 81 53 93 13 38", + -trace_indices => "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38" + ); + + my $rev; + ok $rev = $seq->revcom; + ok $rev->seq eq 'AGGGTACCACCACCCCCATAGGGTACCACCACCCCCAT'; + ok $rev->qual_text eq "38 13 93 53 81 50 81 97 35 10 42 36 84 76 63 75 12 59 10 38 13 93 53 81 50 81 97 35 10 42 36 84 76 63 75 12 59 10"; + From bugzilla-daemon at portal.open-bio.org Thu Apr 5 13:26:49 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Thu, 5 Apr 2007 13:26:49 -0400 Subject: [Bioperl-guts-l] [Bug 2263] Calling revcom() on Bio::Seq::Quality dispatches the wrong method In-Reply-To: Message-ID: <200704051726.l35HQncR026544@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2263 cjfields at uiuc.edu changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #2 from cjfields at uiuc.edu 2007-04-05 13:26 EST ------- I am committing this to CVS. There are some issues with Bio::Seq::Meta::Array which you should know about (see bug 2262) which we need to work on but it probably won't affect this. -- 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 mcook at dev.open-bio.org Fri Apr 6 15:42:41 2007 From: mcook at dev.open-bio.org (Malcom Cook) Date: Fri, 06 Apr 2007 19:42:41 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/DB/SeqFeature/Store/DBI mysql.pm, 1.28, 1.29 Message-ID: <200704061942.l36JgfJ0022701@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/DB/SeqFeature/Store/DBI In directory dev.open-bio.org:/tmp/cvs-serv22675 Modified Files: mysql.pm Log Message: pass the "safest" value, 3, for $if_active parameter to DBD::prepare_cached, as we don't know how caller may be using the SeqFeatureStore Index: mysql.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/SeqFeature/Store/DBI/mysql.pm,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** mysql.pm 31 Jan 2007 14:49:02 -0000 1.28 --- mysql.pm 6 Apr 2007 19:42:39 -0000 1.29 *************** *** 508,512 **** $fh->close; my $qualified_table = $self->_qualify($table); ! $dbh->do("LOAD DATA INFILE '$path' REPLACE INTO TABLE $qualified_table FIELDS OPTIONALLY ENCLOSED BY '\\''") or $self->throw($dbh->errstr); unlink $path; --- 508,512 ---- $fh->close; my $qualified_table = $self->_qualify($table); ! $dbh->do("LOAD DATA LOCAL INFILE '$path' REPLACE INTO TABLE $qualified_table FIELDS OPTIONALLY ENCLOSED BY '\\''") or $self->throw($dbh->errstr); unlink $path; *************** *** 1424,1428 **** my $query = shift; my $dbh = $self->dbh; ! my $sth = $dbh->prepare_cached($query) or $self->throw($dbh->errstr); $sth; } --- 1424,1428 ---- my $query = shift; my $dbh = $self->dbh; ! my $sth = $dbh->prepare_cached($query, {}, 3) or $self->throw($dbh->errstr); $sth; } From spiros at lokku.com Mon Apr 9 14:23:48 2007 From: spiros at lokku.com (Spiros Denaxas) Date: Mon, 9 Apr 2007 19:23:48 +0100 Subject: [Bioperl-guts-l] moving tests to use Test::More Message-ID: Hey guys, I noticed there's an open task regarding moving testing code to use Test::More etc and that Chris and Nathan are already on to it. Is there any kind of wiki page that you keep track of which modules you are already working on? I am new to this and want to contribute, having a fair amount of unit testing from work, but don't want to step over other people's work and avoid duplication as well. Any pointers where i could get started would be much appreciated :-) Thanks, Spiros ps. apologies if this is not the correct list to post this, just seemed the most intuitive choice. From bosborne at dev.open-bio.org Tue Apr 10 09:55:11 2007 From: bosborne at dev.open-bio.org (Brian Osborne) Date: Tue, 10 Apr 2007 13:55:11 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio/DB Fasta.pm,1.46,1.47 Message-ID: <200704101355.l3ADtBdP024613@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio/DB In directory dev.open-bio.org:/tmp/cvs-serv24604/Bio/DB Modified Files: Fasta.pm Log Message: Don's patch Index: Fasta.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/Fasta.pm,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** Fasta.pm 26 Sep 2006 22:03:06 -0000 1.46 --- Fasta.pm 10 Apr 2007 13:55:08 -0000 1.47 *************** *** 76,79 **** --- 76,81 ---- last. + An error will be thrown if this is not the case. + The module uses /^E(\S+)/ to extract the primary ID of each sequence from the Fasta header. During indexing, you may pass a callback routine to *************** *** 421,424 **** --- 423,427 ---- use constant RNA => 2; use constant PROTEIN => 3; + use constant DIE_ON_MISSMATCHED_LINES => 1; # if you want # Bio::DB-like object *************** *** 734,760 **** warn "indexing $file\n" if $self->{debug}; my ($offset,$id,$linelength,$type,$firstline,$count,$termination_length,$seq_lines,$last_line,%offsets); while (<$fh>) { # don't try this at home ! $termination_length ||= /\r\n$/ ? 2 : 1; # account for crlf-terminated Windows files ! if (/^>(\S+)/) { ! print STDERR "indexed $count sequences...\n" ! if $self->{debug} && (++$count%1000) == 0; ! my $pos = tell($fh); ! if ($id) { ! my $seqlength = $pos - $offset - length($_); ! $seqlength -= $termination_length * $seq_lines; ! $offsets->{$id} = &{$self->{packmeth}}($offset,$seqlength, ! $linelength,$firstline, ! $type,$base); ! } ! $id = ref($self->{makeid}) eq 'CODE' ? $self->{makeid}->($_) : $1; ! ($offset,$firstline,$linelength) = ($pos,length($_),0); ! $self->_check_linelength($linelength); ! $seq_lines = 0; ! } else { ! $linelength ||= length($_); ! $type ||= $self->_type($_); ! $seq_lines++; ! } ! $last_line = $_; } --- 737,774 ---- warn "indexing $file\n" if $self->{debug}; my ($offset,$id,$linelength,$type,$firstline,$count,$termination_length,$seq_lines,$last_line,%offsets); + my ($l3_len,$l2_len,$l_len)=(0,0,0); + while (<$fh>) { # don't try this at home ! $termination_length ||= /\r\n$/ ? 2 : 1; # account for crlf-terminated Windows files ! if (/^>(\S+)/) { ! print STDERR "indexed $count sequences...\n" ! if $self->{debug} && (++$count%1000) == 0; ! my $pos = tell($fh); ! if ($id) { ! my $seqlength = $pos - $offset - length($_); ! $seqlength -= $termination_length * $seq_lines; ! $offsets->{$id} = &{$self->{packmeth}}($offset,$seqlength, ! $linelength,$firstline, ! $type,$base); ! } ! $id = ref($self->{makeid}) eq 'CODE' ? $self->{makeid}->($_) : $1; ! ($offset,$firstline,$linelength) = ($pos,length($_),0); ! $self->_check_linelength($linelength); ! ($l3_len,$l2_len,$l_len)=(0,0,0); ! $seq_lines = 0; ! } else { ! $l3_len= $l2_len; $l2_len= $l_len; $l_len= length($_); # need to check every line :( ! if (DIE_ON_MISSMATCHED_LINES && ! $l3_len>0 && $l2_len>0 && $l3_len!=$l2_len) { ! my $fap= substr($_,0,20).".."; ! $self->throw("Each line of the fasta entry must be the same length except the last. ! Line above #$. '$fap' is $l2_len != $l3_len chars."); ! } ! ! $linelength ||= length($_); ! $type ||= $self->_type($_); ! $seq_lines++; ! } ! $last_line = $_; } *************** *** 762,780 **** # deal with last entry if ($id) { ! my $pos = tell($fh); ! my $seqlength = $pos - $offset; ! ! if ($linelength == 0) { # yet another pesky empty chr_random.fa file ! $seqlength = 0; ! } else { ! if ($last_line !~ /\s$/) { ! $seq_lines--; ! } ! $seqlength -= $termination_length * $seq_lines; ! }; ! $offsets->{$id} = &{$self->{packmeth}}($offset,$seqlength, ! $linelength,$firstline, ! $type,$base); ! } $offsets->{__termination_length} = $termination_length; return \%offsets; --- 776,794 ---- # deal with last entry if ($id) { ! my $pos = tell($fh); ! my $seqlength = $pos - $offset; ! ! if ($linelength == 0) { # yet another pesky empty chr_random.fa file ! $seqlength = 0; ! } else { ! if ($last_line !~ /\s$/) { ! $seq_lines--; ! } ! $seqlength -= $termination_length * $seq_lines; ! }; ! $offsets->{$id} = &{$self->{packmeth}}($offset,$seqlength, ! $linelength,$firstline, ! $type,$base); ! } $offsets->{__termination_length} = $termination_length; return \%offsets; From lapp at dev.open-bio.org Tue Apr 10 12:04:59 2007 From: lapp at dev.open-bio.org (Hilmar Lapp) Date: Tue, 10 Apr 2007 16:04:59 +0000 Subject: [Bioperl-guts-l] bioperl-db/Bio/DB/BioSQL ReferenceAdaptor.pm, 1.24, 1.25 Message-ID: <200704101604.l3AG4x0W024793@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-db/Bio/DB/BioSQL In directory dev.open-bio.org:/tmp/cvs-serv24784 Modified Files: ReferenceAdaptor.pm Log Message: Patch by Bryan Cardillo to fix the issue in http://lists.open-bio.org/pipermail/biosql-l/2006-August/001048.html Index: ReferenceAdaptor.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-db/Bio/DB/BioSQL/ReferenceAdaptor.pm,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** ReferenceAdaptor.pm 4 Jul 2006 22:23:12 -0000 1.24 --- ReferenceAdaptor.pm 10 Apr 2007 16:04:57 -0000 1.25 *************** *** 427,431 **** } } ! if($obj->authors()) { push(@ukqueries, { 'doc_id' => $self->_crc64($obj), --- 427,431 ---- } } ! if($obj->authors() || $obj->title() || $obj->location()) { push(@ukqueries, { 'doc_id' => $self->_crc64($obj), From bugzilla-daemon at portal.open-bio.org Tue Apr 10 15:48:44 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 10 Apr 2007 15:48:44 -0400 Subject: [Bioperl-guts-l] [Bug 2264] New: Test::More migration Message-ID: http://bugzilla.open-bio.org/show_bug.cgi?id=2264 Summary: Test::More migration Product: BioPerl Version: 1.5 branch Platform: Macintosh OS/Version: Mac OS Status: NEW Severity: enhancement Priority: P2 Component: Core Components AssignedTo: bioperl-guts-l at bioperl.org ReportedBy: s.denaxas at gmail.com My first commit, just a single file to get some feedback and such. Be gentle :-) -- 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 Apr 10 15:49:54 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 10 Apr 2007 15:49:54 -0400 Subject: [Bioperl-guts-l] [Bug 2264] Test::More migration In-Reply-To: Message-ID: <200704101949.l3AJnsLo017397@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2264 ------- Comment #1 from s.denaxas at gmail.com 2007-04-10 15:49 EST ------- Created an attachment (id=618) --> (http://bugzilla.open-bio.org/attachment.cgi?id=618&action=view) Test::More migration -- 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 Apr 10 16:02:13 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 10 Apr 2007 16:02:13 -0400 Subject: [Bioperl-guts-l] [Bug 2264] Test::More migration In-Reply-To: Message-ID: <200704102002.l3AK2DiS017753@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2264 ------- Comment #2 from bix at sendu.me.uk 2007-04-10 16:02 EST ------- Thanks, your efforts are much appreciated. Try using one of the existing Test::More t scripts (I recommend t/ESEfinder.t) as an example and go from there. For example, the BEGIN block needs updating to eval {require Test::More;} etc. Drop all the 'print ... if($DEBUG);' lines and replace with more appropriate Test::More syntax on the use_ok and ok lines. Beyond that it's looking good :) -- 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 Apr 10 16:30:49 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 10 Apr 2007 16:30:49 -0400 Subject: [Bioperl-guts-l] [Bug 2264] Test::More migration In-Reply-To: Message-ID: <200704102030.l3AKUnek019071@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2264 ------- Comment #3 from s.denaxas at gmail.com 2007-04-10 16:30 EST ------- Created an attachment (id=619) --> (http://bugzilla.open-bio.org/attachment.cgi?id=619&action=view) silly me, second try for a patch thanks for the feedback, hopefully this time its okay -- 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 Apr 10 19:06:12 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 10 Apr 2007 19:06:12 -0400 Subject: [Bioperl-guts-l] [Bug 2265] New: one more test migrated to use Test::More Message-ID: http://bugzilla.open-bio.org/show_bug.cgi?id=2265 Summary: one more test migrated to use Test::More Product: BioPerl Version: 1.5 branch Platform: Macintosh OS/Version: Mac OS Status: NEW Severity: enhancement Priority: P2 Component: Core Components AssignedTo: bioperl-guts-l at bioperl.org ReportedBy: s.denaxas at gmail.com one more! -- 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 Apr 10 19:06:35 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 10 Apr 2007 19:06:35 -0400 Subject: [Bioperl-guts-l] [Bug 2265] one more test migrated to use Test::More In-Reply-To: Message-ID: <200704102306.l3AN6Zo1025598@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2265 ------- Comment #1 from s.denaxas at gmail.com 2007-04-10 19:06 EST ------- Created an attachment (id=620) --> (http://bugzilla.open-bio.org/attachment.cgi?id=620&action=view) tab.t patch -- 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 Apr 10 21:22:57 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Wed, 11 Apr 2007 01:22:57 +0000 Subject: [Bioperl-guts-l] bioperl-live/t tab.t,1.1,1.2 trim.t,1.4,1.5 Message-ID: <200704110123.l3B1MvSp025662@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/t In directory dev.open-bio.org:/tmp/cvs-serv25637 Modified Files: tab.t trim.t Log Message: bug 2264, 2265 Index: tab.t =================================================================== RCS file: /home/repository/bioperl/bioperl-live/t/tab.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tab.t 7 Sep 2005 01:36:37 -0000 1.1 --- tab.t 11 Apr 2007 01:22:55 -0000 1.2 *************** *** 6,27 **** use strict; use vars qw($NUMTESTS); BEGIN { ! $NUMTESTS = 7; # to handle systems with no installed Test module # we include the t dir (where a copy of Test.pm is located) # as a fallback ! eval { require Test; }; if ( $@ ) { ! use lib 't'; } ! use Test; ! plan tests => $NUMTESTS; } ! use Bio::SeqIO; ! use Bio::Root::IO; my $verbose = $ENV{'BIOPERLDEBUG'}; - ok(1); my $io = Bio::SeqIO->new(-format => 'tab', --- 6,31 ---- use strict; use vars qw($NUMTESTS); + BEGIN { ! # to handle systems with no installed Test module # we include the t dir (where a copy of Test.pm is located) # as a fallback ! eval { require Test::More; }; ! if ( $@ ) { ! use lib 't/lib'; } ! ! $NUMTESTS = 8 ; ! use Test::More ; ! plan tests => $NUMTESTS ; ! } ! use_ok ('Bio::SeqIO', 'Bio::SeqIO can be used') ; ! use_ok('Bio::Root::IO', 'Bio::Root::IO can be used') ; my $verbose = $ENV{'BIOPERLDEBUG'}; my $io = Bio::SeqIO->new(-format => 'tab', *************** *** 31,36 **** while (my $seq = $io->next_seq) { ! ok defined $seq; ! ok($seq->length, 358); ! ok($seq->display_id =~ /^roa\d_drome$/); } --- 35,40 ---- while (my $seq = $io->next_seq) { ! ok ( $seq && defined $seq, 'seq is defined' ) ; ! is ( $seq->length, 358, 'check seq length' ) ; ! like ($seq->display_id, qr/^roa\d_drome$/, 'check matching' ); } Index: trim.t =================================================================== RCS file: /home/repository/bioperl/bioperl-live/t/trim.t,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** trim.t 30 Oct 2002 14:21:59 -0000 1.4 --- trim.t 11 Apr 2007 01:22:55 -0000 1.5 *************** *** 11,17 **** ##### - use strict; - #require 'dumpvar.pl'; BEGIN { --- 11,15 ---- *************** *** 19,68 **** # we include the t dir (where a copy of Test.pm is located) # as a fallback ! eval { require Test; }; if( $@ ) { ! use lib 't'; } ! use Test; ! plan tests => 7; ! } ! my $DEBUG = $ENV{'BIOPERLDEBUG'}; ! print("Checking if the Bio::Tools::Alignment::Consed module could be used...\n") if($DEBUG); ! use Bio::Tools::Alignment::Consed; ! use Bio::Root::IO; ! ok(1); ! print("Checking if the Bio::Tools::Alignment::Trim module could be used...\n") if $DEBUG; ! use Bio::Tools::Alignment::Trim; ! ok(1); ! # scope some variables my($o_consed, at singlets, at singletons, at pairs, at doublets, at multiplets,$invoker); ! # instantiate a new object ! $o_consed = Bio::Tools::Alignment::Consed->new( -acefile =>Bio::Root::IO->catfile("t","data","consed_project","edit_dir","test_project.fasta.screen.ace.1")); ! print("Checking if a new CSM::Consed object was created...\n") if( $DEBUG); ! ok defined $o_consed; ! # set the verbosity to a valid value (0) my $verbosity = $o_consed->set_verbose(0); ! # ! print("Checking if the new object is a reference to a Bio::Tools::Alignment::Consed object...\n") if($DEBUG); ! # test 3 ! ok ref($o_consed),'Bio::Tools::Alignment::Consed'; ! print("Checking if singlets can be successfully set...\n") if ($DEBUG); ! # test 4 $invoker = $o_consed->set_singlets("verbosely"); ! ok $invoker != 1; ! ! print("Checking if singlets quality can be set...\n") if ($DEBUG); ! ok !($o_consed->set_singlet_quality()); ! print("Checking if singlet and singleton qualities can be set...\n") if( $DEBUG); ! ok !($o_consed->set_trim_points_singlets_and_singletons()); --- 17,58 ---- # we include the t dir (where a copy of Test.pm is located) # as a fallback ! ! eval { ! require Test::More ; ! } ; ! if( $@ ) { ! use lib 't/lib' ; } ! ! use Test::More tests => 8 ; ! } ! my $DEBUG = $ENV{'BIOPERLDEBUG'} || 0 ; ! use_ok('Bio::Tools::Alignment::Consed', 'Bio::Tools::Alignment::Consed can be used'); ! use_ok('Bio::Root::IO', 'Bio::Root::IO can be used'); ! use_ok('Bio::Tools::Alignment::Trim', 'Bio::Tools::Alignment::Trim can be used'); ! # scope some variables my($o_consed, at singlets, at singletons, at pairs, at doublets, at multiplets,$invoker); ! # instantiate a new object $o_consed = Bio::Tools::Alignment::Consed->new( -acefile =>Bio::Root::IO->catfile("t","data","consed_project","edit_dir","test_project.fasta.screen.ace.1")); ! ok ( $o_consed && defined $o_consed, 'create new CSM::Consed object' ) ; ! # set the verbosity to a valid value (0) my $verbosity = $o_consed->set_verbose(0); ! # test 3 ! isa_ok($o_consed,'Bio::Tools::Alignment::Consed', 'creating new Bio::Tools::Alignment::Consed object') ; ! # test 4 $invoker = $o_consed->set_singlets("verbosely"); ! ok ( $invoker != 1, 'singlets can be successfully set' ) ; ! ok ( ! $o_consed->set_singlet_quality(), 'singlet quality can be set' ); ! ok ( ! $o_consed->set_trim_points_singlets_and_singletons(), 'singleton/singlet qualities can be set' ); From bugzilla-daemon at portal.open-bio.org Tue Apr 10 21:23:40 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 10 Apr 2007 21:23:40 -0400 Subject: [Bioperl-guts-l] [Bug 2264] Test::More migration In-Reply-To: Message-ID: <200704110123.l3B1NeVd032005@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2264 cjfields at uiuc.edu changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #4 from cjfields at uiuc.edu 2007-04-10 21:23 EST ------- 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 bugzilla-daemon at portal.open-bio.org Tue Apr 10 21:34:41 2007 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org) Date: Tue, 10 Apr 2007 21:34:41 -0400 Subject: [Bioperl-guts-l] [Bug 2265] one more test migrated to use Test::More In-Reply-To: Message-ID: <200704110134.l3B1YfoS032632@portal.open-bio.org> http://bugzilla.open-bio.org/show_bug.cgi?id=2265 cjfields at uiuc.edu changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #2 from cjfields at uiuc.edu 2007-04-10 21:34 EST ------- Committed to CVS. I'll likely work on converting a few tests tonight (starting with G). -- 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 Wed Apr 11 09:04:51 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Wed, 11 Apr 2007 13:04:51 +0000 Subject: [Bioperl-guts-l] bioperl-live/t SimpleAlign.t,1.51,1.52 Message-ID: <200704111304.l3BD4p3U027944@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/t In directory dev.open-bio.org:/tmp/cvs-serv27907/t Modified Files: SimpleAlign.t Log Message: select_noncont() sorts numerically by default (fixed), pass 'nosort' to prevent sorting Index: SimpleAlign.t =================================================================== RCS file: /home/repository/bioperl/bioperl-live/t/SimpleAlign.t,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** SimpleAlign.t 8 Mar 2007 17:38:23 -0000 1.51 --- SimpleAlign.t 11 Apr 2007 13:04:48 -0000 1.52 *************** *** 3,7 **** ## $Id$ use strict; ! use constant NUMTESTS => 109; use vars qw($DEBUG); $DEBUG = $ENV{'BIOPERLDEBUG'} || 0; --- 3,7 ---- ## $Id$ use strict; ! use constant NUMTESTS => 113; use vars qw($DEBUG); $DEBUG = $ENV{'BIOPERLDEBUG'} || 0; *************** *** 42,49 **** is($aln2->no_sequences, 3, 'no_sequences'); ! # test select non continous ! $aln2 = $aln->select_noncont(8,2,7); ! is($aln2->no_sequences, 3, 'no_sequences'); ! is($aln2->get_seq_by_pos(2)->id, $aln->get_seq_by_pos(7)->id, 'get+seq_by_pos'); @seqs = $aln->each_seq(); --- 42,56 ---- is($aln2->no_sequences, 3, 'no_sequences'); ! # test select non continuous-sorted by default ! $aln2 = $aln->select_noncont(6,7,8,9,10,1,2,3,4,5); ! is($aln2->no_sequences, 10, 'no_sequences'); ! is($aln2->get_seq_by_pos(2)->id, $aln->get_seq_by_pos(2)->id, 'select_noncont'); ! is($aln2->get_seq_by_pos(8)->id, $aln->get_seq_by_pos(8)->id, 'select_noncont'); ! ! # test select non continuous-nosort option ! $aln2 = $aln->select_noncont('nosort',6,7,8,9,10,1,2,3,4,5); ! is($aln2->no_sequences, 10, 'no_sequences'); ! is($aln2->get_seq_by_pos(2)->id, $aln->get_seq_by_pos(7)->id, 'select_noncont'); ! is($aln2->get_seq_by_pos(8)->id, $aln->get_seq_by_pos(3)->id, 'select_noncont'); @seqs = $aln->each_seq(); From cjfields at dev.open-bio.org Wed Apr 11 09:04:50 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Wed, 11 Apr 2007 13:04:50 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio SimpleAlign.pm,1.131,1.132 Message-ID: <200704111304.l3BD4ogw027941@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio In directory dev.open-bio.org:/tmp/cvs-serv27907/Bio Modified Files: SimpleAlign.pm Log Message: select_noncont() sorts numerically by default (fixed), pass 'nosort' to prevent sorting Index: SimpleAlign.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/SimpleAlign.pm,v retrieving revision 1.131 retrieving revision 1.132 diff -C2 -d -r1.131 -r1.132 *** SimpleAlign.pm 30 Mar 2007 07:51:46 -0000 1.131 --- SimpleAlign.pm 11 Apr 2007 13:04:48 -0000 1.132 *************** *** 902,911 **** Title : select_noncont ! Usage : $aln2 = $aln->select_noncont(1, 3) # 1st and 3rd sequences ! Function : Creates a new alignment from a subset of ! sequences. Numbering starts from 1. Sequence positions ! larger than no_sequences() will thow an error. Returns : a Bio::SimpleAlign object ! Args : array of integers for the sequences =cut --- 902,922 ---- Title : select_noncont ! Usage : # 1st and 3rd sequences, sorted ! $aln2 = $aln->select_noncont(1, 3) ! ! # 1st and 3rd sequences, sorted (same as first) ! $aln2 = $aln->select_noncont(3, 1) ! ! # 1st and 3rd sequences, unsorted ! $aln2 = $aln->select_noncont('nosort',3, 1) ! ! Function : Creates a new alignment from a subset of sequences. Numbering ! starts from 1. Sequence positions larger than no_sequences() will ! throw an error. Sorts the order added to new alignment by default, ! to prevent sorting pass 'nosort' as the first argument in the list. Returns : a Bio::SimpleAlign object ! Args : array of integers for the sequences. If the string 'nosort' is ! passed as the first argument, the sequences will not be sorted ! in the new alignment but will appear in the order listed. =cut *************** *** 913,919 **** sub select_noncont { my $self = shift; my (@pos) = @_; my $end = $self->no_sequences; ! @pos = sort @pos; foreach ( @pos ) { $self->throw("position must be a positive integer, > 0 and <= $end not [$_]") --- 924,940 ---- sub select_noncont { my $self = shift; + my $nosort = 0; + my $cr = sub {$a <=> $b}; my (@pos) = @_; + if ($pos[0] !~ m{^\d+$}) { + my $sortcmd = shift @pos; + if ($sortcmd eq 'nosort') { + $nosort = 1; + } else { + $self->throw("Command not recognized: $sortcmd. Only 'nosort' implemented at this time."); + } + } my $end = $self->no_sequences; ! @pos = sort {$a <=> $b} @pos unless $nosort; foreach ( @pos ) { $self->throw("position must be a positive integer, > 0 and <= $end not [$_]") From sendu at dev.open-bio.org Wed Apr 11 10:01:12 2007 From: sendu at dev.open-bio.org (Senduran Balasubramaniam) Date: Wed, 11 Apr 2007 14:01:12 +0000 Subject: [Bioperl-guts-l] bioperl-live/Bio SimpleAlign.pm,1.132,1.133 Message-ID: <200704111401.l3BE1Cj2029112@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/Bio In directory dev.open-bio.org:/tmp/cvs-serv29087/Bio Modified Files: SimpleAlign.pm Log Message: removed extraneous line from select_noncont, check also that input contains appropriate numbers before attmepting a numerical sort Index: SimpleAlign.pm =================================================================== RCS file: /home/repository/bioperl/bioperl-live/Bio/SimpleAlign.pm,v retrieving revision 1.132 retrieving revision 1.133 diff -C2 -d -r1.132 -r1.133 *** SimpleAlign.pm 11 Apr 2007 13:04:48 -0000 1.132 --- SimpleAlign.pm 11 Apr 2007 14:01:10 -0000 1.133 *************** *** 925,929 **** my $self = shift; my $nosort = 0; - my $cr = sub {$a <=> $b}; my (@pos) = @_; if ($pos[0] !~ m{^\d+$}) { --- 925,928 ---- *************** *** 935,944 **** } } ! my $end = $self->no_sequences; ! @pos = sort {$a <=> $b} @pos unless $nosort; ! foreach ( @pos ) { $self->throw("position must be a positive integer, > 0 and <= $end not [$_]") unless( /^\d+$/ && $_ > 0 && $_ <= $end ); } my $aln = $self->new; foreach my $p (@pos) { --- 934,946 ---- } } ! ! my $end = $self->no_sequences; ! foreach ( @pos ) { $self->throw("position must be a positive integer, > 0 and <= $end not [$_]") unless( /^\d+$/ && $_ > 0 && $_ <= $end ); } + + @pos = sort {$a <=> $b} @pos unless $nosort; + my $aln = $self->new; foreach my $p (@pos) { From cjfields at dev.open-bio.org Wed Apr 11 13:37:30 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Wed, 11 Apr 2007 17:37:30 +0000 Subject: [Bioperl-guts-l] bioperl-live/t GFF.t, 1.9, 1.10 GbrowseGFF.t, 1.1, 1.2 Gel.t, 1.1, 1.2 Genomewise.t, 1.2, 1.3 gcg.t, 1.1, 1.2 Message-ID: <200704111737.l3BHbU1Q029561@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/t In directory dev.open-bio.org:/tmp/cvs-serv29536 Modified Files: GFF.t GbrowseGFF.t Gel.t Genomewise.t gcg.t Log Message: convert to Test::More Index: GFF.t =================================================================== RCS file: /home/repository/bioperl/bioperl-live/t/GFF.t,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** GFF.t 28 Nov 2003 08:08:14 -0000 1.9 --- GFF.t 11 Apr 2007 17:37:28 -0000 1.10 *************** *** 11,26 **** # we include the t dir (where a copy of Test.pm is located) # as a fallback ! eval { require Test; }; if( $@ ) { ! use lib 't'; } ! use Test; ! plan test => 32; } - use Bio::Seq; - use Bio::Tools::GFF; - use Bio::SeqFeatureI; - use Bio::SeqFeature::Generic; my $feat = new Bio::SeqFeature::Generic( -start => 10, -end => 100, -strand => -1, -primary => 'repeat', --- 11,30 ---- # we include the t dir (where a copy of Test.pm is located) # as a fallback ! eval { require Test::More; }; if( $@ ) { ! use lib 't/lib'; } ! use Test::More; ! plan tests => 36; ! use_ok('Bio::Seq'); ! use_ok('Bio::Tools::GFF'); ! use_ok('Bio::SeqFeatureI'); ! use_ok('Bio::SeqFeature::Generic'); ! } ! ! END { ! unlink("out1.gff", "out2.gff"); } my $feat = new Bio::SeqFeature::Generic( -start => 10, -end => 100, -strand => -1, -primary => 'repeat', *************** *** 50,121 **** my $feat1 = $gff1in->next_feature(); ok($feat1); ! ok($feat1->start, $feat->start); ! ok($feat1->end, $feat->end); ! ok($feat1->primary_tag, $feat->primary_tag); ! ok($feat1->score, $feat->score); my $feat2 = $gff2in->next_feature(); ok($feat2); ! ok($feat2->start, $feat->start); ! ok($feat2->end, $feat->end); ! ok($feat2->primary_tag, $feat->primary_tag); ! ok($feat2->score, $feat->score); ! ok(($feat2->each_tag_value('sillytag'))[0], 'this is silly!;breakfast'); #test sequence-region parsing $gff2in = Bio::Tools::GFF->new(-gff_version => 2, -file => Bio::Root::IO->catfile("t","data","hg16_chroms.gff")); ! ok($gff2in->next_feature(),undef); my $seq = $gff2in->next_segment; ! ok($seq->display_id, 'chr1'); ! ok($seq->end, 246127941); ! ok($seq->start, 1); # GFF3 ! eval { require IO::String }; ! unless( $@ ) { my $str = IO::String->new; my $gffout = new Bio::Tools::GFF(-fh => $str, -gff_version => 3); my $feat_test = new Bio::SeqFeature::Generic ! (-primary_tag => 'tag', ! -source_tag => 'exon', ! -seq_id => 'testseq', ! -score => undef, ! -start => 10, ! -end => 120, ! -strand => 1, ! -tag => { ! 'bungle' => 'jungle;mumble', ! 'lion' => 'snake=tree' ! }); $feat_test->add_tag_value('giant_squid', 'lakeshore manor'); $gffout->write_feature($feat_test); seek($str,0,0); my $in = new Bio::Tools::GFF(-fh => $str, ! -gff_version => 3); my $f_recon = $in->next_feature; ! ok($f_recon->primary_tag, $feat_test->primary_tag); ! ok($f_recon->source_tag, $feat_test->source_tag); ! ok($f_recon->score, $feat_test->score); ! ok($f_recon->start, $feat_test->start); ! ok($f_recon->end, $feat_test->end); ! ok($f_recon->strand, $feat_test->strand); for my $tag ( $feat_test->get_all_tags ) { ! ok($f_recon->has_tag($tag)); ! if( $f_recon->has_tag($tag) ) { ! my @v = $feat_test->get_tag_values($tag); ! my @g = $f_recon->get_tag_values($tag); ! while( @v && @g ) { ! ok(shift @v, shift @g); ! } ! } ! } ! } else { ! for ( 17..28 ) { ! skip('cannot verify GFF3 writing tests without IO::String installed',1); } } ! END { ! unlink("out1.gff", "out2.gff"); ! } --- 54,121 ---- my $feat1 = $gff1in->next_feature(); ok($feat1); ! is($feat1->start, $feat->start); ! is($feat1->end, $feat->end); ! is($feat1->primary_tag, $feat->primary_tag); ! is($feat1->score, $feat->score); my $feat2 = $gff2in->next_feature(); ok($feat2); ! is($feat2->start, $feat->start); ! is($feat2->end, $feat->end); ! is($feat2->primary_tag, $feat->primary_tag); ! is($feat2->score, $feat->score); ! is(($feat2->each_tag_value('sillytag'))[0], 'this is silly!;breakfast'); #test sequence-region parsing $gff2in = Bio::Tools::GFF->new(-gff_version => 2, -file => Bio::Root::IO->catfile("t","data","hg16_chroms.gff")); ! is($gff2in->next_feature(),undef); my $seq = $gff2in->next_segment; ! is($seq->display_id, 'chr1'); ! is($seq->end, 246127941); ! is($seq->start, 1); # GFF3 ! SKIP: { ! eval { require IO::String }; ! skip('cannot verify GFF3 writing tests without IO::String installed',12) ! if $@; my $str = IO::String->new; my $gffout = new Bio::Tools::GFF(-fh => $str, -gff_version => 3); my $feat_test = new Bio::SeqFeature::Generic ! (-primary_tag => 'tag', ! -source_tag => 'exon', ! -seq_id => 'testseq', ! -score => undef, ! -start => 10, ! -end => 120, ! -strand => 1, ! -tag => { ! 'bungle' => 'jungle;mumble', ! 'lion' => 'snake=tree' ! }); $feat_test->add_tag_value('giant_squid', 'lakeshore manor'); $gffout->write_feature($feat_test); seek($str,0,0); my $in = new Bio::Tools::GFF(-fh => $str, ! -gff_version => 3); my $f_recon = $in->next_feature; ! is($f_recon->primary_tag, $feat_test->primary_tag); ! is($f_recon->source_tag, $feat_test->source_tag); ! is($f_recon->score, $feat_test->score); ! is($f_recon->start, $feat_test->start); ! is($f_recon->end, $feat_test->end); ! is($f_recon->strand, $feat_test->strand); for my $tag ( $feat_test->get_all_tags ) { ! ok($f_recon->has_tag($tag)); ! if( $f_recon->has_tag($tag) ) { ! my @v = $feat_test->get_tag_values($tag); ! my @g = $f_recon->get_tag_values($tag); ! while( @v && @g ) { ! is(shift @v, shift @g); ! } ! } } } ! Index: gcg.t =================================================================== RCS file: /home/repository/bioperl/bioperl-live/t/gcg.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gcg.t 28 Aug 2005 03:41:56 -0000 1.1 --- gcg.t 11 Apr 2007 17:37:28 -0000 1.2 *************** *** 13,34 **** # we include the t dir (where a copy of Test.pm is located) # as a fallback ! eval { require Test; }; if( $@ ) { ! use lib 't'; } ! use Test; ! plan tests => 4; ! } ! ! if( $error == 1 ) { ! exit(0); } - use Bio::SeqIO; - use Bio::Root::IO; - my $verbose = $ENV{'BIOPERLDEBUG'}; - ok(1); # test DOS linefeeds in gcg parser --- 13,28 ---- # we include the t dir (where a copy of Test.pm is located) # as a fallback ! eval { require Test::More; }; if( $@ ) { ! use lib 't/lib'; } ! use Test::More; ! plan tests => 5; ! use_ok('Bio::SeqIO'); ! use_ok('Bio::Root::IO'); } my $verbose = $ENV{'BIOPERLDEBUG'}; # test DOS linefeeds in gcg parser *************** *** 38,42 **** -format => 'GCG'); ok($str); ! ok ( my $seq = $str->next_seq()); ! ok(length($seq->seq) > 0 ); print "Sequence 1 of 1 from GCG stream:\n", $seq->seq, "\n" if( $verbose); --- 32,37 ---- -format => 'GCG'); ok($str); ! my $seq = $str->next_seq(); ! isa_ok ($seq, 'Bio::SeqI'); ! is(length($seq->seq), $seq->length); print "Sequence 1 of 1 from GCG stream:\n", $seq->seq, "\n" if( $verbose); Index: Genomewise.t =================================================================== RCS file: /home/repository/bioperl/bioperl-live/t/Genomewise.t,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Genomewise.t 16 Sep 2005 12:08:29 -0000 1.2 --- Genomewise.t 11 Apr 2007 17:37:28 -0000 1.3 *************** *** 5,25 **** use strict; BEGIN { ! eval { require Test; }; if( $@ ) { ! use lib 't'; } ! use Test; use vars qw($NTESTS); ! $NTESTS = 20; plan tests => $NTESTS; } - use Bio::Tools::Genomewise; - - END { - for ( $Test::ntest..$NTESTS ) { - skip("Cannot complete genomewise tests, skipping.",1); - } - } - my $inputfilename= Bio::Root::IO->catfile("t","data","genomewise.out"); --- 5,18 ---- use strict; BEGIN { ! eval { require Test::More; }; if( $@ ) { ! use lib 't/lib'; } ! use Test::More; use vars qw($NTESTS); ! $NTESTS = 21; plan tests => $NTESTS; + use_ok('Bio::Tools::Genomewise'); } my $inputfilename= Bio::Root::IO->catfile("t","data","genomewise.out"); *************** *** 32,47 **** my @e = $t[0]->exons; ! ok ($t[0]->source_tag, 'genomewise'); ! ok ($e[0]->source_tag, 'genomewise'); ! ok ($t[0]->primary_tag, 'transcript'); ! ok ($e[0]->primary_tag, 'exon'); ! ok (scalar($t[0]->exons), 5); ! ok ($t[0]->start, 4761); ! ok ($t[0]->end, 6713); ! ok ($e[0]->start,4761); ! ok ($e[0]->end, 4874); my ($phase) = $e[0]->each_tag_value('phase'); ! ok ($phase,0); open(FH,$inputfilename); --- 25,40 ---- my @e = $t[0]->exons; ! is ($t[0]->source_tag, 'genomewise'); ! is ($e[0]->source_tag, 'genomewise'); ! is ($t[0]->primary_tag, 'transcript'); ! is ($e[0]->primary_tag, 'exon'); ! is (scalar($t[0]->exons), 5); ! is ($t[0]->start, 4761); ! is ($t[0]->end, 6713); ! is ($e[0]->start,4761); ! is ($e[0]->end, 4874); my ($phase) = $e[0]->each_tag_value('phase'); ! is ($phase,0); open(FH,$inputfilename); *************** *** 53,77 **** @e = $t[0]->exons; ! ok ($t[0]->source_tag, 'genomewise'); ! ok ($e[0]->source_tag, 'genomewise'); ! ok ($t[0]->primary_tag, 'transcript'); ! ok ($e[0]->primary_tag, 'exon'); ! ok (scalar($t[0]->exons), 3); ! ok ($t[0]->start, 9862); ! ok ($t[0]->end, 10316); ! ok ($e[1]->start,10024); ! ok ($e[1]->end, 10211); ($phase) = $e[2]->each_tag_value('phase'); ! ok ($phase,2); ! ! ! ! ! ! ! ! ! --- 46,61 ---- @e = $t[0]->exons; ! is ($t[0]->source_tag, 'genomewise'); ! is ($e[0]->source_tag, 'genomewise'); ! is ($t[0]->primary_tag, 'transcript'); ! is ($e[0]->primary_tag, 'exon'); ! is (scalar($t[0]->exons), 3); ! is ($t[0]->start, 9862); ! is ($t[0]->end, 10316); ! is ($e[1]->start,10024); ! is ($e[1]->end, 10211); ($phase) = $e[2]->each_tag_value('phase'); ! is ($phase,2); Index: GbrowseGFF.t =================================================================== RCS file: /home/repository/bioperl/bioperl-live/t/GbrowseGFF.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GbrowseGFF.t 9 Jun 2005 14:59:21 -0000 1.1 --- GbrowseGFF.t 11 Apr 2007 17:37:28 -0000 1.2 *************** *** 11,29 **** # we include the t dir (where a copy of Test.pm is located) # as a fallback ! eval { require Test; }; if( $@ ) { ! use lib 't'; } ! use Test; ! plan test => 2; } - use Bio::SearchIO; - use Bio::SearchIO::Writer::GbrowseGFF; - use Bio::Root::IO; - END { unlink(Bio::Root::IO->catfile(qw(t data gbrowsegff.out)) ); } my $in = Bio::SearchIO->new(-format => 'blast', -file => Bio::Root::IO->catfile( --- 11,29 ---- # we include the t dir (where a copy of Test.pm is located) # as a fallback ! eval { require Test::More; }; if( $@ ) { ! use lib 't/lib'; } ! use Test::More; ! plan tests => 5; ! use_ok('Bio::SearchIO'); ! use_ok('Bio::SearchIO::Writer::GbrowseGFF'); ! use_ok('Bio::Root::IO'); } END { unlink(Bio::Root::IO->catfile(qw(t data gbrowsegff.out)) ); } + my $in = Bio::SearchIO->new(-format => 'blast', -file => Bio::Root::IO->catfile( Index: Gel.t =================================================================== RCS file: /home/repository/bioperl/bioperl-live/t/Gel.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Gel.t 27 Jan 2006 10:52:04 -0000 1.1 --- Gel.t 11 Apr 2007 17:37:28 -0000 1.2 *************** *** 9,33 **** # we include the t dir (where a copy of Test.pm is located) # as a fallback ! eval { require Test; }; if( $@ ) { ! use lib 't'; } ! use Test; ! plan test => 7 } ! ! use Bio::PrimarySeq; ! use Bio::Restriction::Analysis; ! use Bio::Tools::Gel; ! ok(1); ! ! my $seq1 = Bio::PrimarySeq->new(-id=>'groundhog day', -seq=>'AAAAAAAAAGAATTCTTTTTTTTTTTTTTGAATTCGGGGGGGGGGGGGGGGGGGG'); - my $ra=Bio::Restriction::Analysis->new(-seq=>$seq1); ! ok my @cuts = $ra->fragments('EcoRI'), 3; ! ok my $gel = Bio::Tools::Gel->new(-seq=>\@cuts,-dilate=>10); --- 9,28 ---- # we include the t dir (where a copy of Test.pm is located) # as a fallback ! eval { require Test::More; }; if( $@ ) { ! use lib 't/lib'; } ! use Test::More; ! plan tests => 9; ! use_ok('Bio::PrimarySeq'); ! use_ok('Bio::Restriction::Analysis'); ! use_ok('Bio::Tools::Gel'); ! } my $seq1 = Bio::PrimarySeq->new(-id=>'groundhog day', -seq=>'AAAAAAAAAGAATTCTTTTTTTTTTTTTTGAATTCGGGGGGGGGGGGGGGGGGGG'); my $ra=Bio::Restriction::Analysis->new(-seq=>$seq1); ! is my @cuts = $ra->fragments('EcoRI'), 3; ok my $gel = Bio::Tools::Gel->new(-seq=>\@cuts,-dilate=>10); *************** *** 37,41 **** foreach my $band (sort {$b <=> $a} keys %bands){ #print $band,"\t", sprintf("%.1f", $bands{$band}), "\n"; ! ok $bands[$c], sprintf("%.0f", $bands{$band}); $c++; } --- 32,36 ---- foreach my $band (sort {$b <=> $a} keys %bands){ #print $band,"\t", sprintf("%.1f", $bands{$band}), "\n"; ! is $bands[$c], sprintf("%.0f", $bands{$band}); $c++; } From cjfields at dev.open-bio.org Wed Apr 11 14:54:37 2007 From: cjfields at dev.open-bio.org (Christopher John Fields) Date: Wed, 11 Apr 2007 18:54:37 +0000 Subject: [Bioperl-guts-l] bioperl-live/t GOterm.t, 1.10, 1.11 GeneCoordinateMapper.t, 1.15, 1.16 Geneid.t, 1.1, 1.2 Genewise.t, 1.7, 1.8 GraphAdaptor.t, 1.2, 1.3 Message-ID: <200704111854.l3BIsbAJ029703@dev.open-bio.org> Update of /home/repository/bioperl/bioperl-live/t In directory dev.open-bio.org:/tmp/cvs-serv29678 Modified Files: GOterm.t GeneCoordinateMapper.t Geneid.t Genewise.t GraphAdaptor.t Log Message: convert to Test::More Index: GOterm.t =================================================================== RCS file: /home/repository/bioperl/bioperl-live/t/GOterm.t,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** GOterm.t 17 Sep 2005 02:11:21 -0000 1.10 --- GOterm.t 11 Apr 2007 18:54:35 -0000 1.11 *************** *** 7,11 **** use strict; ! use vars qw($HAVEGRAPHDIRECTED $NUMTESTS $DEBUG); $DEBUG = $ENV{'BIOPERLDEBUG'} || 0; BEGIN { --- 7,11 ---- use strict; ! use vars qw($NUMTESTS $DEBUG); $DEBUG = $ENV{'BIOPERLDEBUG'} || 0; BEGIN { *************** *** 13,158 **** # we include the t dir (where a copy of Test.pm is located) # as a fallback ! eval { require Test; }; if( $@ ) { ! use lib 't'; ! } ! use Test; ! eval {require Graph::Directed; ! $HAVEGRAPHDIRECTED=1; ! require Bio::Ontology::GOterm; ! require Bio::Ontology::Ontology; ! }; ! if ($@) { ! $HAVEGRAPHDIRECTED = 0; } ! plan tests => ($NUMTESTS = 59); ! } ! ! END { ! foreach ( $Test::ntest..$NUMTESTS) { ! skip('Unable to run all of the GOterm tests ',1); ! } } - exit(0) unless $HAVEGRAPHDIRECTED; - - my $obj = Bio::Ontology::GOterm->new(); - - ok( $obj->isa( "Bio::Ontology::GOterm" ) ); - - $obj->init(); - - ok( $obj->to_string() ); - - - ok( $obj->GO_id( "GO:0003947" ), "GO:0003947" ); - ok( $obj->GO_id(), "GO:0003947" ); - - - ok( $obj->get_dblinks(), 0 ); - - $obj->add_dblink( ( "dAA", "dAB" ) ); - ok( scalar($obj->get_dblinks()), 2 ); - my @df1 = $obj->get_dblinks(); - ok( $df1[ 0 ], "dAA" ); - ok( $df1[ 1 ], "dAB" ); - ok( $obj->get_dblinks(), 2 ); - - my @df2 = $obj->remove_dblinks(); - ok( $df2[ 0 ], "dAA" ); - ok( $df2[ 1 ], "dAB" ); - - ok( $obj->get_dblinks(), 0 ); - ok( $obj->remove_dblinks(), 0 ); - - - ok( $obj->get_secondary_GO_ids(), 0 ); - - $obj->add_secondary_GO_id( ( "GO:0000000", "GO:1234567" ) ); - ok( scalar($obj->get_secondary_GO_ids()), 2 ); - my @si1 = $obj->get_secondary_GO_ids(); - ok( $si1[ 0 ], "GO:0000000" ); - ok( $si1[ 1 ], "GO:1234567" ); - ok( $obj->get_secondary_GO_ids(), 2 ); - - my @si2 = $obj->remove_secondary_GO_ids(); - ok( $si2[ 0 ], "GO:0000000" ); - ok( $si2[ 1 ], "GO:1234567" ); - - ok( $obj->get_secondary_GO_ids(), 0 ); - ok( $obj->remove_secondary_GO_ids(), 0 ); - - - - ok( $obj->identifier( "0003947" ), "0003947" ); - ok( $obj->identifier(), "0003947" ); - - ok( $obj->name( "N-acetylgalactosaminyltransferase" ), "N-acetylgalactosaminyltransferase" ); - ok( $obj->name(), "N-acetylgalactosaminyltransferase" ); - - ok( $obj->definition( "Catalysis of ..." ), "Catalysis of ..." ); - ok( $obj->definition(), "Catalysis of ..." ); - - ok( $obj->version( "666" ), "666" ); - ok( $obj->version(), "666" ); - - ok( $obj->ontology( "category 1 name" ) ); - ok( $obj->ontology()->name(), "category 1 name" ); - - my $ont = Bio::Ontology::Ontology->new(); - ok( $ont->name( "category 2 name" ) ); - - ok( $obj->ontology( $ont ) ); - ok( $obj->ontology()->name(), "category 2 name" ); - - ok( $obj->is_obsolete( 1 ), 1 ); - ok( $obj->is_obsolete(), 1 ); - - ok( $obj->comment( "Consider the term ..." ), "Consider the term ..." ); - ok( $obj->comment(), "Consider the term ..." ); - - ok( $obj->get_synonyms(), 0 ); - - $obj->add_synonym( ( "AA", "AB" ) ); - my @al1 = $obj->get_synonyms(); - ok( scalar(@al1), 2 ); - ok( $al1[ 0 ], "AA" ); - ok( $al1[ 1 ], "AB" ); - - my @al2 = $obj->remove_synonyms(); - ok( $al2[ 0 ], "AA" ); - ok( $al2[ 1 ], "AB" ); - - ok( $obj->get_synonyms(), 0 ); - ok( $obj->remove_synonyms(), 0 ); - - - - $obj->add_synonym( ( "AA", "AB" ) ); - $obj->add_dblink( ( "dAA", "dAB" ) ); - $obj->add_secondary_GO_id( ( "GO:1234567", "GO:1234567" ) ); - - $obj->init(); - ok( $obj->identifier(), undef ); # don't make up identifiers - ok( $obj->name(), undef ); - ok( $obj->definition(), undef ); - ok( $obj->is_obsolete(), 0 ); - ok( $obj->comment(), undef ); - - - $obj = Bio::Ontology::GOterm->new( -go_id => "0016847", - -name => "1-aminocyclopropane-1-carboxylate synthase", - -definition => "Catalysis of ...", - -is_obsolete => 0, - -version => "6.6.6", - -ontology => "cat", - -comment => "X" ); ! ok( $obj->identifier(), "GO:0016847" ); ! ok( $obj->name(), "1-aminocyclopropane-1-carboxylate synthase" ); ! ok( $obj->definition(), "Catalysis of ..." ); ! ok( $obj->is_obsolete(), 0 ); ! ok( $obj->comment(), "X" ); ! ok( $obj->version(), "6.6.6" ); ! ok( $obj->ontology()->name(), "cat" ); --- 13,152 ---- # we include the t dir (where a copy of Test.pm is located) # as a fallback ! eval { require Test::More; }; if( $@ ) { ! use lib 't/lib'; } ! use Test::More; ! plan tests => ($NUMTESTS = 61); } ! SKIP: { ! eval {require Graph::Directed; }; ! if ($@) { ! skip('Unable to run all of the GOterm tests ',$NUMTESTS); ! } ! require_ok('Bio::Ontology::GOterm'); ! require_ok('Bio::Ontology::Ontology'); ! ! my $obj = Bio::Ontology::GOterm->new(); ! ! isa_ok( $obj,"Bio::Ontology::GOterm"); ! ! $obj->init(); ! ! like( $obj->to_string(), qr'-- GO id:' ); ! ! ! is( $obj->GO_id( "GO:0003947" ), "GO:0003947" ); ! is( $obj->GO_id(), "GO:0003947" ); ! ! ! is( $obj->get_dblinks(), 0 ); ! ! $obj->add_dblink( ( "dAA", "dAB" ) ); ! is( scalar($obj->get_dblinks()), 2 ); ! my @df1 = $obj->get_dblinks(); ! is( $df1[ 0 ], "dAA" ); ! is( $df1[ 1 ], "dAB" ); ! is( $obj->get_dblinks(), 2 ); ! ! my @df2 = $obj->remove_dblinks(); ! is( $df2[ 0 ], "dAA" ); ! is( $df2[ 1 ], "dAB" ); ! ! is( $obj->get_dblinks(), 0 ); ! is( $obj->remove_dblinks(), 0 ); ! ! ! is( $obj->get_secondary_GO_ids(), 0 ); ! ! $obj->add_secondary_GO_id( ( "GO:0000000", "GO:1234567" ) ); ! is( scalar($obj->get_secondary_GO_ids()), 2 ); ! my @si1 = $obj->get_secondary_GO_ids(); ! is( $si1[ 0 ], "GO:0000000" ); ! is( $si1[ 1 ], "GO:1234567" ); ! is( $obj->get_secondary_GO_ids(), 2 ); ! ! my @si2 = $obj->remove_secondary_GO_ids(); ! is( $si2[ 0 ], "GO:0000000" ); ! is( $si2[ 1 ], "GO:1234567" ); ! ! is( $obj->get_secondary_GO_ids(), 0 ); ! is( $obj->remove_secondary_GO_ids(), 0 ); ! ! ! ! is( $obj->identifier( "0003947" ), "0003947" ); ! is( $obj->identifier(), "0003947" ); ! ! is( $obj->name( "N-acetylgalactosaminyltransferase" ), "N-acetylgalactosaminyltransferase" ); ! is( $obj->name(), "N-acetylgalactosaminyltransferase" ); ! ! is( $obj->definition( "Catalysis of ..." ), "Catalysis of ..." ); ! is( $obj->definition(), "Catalysis of ..." ); ! ! is( $obj->version( "666" ), "666" ); ! is( $obj->version(), "666" ); ! ! ok( $obj->ontology( "category 1 name" ) ); ! is( $obj->ontology()->name(), "category 1 name" ); ! ! my $ont = Bio::Ontology::Ontology->new(); ! ok( $ont->name( "category 2 name" ) ); ! ! ok( $obj->ontology( $ont ) ); ! is( $obj->ontology()->name(), "category 2 name" ); ! ! is( $obj->is_obsolete( 1 ), 1 ); ! is( $obj->is_obsolete(), 1 ); ! ! is( $obj->comment( "Consider the term ..." ), "Consider the term ..." ); ! is( $obj->comment(), "Consider the term ..." ); ! ! is( $obj->get_synonyms(), 0 ); ! ! $obj->add_synonym( ( "AA", "AB" ) ); ! my @al1 = $obj->get_synonyms(); ! is( scalar(@al1), 2 ); ! is( $al1[ 0 ], "AA" ); ! is( $al1[ 1 ], "AB" ); ! ! my @al2 = $obj->remove_synonyms(); ! is( $al2[ 0 ], "AA" ); ! is( $al2[ 1 ], "AB" ); ! ! is( $obj->get_synonyms(), 0 ); ! is( $obj->remove_synonyms(), 0 ); ! ! ! ! $obj->add_synonym( ( "AA", "AB" ) ); ! $obj->add_dblink( ( "dAA", "dAB" ) ); ! $obj->add_secondary_GO_id( ( "GO:1234567", "GO:1234567" ) ); ! ! $obj->init(); ! is( $obj->identifier(), undef ); # don't make up identifiers ! is( $obj->name(), undef ); ! is( $obj->definition(), undef ); ! is( $obj->is_obsolete(), 0 ); ! is( $obj->comment(), undef ); ! ! ! $obj = Bio::Ontology::GOterm->new( -go_id => "0016847", ! -name => "1-aminocyclopropane-1-carboxylate synthase", ! -definition => "Catalysis of ...", ! -is_obsolete => 0, ! -version => "6.6.6", ! -ontology => "cat", ! -comment => "X" ); ! ! is( $obj->identifier(), "GO:0016847" ); ! is( $obj->name(), "1-aminocyclopropane-1-carboxylate synthase" ); ! is( $obj->definition(), "Catalysis of ..." ); ! is( $obj->is_obsolete(), 0 ); ! is( $obj->comment(), "X" ); ! is( $obj->version(), "6.6.6" ); ! is( $obj->ontology()->name(), "cat" ); + } \ No newline at end of file Index: Genewise.t =================================================================== RCS file: /home/repository/bioperl/bioperl-live/t/Genewise.t,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Genewise.t 16 Sep 2005 12:03:54 -0000 1.7 --- Genewise.t 11 Apr 2007 18:54:35 -0000 1.8 *************** *** 5,26 **** use strict; BEGIN { ! eval { require Test; }; if( $@ ) { ! use lib 't'; } ! use Test; use vars qw($NTESTS); ! $NTESTS = 51; plan tests => $NTESTS; ! } ! use Bio::Tools::Genewise; ! use Bio::SeqIO; ! use Bio::SearchIO; ! use Bio::Root::IO; ! ! END { ! for ( $Test::ntest..$NTESTS ) { ! skip("Cannot run remaining Genewise tests, skipping.",1); ! } } --- 5,20 ---- use strict; BEGIN { ! eval { require Test::More; }; if( $@ ) { ! use lib 't/lib'; } ! use Test::More; use vars qw($NTESTS); ! $NTESTS = 55; plan tests => $NTESTS; ! use_ok('Bio::Tools::Genewise'); ! use_ok('Bio::SeqIO'); ! use_ok('Bio::SearchIO'); ! use_ok('Bio::Root::IO'); } *************** *** 34,59 **** my @e = $t[0]->exons; ! ok ($t[0]->seq_id, 'Scaffold_2042.1'); ! ok ($e[0]->seq_id, 'Scaffold_2042.1'); ! ok ($t[0]->source_tag, 'genewise'); ! ok ($e[0]->source_tag, 'genewise'); ! ok ($t[0]->primary_tag, 'transcript'); ! ok ($e[0]->primary_tag, 'exon'); ! ok (scalar($t[0]->exons), 18); ! ok ($t[0]->start, 22265); ! ok ($t[0]->end, 37062); ! ok ($e[0]->start,22265); ! ok ($e[0]->end, 22396); my ($phase) = $e[0]->each_tag_value('phase'); ! ok ($phase,0); my ($sf)= $e[0]->each_tag_value('supporting_feature'); ! ok ($sf->feature1->seq_id,'Scaffold_2042.1'); ! ok ($sf->feature1->start,22265); ! ok ($sf->feature1->end,22396); ! ok ($sf->feature2->seq_id,'SINFRUP00000067802'); ! ok ($sf->feature2->start,1); ! ok ($sf->feature2->end,44); ! ok ($sf->feature1->end,22396); open(FH,$inputfilename); --- 28,53 ---- my @e = $t[0]->exons; ! is ($t[0]->seq_id, 'Scaffold_2042.1'); ! is ($e[0]->seq_id, 'Scaffold_2042.1'); ! is ($t[0]->source_tag, 'genewise'); ! is ($e[0]->source_tag, 'genewise'); ! is ($t[0]->primary_tag, 'transcript'); ! is ($e[0]->primary_tag, 'exon'); ! is (scalar($t[0]->exons), 18); ! is ($t[0]->start, 22265); ! is ($t[0]->end, 37062); ! is ($e[0]->start,22265); ! is ($e[0]->end, 22396); my ($phase) = $e[0]->each_tag_value('phase'); ! is ($phase,0); my ($sf)= $e[0]->each_tag_value('supporting_feature'); ! is ($sf->feature1->seq_id,'Scaffold_2042.1'); ! is ($sf->feature1->start,22265); ! is ($sf->feature1->end,22396); ! is ($sf->feature2->seq_id,'SINFRUP00000067802'); ! is ($sf->feature2->start,1); ! is ($sf->feature2->end,44); ! is ($sf->feature1->end,22396); open(FH,$inputfilename); *************** *** 65,83 **** @e = $t[0]->exons; ! ok (scalar($t[0]->exons), 18); ! ok ($t[0]->start, 22265); ! ok ($t[0]->end, 37062); ! ok ($e[0]->start,22265); ! ok ($e[0]->end, 22396); ($phase) = $e[0]->each_tag_value('phase'); ! ok ($phase,0); ($sf)= $e[0]->each_tag_value('supporting_feature'); ! ok ($sf->feature1->seq_id,'Scaffold_2042.1'); ! ok ($sf->feature1->start,22265); ! ok ($sf->feature1->end,22396); ! ok ($sf->feature2->seq_id,'SINFRUP00000067802'); ! ok ($sf->feature2->start,1); ! ok ($sf->feature2->end,44); ! ok ($sf->feature1->end,22396); $parser = new Bio::SearchIO(-file => --- 59,77 ---- @e = $t[0]->exons; ! is (scalar($t[0]->exons), 18); ! is ($t[0]->start, 22265); ! is ($t[0]->end, 37062); ! is ($e[0]->start,22265); ! is ($e[0]->end, 22396); ($phase) = $e[0]->each_tag_value('phase'); ! is ($phase,0); ($sf)= $e[0]->each_tag_value('supporting_feature'); ! is ($sf->feature1->seq_id,'Scaffold_2042.1'); ! is ($sf->feature1->start,22265); ! is ($sf->feature1->end,22396); ! is ($sf->feature2->seq_id,'SINFRUP00000067802'); ! is ($sf->feature2->start,1); ! is ($sf->feature2->end,44); ! is ($sf->feature1->end,22396); $parser = new Bio::SearchIO(-file => *************** *** 86,120 **** -wisetype => 'genewise'); my $result = $parser->next_result; - skip(1,'swapping query/name need to reconsider how this done'); - #ok($result->query_name, 'SINFRUP00000067802'); my $hit = $result->next_hit; ! skip(1,'swapping query/name need to reconsider how this done'); ! #ok($hit->name, 'Scaffold_2042.1'); ! ok($hit->score, 2054.68); my $hsp = $hit->next_hsp; ! ok($hsp->query->start,22265); ! ok($hsp->query->end,22396); ! ok($hsp->query->strand,1); ! ok($hsp->query->score, 2054.68); ! ok($hsp->hit->start,1); ! ok($hsp->hit->end,44); ! ok($hsp->hit->strand,0); ! ok($hsp->hit->score, 2054.68); $hsp = $hit->next_hsp; ! ok($hsp->query->start,24224); ! ok($hsp->query->end,24328); ! ok($hsp->hit->start,45); ! ok($hsp->hit->end,79); $hsp = $hit->next_hsp; ! ok($hsp->query->start,24471); ! ok($hsp->query->end,24513); ! ok($hsp->hit->start,80); ! ok($hsp->hit->end,93); --- 80,118 ---- -wisetype => 'genewise'); my $result = $parser->next_result; my $hit = $result->next_hit; ! SKIP: { ! skip('TODO:swapping query/name need to reconsider how this done',1); ! is($result->query_name, 'SINFRUP00000067802'); ! } ! SKIP: { ! skip('TODO:swapping query/name need to reconsider how this done',1); ! is($hit->name, 'Scaffold_2042.1'); ! } ! is($hit->score, 2054.68); my $hsp = $hit->next_hsp; ! is($hsp->query->start,22265); ! is($hsp->query->end,22396); ! is($hsp->query->strand,1); ! is($hsp->query->score, 2054.68); ! is($hsp->hit->start,1); ! is($hsp->hit->end,44); ! is($hsp->hit->strand,0); ! is($hsp->hit->score, 2054.68); $hsp = $hit->next_hsp; ! is($hsp->query->start,24224); ! is($hsp->query->end,24328); ! is($hsp->hit->start,45); ! is($hsp->hit->end,79); $hsp = $hit->next_hsp; ! is($hsp->query->start,24471); ! is($hsp->query->end,24513); ! is($hsp->hit->start,80); ! is($hsp->hit->end,93); Index: GeneCoordinateMapper.t =================================================================== RCS file: /home/repository/bioperl/bioperl-live/t/GeneCoordinateMapper.t,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** GeneCoordinateMapper.t 21 Apr 2004 14:01:47 -0000 1.15 --- GeneCoordinateMapper.t 11 Apr 2007 18:54:35 -0000 1.16 *************** *** 11,36 **** # we include the t dir (where a copy of Test.pm is located) # as a fallback ! eval { require Test; }; if( $@ ) { ! use lib 't'; } ! use Test; ! plan tests => 113; } - use Bio::Location::Simple; - use Bio::Coordinate::Pair; - use Bio::Coordinate::Result; - use Bio::Coordinate::Result::Match; - use Bio::Coordinate::Result::Gap; - use Bio::Coordinate::ExtrapolatingPair; - use Bio::Coordinate::Collection; - - use vars qw($DEBUG); - ok(1); - - # --- 11,31 ---- # we include the t dir (where a copy of Test.pm is located) # as a fallback ! eval { require Test::More; }; if( $@ ) { ! use lib 't/lib'; } ! use Test::More; ! plan tests => 119; ! use_ok('Bio::Location::Simple'); ! use_ok('Bio::Coordinate::Pair'); ! use_ok('Bio::Coordinate::Result'); ! use_ok('Bio::Coordinate::Result::Match'); ! use_ok('Bio::Coordinate::Result::Gap'); ! use_ok('Bio::Coordinate::ExtrapolatingPair'); ! use_ok('Bio::Coordinate::Collection'); } use vars qw($DEBUG); # *************** *** 54,60 **** (-start => 3, -end => 4, -strand=> 1 ); my $resr = $pairr->map($posr); ! ok $resr->start, 11; ! ok $resr->end, 12; ! ok $resr->strand, -1; --- 49,55 ---- (-start => 3, -end => 4, -strand=> 1 ); my $resr = $pairr->map($posr); ! is $resr->start, 11; ! is $resr->end, 12; ! is $resr->strand, -1; *************** *** 74,80 **** ok $pair->test; ! ok $pair->strand(), 1; # = in->strand * out->strand ! ok $pair->in->seq_id(), 'propeptide'; ! ok $pair->strict(), 1; my ($count, $pos, $pos2, $res, $match, $res2); --- 69,75 ---- ok $pair->test; ! is $pair->strand(), 1; # = in->strand * out->strand ! is $pair->in->seq_id(), 'propeptide'; ! is $pair->strict(), 1; my ($count, $pos, $pos2, $res, $match, $res2); *************** *** 85,93 **** $res = $pair->map($pos); ! ok $res->isa('Bio::Location::Simple'); ! ok $res->start, 5; ! ok $res->end, 5; ! ok $res->strand, -1; ! ok $res->seq_id, 'peptide'; --- 80,88 ---- $res = $pair->map($pos); ! isa_ok $res, 'Bio::Location::Simple'; ! is $res->start, 5; ! is $res->end, 5; ! is $res->strand, -1; ! is $res->seq_id, 'peptide'; *************** *** 96,100 **** $res = $pair->map($pos); ! ok $res, undef; # --- 91,95 ---- $res = $pair->map($pos); ! is $res, undef; # *************** *** 106,113 **** ok $res = $pair->map($pos2); ! ok $res->start, 0; ! ok $res->end, 2; ! ok $res->seq_id, 'peptide'; ! ok $res->strand, -1; --- 101,108 ---- ok $res = $pair->map($pos2); ! is $res->start, 0; ! is $res->end, 2; ! is $res->seq_id, 'peptide'; ! is $res->strand, -1; *************** *** 117,122 **** $pos2 = Bio::Location::Simple->new (-start => 40, -end => 41, -strand=> 1 ); ok $res = $pair->map($pos2); ! ok $res->start, 20; ! ok $res->end, 20; # --- 112,117 ---- $pos2 = Bio::Location::Simple->new (-start => 40, -end => 41, -strand=> 1 ); ok $res = $pair->map($pos2); ! is $res->start, 20; ! is $res->end, 20; # *************** *** 125,130 **** $pos2 = Bio::Location::Simple->new (-start => 19, -end => 41, -strand=> 1 ); ok $res = $pair->map($pos2); ! ok $res->start, 1; ! ok $res->end, 20; # --- 120,125 ---- $pos2 = Bio::Location::Simple->new (-start => 19, -end => 41, -strand=> 1 ); ok $res = $pair->map($pos2); ! is $res->start, 1; ! is $res->end, 20; # *************** *** 149,162 **** (-start => 38, -end => 40, -strand=> 1 ); $res = $pair->map($pos); ! ok $res->start, 1; ! ok $res->end, 3; ! ok $res->strand, -1; $pos = Bio::Location::Simple->new (-start => 1, -end => 3, -strand=> 1 ); $res = $pair->map($pos); ! ok $res->start, 38; ! ok $res->end, 40; ! ok $res->strand, -1; --- 144,157 ---- (-start => 38, -end => 40, -strand=> 1 ); $res = $pair->map($pos); ! is $res->start, 1; ! is $res->end, 3; ! is $res->strand, -1; $pos = Bio::Location::Simple->new (-start => 1, -end => 3, -strand=> 1 ); $res = $pair->map($pos); ! is $res->start, 38; ! is $res->end, 40; ! is $res->strand, -1; *************** *** 173,177 **** #$m->verbose(2); ! ok $m->peptide_offset(5), 5; --- 168,172 ---- #$m->verbose(2); ! is $m->peptide_offset(5), 5; *************** *** 181,188 **** $res = $m->map($pos); ! ok $res->start, 20; ! ok $res->end, 20; ! ok $res->strand, 1; ! ok $res->seq_id, 'peptide'; --- 176,183 ---- $res = $m->map($pos); ! is $res->start, 20; ! is $res->end, 20; ! is $res->strand, 1; ! is $res->seq_id, 'peptide'; *************** *** 195,206 **** (-start => 4, -end => 5, -strand=> 1 ); $res = $m->map($pos); ! ok $res->start, -1; ! ok $res->end, 0; ! ok $m->nozero('in&out'), 'in&out'; $res = $m->map($pos); ! ok $res->start, -2; ! ok $res->end, -1; ! ok $m->nozero(0), 0; --- 190,201 ---- (-start => 4, -end => 5, -strand=> 1 ); $res = $m->map($pos); ! is $res->start, -1; ! is $res->end, 0; ! is $m->nozero('in&out'), 'in&out'; $res = $m->map($pos); ! is $res->start, -2; ! is $res->end, -1; ! is $m->nozero(0), 0; *************** *** 210,226 **** (-start => 5, -end => 5, -strand=> 1 ); $res = $m->map($pos); ! ok $res->start, 10; # cds -> propeptide ! ok $m->in('cds'), 'cds'; ! ok $m->out('propeptide'), 'propeptide'; $res = $m->map($pos); ! ok $res->start, 2; ok $res = $m->_translate($pos); ! ok $res->start, 2; ok $res = $m->_reverse_translate($pos); ! ok $res->start, 13; ! ok $res->end, 15; $pos = Bio::Location::Simple->new --- 205,221 ---- (-start => 5, -end => 5, -strand=> 1 ); $res = $m->map($pos); ! is $res->start, 10; # cds -> propeptide ! is $m->in('cds'), 'cds'; ! is $m->out('propeptide'), 'propeptide'; $res = $m->map($pos); ! is $res->start, 2; ok $res = $m->_translate($pos); ! is $res->start, 2; ok $res = $m->_reverse_translate($pos); ! is $res->start, 13; ! is $res->end, 15; $pos = Bio::Location::Simple->new *************** *** 228,232 **** $m->out('peptide'); $res = $m->map($pos); ! ok $res->start, 4; --- 223,227 ---- $m->out('peptide'); $res = $m->map($pos); ! is $res->start, 4; *************** *** 238,243 **** (-start => 1, -end => 3, -strand=> 1 ); $res = $m->_frame($pos); ! ok $res->start, 1; ! ok $res->end, 3; --- 233,238 ---- (-start => 1, -end => 3, -strand=> 1 ); $res = $m->_frame($pos); ! is $res->start, 1; ! is $res->end, 3; *************** *** 266,271 **** $m->out('gene'); my $off = $m->cds(5); ! ok $off->start, 5; # start of the coding region ! ok $m->exons(@cexons), 3; $m->out('exon'); --- 261,266 ---- $m->out('gene'); my $off = $m->cds(5); ! is $off->start, 5; # start of the coding region ! is $m->exons(@cexons), 3; $m->out('exon'); *************** *** 274,279 **** $res = $m->map($pos); ! ok $res->start, 2; ! ok $res->end, 3; $m->out('negative_intron'); --- 269,274 ---- $res = $m->map($pos); ! is $res->start, 2; ! is $res->end, 3; $m->out('negative_intron'); *************** *** 281,287 **** (-start => 12, -end => 14, -strand=> 1 ); $res = $m->map($pos); ! ok $res->start, -3; ! ok $res->end, -1; ! ok $res->seq_id, 'intron1'; --- 276,282 ---- (-start => 12, -end => 14, -strand=> 1 ); $res = $m->map($pos); ! is $res->start, -3; ! is $res->end, -1; ! is $res->seq_id, 'intron1'; *************** *** 291,308 **** (-start => 5, -end => 9, -strand=> 1 ); $res = $m->map($pos); ! ok $res->start, 1; ! ok $res->end, 5; $pos = Bio::Location::Simple->new (-start => 15, -end => 25, -strand=> 1 ); $res = $m->map($pos); ! ok $res->start, 6; ! ok $res->end, 11; $pos = Bio::Location::Simple->new (-start => 5, -end => 19, -strand=> 1 ); $res = $m->map($pos); ! ok $res->start, 1; ! ok $res->end, 10; --- 286,303 ---- (-start => 5, -end => 9, -strand=> 1 ); $res = $m->map($pos); ! is $res->start, 1; ! is $res->end, 5; $pos = Bio::Location::Simple->new (-start => 15, -end => 25, -strand=> 1 ); $res = $m->map($pos); ! is $res->start, 6; ! is $res->end, 11; $pos = Bio::Location::Simple->new (-start => 5, -end => 19, -strand=> 1 ); $res = $m->map($pos); ! is $res->start, 1; ! is $res->end, 10; *************** *** 316,322 **** $res = $m->map($exons); ! ok $res->isa('Bio::Location::Simple'); ! ok $res->start, 1; ! ok $res->end, 15; # --- 311,317 ---- $res = $m->map($exons); ! isa_ok $res,'Bio::Location::Simple'; ! is $res->start, 1; ! is $res->end, 15; # *************** *** 329,334 **** (-start => 4, -end => 7, -strand=> 1 ); $res = $m->map($pos); ! ok $res->start, 4; ! ok $res->end, 12; --- 324,329 ---- (-start => 4, -end => 7, -strand=> 1 ); $res = $m->map($pos); ! is $res->start, 4; ! is $res->end, 12; *************** *** 351,356 **** $m->out('gene'); $off = $m->cds(17); ! ok $off->start, 17; # start of the coding region ! ok $m->exons(@cexons), 3; # testing parameter handling in the constructor --- 346,351 ---- $m->out('gene'); $off = $m->cds(17); ! is $off->start, 17; # start of the coding region ! is $m->exons(@cexons), 3; # testing parameter handling in the constructor *************** *** 417,422 **** # (-start => 34576888, -end => 34579355, -strand=> 1 ); $res = $g1->map($cdsr); ! ok $res->start, 1; ! ok $res->end, 2468; $g1->exons(@exons); --- 412,417 ---- # (-start => 34576888, -end => 34579355, -strand=> 1 ); $res = $g1->map($cdsr); ! is $res->start, 1; ! is $res->end, 2468; $g1->exons(@exons); *************** *** 424,429 **** $g1->out('cds'); $res = $g1->map($res); ! ok $res->start, 1; ! ok $res->end, 1173; #map_snps($g1, @snp_dump); --- 419,424 ---- $g1->out('cds'); $res = $g1->map($res); ! is $res->start, 1; ! is $res->end, 1173; #map_snps($g1, @snp_dump); *************** *** 438,444 **** (-start => $cdsr->end-2, -end => $cdsr->end, -strand=> 1 ); $res = $g2->map($pos); ! ok $res->start, 1; ! ok $res->end, 3; ! ok $res->strand, -1; --- 433,439 ---- (-start => $cdsr->end-2, -end => $cdsr->end, -strand=> 1 ); $res = $g2->map($pos); ! is $res->start, 1; ! is $res->end, 3; ! is $res->strand, -1; *************** *** 470,480 **** $res=$pair->map($split); ok my @sublocs = $res->each_Location(1); ! ok @sublocs, 2; #print Dumper \@sublocs; ! ok $sublocs[0]->start, 2; ! ok $sublocs[0]->end, 3; ! ok $sublocs[1]->start, 10; ! ok $sublocs[1]->end, 12; # testing cds -> gene/chr which generates a split location from a simple one --- 465,475 ---- $res=$pair->map($split); ok my @sublocs = $res->each_Location(1); ! is @sublocs, 2; #print Dumper \@sublocs; ! is $sublocs[0]->start, 2; ! is $sublocs[0]->end, 3; ! is $sublocs[1]->start, 10; ! is $sublocs[1]->end, 12; # testing cds -> gene/chr which generates a split location from a simple one *************** *** 502,506 **** $m->cds($cds); # this has to be set first!? ! ok $m->exons(@cexons), 2; --- 497,501 ---- $m->cds($cds); # this has to be set first!? ! is $m->exons(@cexons), 2; *************** *** 510,519 **** ok @sublocs = $res->each_Location(1); ! ok @sublocs, 2; ! ok $sublocs[0]->start, 6; ! ok $sublocs[0]->end, 9; ! ok $sublocs[1]->start, 15; ! ok $sublocs[1]->end, 16; --- 505,514 ---- ok @sublocs = $res->each_Location(1); ! is @sublocs, 2; ! is $sublocs[0]->start, 6; ! is $sublocs[0]->end, 9; ! is $sublocs[1]->start, 15; ! is $sublocs[1]->end, 16; *************** *** 527,547 **** $res = $m->map($pos); ! ok $res->each_Location, 3; $m->out('intron'); $res = $m->map($pos); ! ok $res->start, 1; ! ok $res->end, 5; ! ok $res->strand, 1; $m->out('negative_intron'); $res = $m->map($pos); ! ok $res->start, -5; ! ok $res->end, -1; ! ok $res->strand, 1; ! ok $m->_mapper_code2string('1-2'), 'chr-gene'; ! ok $m->_mapper_string2code('chr-gene'), '1-2'; --- 522,542 ---- $res = $m->map($pos); ! is $res->each_Location, 3; $m->out('intron'); $res = $m->map($pos); ! is $res->start, 1; ! is $res->end, 5; ! is $res->strand, 1; $m->out('negative_intron'); $res = $m->map($pos); ! is $res->start, -5; ! is $res->end, -1; ! is $res->strand, 1; ! is $m->_mapper_code2string('1-2'), 'chr-gene'; ! is $m->_mapper_string2code('chr-gene'), '1-2'; Index: Geneid.t =================================================================== RCS file: /home/repository/bioperl/bioperl-live/t/Geneid.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Geneid.t 19 May 2003 13:32:49 -0000 1.1 --- Geneid.t 11 Apr 2007 18:54:35 -0000 1.2 *************** *** 6,25 **** BEGIN { ! eval { require Test; }; if ($@) { ! use lib 't'; } ! use Test; use vars qw($NTESTS); ! $NTESTS = 26; plan tests => $NTESTS; } - use Bio::Tools::Geneid; - use Bio::SeqIO; - ok(1); - my $inputfilename = Bio::Root::IO->catfile("t", "data", "geneid_1.0.out"); my $parser = Bio::Tools::Geneid->new(-file => $inputfilename); --- 6,23 ---- BEGIN { ! eval { require Test::More; }; if ($@) { ! use lib 't/lib'; } ! use Test::More; use vars qw($NTESTS); ! $NTESTS = 27; plan tests => $NTESTS; + use_ok('Bio::Tools::Geneid'); + use_ok('Bio::SeqIO'); } my $inputfilename = Bio::Root::IO->catfile("t", "data", "geneid_1.0.out"); my $parser = Bio::Tools::Geneid->new(-file => $inputfilename); *************** *** 34,80 **** my @exons = $transcripts[0]->exons; ! ok($transcripts[0]->seq_id, '10'); ! ok($exons[0]->seq_id, '10'); ! ok($transcripts[0]->source_tag, 'geneid'); ! ok($exons[0]->source_tag, 'geneid'); ! ok($transcripts[0]->primary_tag, 'transcript'); ! ok($exons[0]->primary_tag, 'Initial'); ! ok(scalar($transcripts[0]->exons), 2); ! ok($transcripts[0]->start, 6090); ! ok($transcripts[0]->end, 7276); ! ok($transcripts[0]->score, 36.87); ! ok($transcripts[0]->strand, 1); ! ok($exons[0]->start, 6090); ! ok($exons[0]->end, 6155); ! ok($exons[0]->score, '1.40'); ! ok($exons[0]->strand, 1); my ($type) = $exons[0]->get_tag_values('Type'); ! ok($type, 'Initial'); my ($phase) = $exons[0]->get_tag_values('phase'); ! ok($phase, 0); my ($end_phase) = $exons[0]->get_tag_values('end_phase'); ! ok($end_phase, 0); my ($start_signal_score) = $exons[0]->get_tag_values('start_signal_score'); ! ok($start_signal_score, 2.15); my ($end_signal_score) = $exons[0]->get_tag_values('end_signal_score'); ! ok($end_signal_score, 3.63); my ($coding_potential_score) = $exons[0]->get_tag_values('coding_potential_score'); ! ok($coding_potential_score, 12.34); my ($homology_score) = $exons[0]->get_tag_values('homology_score'); ! ok($homology_score, '0.00'); ! ok(scalar(@genes), 3); @transcripts = $genes[1]->transcripts; ! ok(scalar($transcripts[0]->exons), 5); @transcripts = $genes[2]->transcripts; ! ok(scalar($transcripts[0]->exons), 1); --- 32,78 ---- my @exons = $transcripts[0]->exons; ! is($transcripts[0]->seq_id, '10'); ! is($exons[0]->seq_id, '10'); ! is($transcripts[0]->source_tag, 'geneid'); ! is($exons[0]->source_tag, 'geneid'); ! is($transcripts[0]->primary_tag, 'transcript'); ! is($exons[0]->primary_tag, 'Initial'); ! is(scalar($transcripts[0]->exons), 2); ! is($transcripts[0]->start, 6090); ! is($transcripts[0]->end, 7276); ! is($transcr