[Bioperl-guts-l] [15076] bioperl-live/trunk/t: Merge tests
Christopher John Fields
cjfields at dev.open-bio.org
Wed Dec 3 01:13:49 EST 2008
Revision: 15076
Author: cjfields
Date: 2008-12-03 01:13:49 -0500 (Wed, 03 Dec 2008)
Log Message:
-----------
Merge tests
Modified Paths:
--------------
bioperl-live/trunk/t/Tools/SeqWords.t
Removed Paths:
-------------
bioperl-live/trunk/t/SeqWords.t
Deleted: bioperl-live/trunk/t/SeqWords.t
===================================================================
--- bioperl-live/trunk/t/SeqWords.t 2008-12-03 05:56:11 UTC (rev 15075)
+++ bioperl-live/trunk/t/SeqWords.t 2008-12-03 06:13:49 UTC (rev 15076)
@@ -1,49 +0,0 @@
-# -*-Perl-*- Test Harness script for Bioperl
-# $Id$
-
-
-use strict;
-
-BEGIN {
- use lib 't/lib';
- use BioperlTest;
-
- test_begin(-tests => 19);
-
- use_ok('Bio::PrimarySeq');
- use_ok('Bio::Tools::SeqWords');
-}
-
-my ($seqobj, $count, $seqobj_stats, $wt);
-
-$seqobj = Bio::PrimarySeq->new(-seq=>'ACTGTGGCGTCAACTGACTGGC',
- -alphabet=>'dna', -id=>'test');
-ok $seqobj_stats = Bio::Tools::SeqWords->new(-seq=>$seqobj);
-isa_ok $seqobj_stats, 'Bio::Tools::SeqWords';
-
-$count = $seqobj_stats->count_words(4);
-is $count->{'ACTG'}, 3;
-is $count->{'TGGC'}, 1;
-is $count->{'GTCA'}, 1;
-
-$count = $seqobj_stats->count_overlap_words(4);
-is $count->{'ACTG'}, 3;
-is $count->{'TGGC'}, 2;
-is $count->{'GTCA'}, 1;
-is $count->{'GTGG'}, 1;
-
-# now test a protein
-$seqobj = Bio::PrimarySeq->new(-seq=>'MQSERGITIDISLWKFETSKYYVTIDISSLWKF',
- -alphabet=>'protein', -id=>'test');
-ok $seqobj_stats = Bio::Tools::SeqWords->new('-seq' => $seqobj);
-isa_ok $seqobj_stats, 'Bio::Tools::SeqWords';
-
-$count = $seqobj_stats->count_words(4);
-is $count->{'MQSE'}, 1;
-is $count->{'LWKF'}, 1;
-is $count->{'IDIS'}, 2;
-
-$count = $seqobj_stats->count_overlap_words(4);
-is $count->{'MQSE'}, 1;
-is $count->{'LWKF'}, 2;
-is $count->{'IDIS'}, 2;
Modified: bioperl-live/trunk/t/Tools/SeqWords.t
===================================================================
--- bioperl-live/trunk/t/Tools/SeqWords.t 2008-12-03 05:56:11 UTC (rev 15075)
+++ bioperl-live/trunk/t/Tools/SeqWords.t 2008-12-03 06:13:49 UTC (rev 15076)
@@ -13,11 +13,45 @@
use_ok('Bio::Tools::SeqWords');
}
+my ($seqobj, $count, $seqobj_stats, $wt);
+
my $str = Bio::SeqIO->new(-file=> test_input_file('multifa.seq'), '-format' => 'Fasta');
-my $seqobj= $str->next_seq();
+$seqobj= $str->next_seq();
ok defined $seqobj, 'new Bio::Root::IO object';
my $words = Bio::Tools::SeqWords->new('-seq' => $seqobj);
my $hash = $words->count_words(6);
ok (defined $words, 'new Bio::Tools::SeqWords object');
ok (defined $hash, 'count_words');
+
+$seqobj = Bio::PrimarySeq->new(-seq=>'ACTGTGGCGTCAACTGACTGGC',
+ -alphabet=>'dna', -id=>'test');
+ok $seqobj_stats = Bio::Tools::SeqWords->new(-seq=>$seqobj);
+isa_ok $seqobj_stats, 'Bio::Tools::SeqWords';
+
+$count = $seqobj_stats->count_words(4);
+is $count->{'ACTG'}, 3;
+is $count->{'TGGC'}, 1;
+is $count->{'GTCA'}, 1;
+
+$count = $seqobj_stats->count_overlap_words(4);
+is $count->{'ACTG'}, 3;
+is $count->{'TGGC'}, 2;
+is $count->{'GTCA'}, 1;
+is $count->{'GTGG'}, 1;
+
+# now test a protein
+$seqobj = Bio::PrimarySeq->new(-seq=>'MQSERGITIDISLWKFETSKYYVTIDISSLWKF',
+ -alphabet=>'protein', -id=>'test');
+ok $seqobj_stats = Bio::Tools::SeqWords->new('-seq' => $seqobj);
+isa_ok $seqobj_stats, 'Bio::Tools::SeqWords';
+
+$count = $seqobj_stats->count_words(4);
+is $count->{'MQSE'}, 1;
+is $count->{'LWKF'}, 1;
+is $count->{'IDIS'}, 2;
+
+$count = $seqobj_stats->count_overlap_words(4);
+is $count->{'MQSE'}, 1;
+is $count->{'LWKF'}, 2;
+is $count->{'IDIS'}, 2;
More information about the Bioperl-guts-l
mailing list