[Bioperl-guts-l] bioperl commit
Brian Osborne
bosborne at pub.open-bio.org
Sat Oct 16 18:31:51 EDT 2004
bosborne
Sat Oct 16 18:31:51 EDT 2004
Update of /home/repository/bioperl/bioperl-live/t
In directory pub.open-bio.org:/tmp/cvs-serv19920/t
Modified Files:
AlignIO.t
Log Message:
Test for correct strand and sequence
bioperl-live/t AlignIO.t,1.47,1.48
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/t/AlignIO.t,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- /home/repository/bioperl/bioperl-live/t/AlignIO.t 2004/10/16 14:53:34 1.47
+++ /home/repository/bioperl/bioperl-live/t/AlignIO.t 2004/10/16 22:31:51 1.48
@@ -9,7 +9,7 @@
use lib 't';
}
use Test;
- plan tests => 103;
+ plan tests => 113;
}
use Bio::SimpleAlign;
@@ -24,15 +24,13 @@
Bio::Root::IO->catfile("t","data","testout.selex"),
Bio::Root::IO->catfile("t","data","testout.pfam"),
Bio::Root::IO->catfile("t","data","testout.msf"),
- Bio::Root::IO->catfile("t","data","testout.fasta"),
+ Bio::Root::IO->catfile("t","data","testout.fasta"),
Bio::Root::IO->catfile("t","data","testout.clustal"),
Bio::Root::IO->catfile("t","data","testout.phylip"),
Bio::Root::IO->catfile("t","data","testout.nexus"),
Bio::Root::IO->catfile("t","data","testout.mega"),
Bio::Root::IO->catfile("t","data","testout.po"),
- );
- unlink(
- Bio::Root::IO->catfile("t","data","littleout.largemultifasta")
+ Bio::Root::IO->catfile("t","data","testout.largemultifasta")
);
}
@@ -291,7 +289,7 @@
" failed fasta input test for description");
$strout = Bio::AlignIO->new('-file' => ">".Bio::Root::IO->catfile("t", "data",
- "littleout.largemultifasta"),
+ "testout.largemultifasta"),
'-format' => 'largemultifasta');
$status = $strout->write_aln($aln);
ok $status, 1," failed fasta output test";
@@ -344,6 +342,7 @@
}
# MEME
+# this file has no Strand column
ok $str = new Bio::AlignIO(
-file => Bio::Root::IO->catfile("t", "data", "test.meme"),
-format => 'meme'
@@ -352,3 +351,18 @@
ok $aln = $str->next_aln();
ok $aln->length,25;
ok $aln->no_sequences,4;
+ok $aln->get_seq_by_pos(3)->seq(),"CCTTAAAATAAAATCCCCACCACCA";
+ok $aln->get_seq_by_pos(3)->strand,"1";
+
+# this file has a Strand column
+ok $str = new Bio::AlignIO(
+ -file => Bio::Root::IO->catfile("t", "data", "test.meme2"),
+ -format => 'meme'
+ );
+ok defined($str) && ref($str) && $str->isa('Bio::AlignIO');
+ok $aln = $str->next_aln();
+ok $aln->length,20;
+ok $aln->no_sequences,8;
+ok $aln->get_seq_by_pos(8)->seq(),"CCAGTCTCCCCTGAATACCC";
+ok $aln->get_seq_by_pos(7)->strand,"-1";
+ok $aln->get_seq_by_pos(6)->strand,"1";
More information about the Bioperl-guts-l
mailing list