Used quoted strings in Bio::Species to avoid a 'Invalid [] range in regex' error...
[bioperl-live.git] / t / AlignIO / meme.t
blob5759f8450988d0e192d3efbb820e3727aa6b8427
1 # -*-Perl-*- Test Harness script for Bioperl
3 use strict;
5 BEGIN {
6         use lib '.';
7     use Bio::Root::Test;
8     
9     test_begin(-tests => 20);
10         
11         use_ok('Bio::AlignIO::meme');
14 my $DEBUG = test_debug();
16 # MEME
17 # this file has no Strand column, and it's version 3.0
18 my $str = Bio::AlignIO->new(
19                 -file => test_input_file('test-3.0-1.meme'),
20                 -format => 'meme');
21 isa_ok($str,'Bio::AlignIO');
22 my $aln = $str->next_aln();
23 isa_ok($aln,'Bio::Align::AlignI');is $aln->length,25;
24 is $aln->num_sequences,4;
25 is $aln->get_seq_by_pos(3)->seq(),"CCTTAAAATAAAATCCCCACCACCA";
26 is $aln->get_seq_by_pos(3)->strand,"1";
28 # this file has a Strand column, also version 3.0
29 $str = Bio::AlignIO->new(
30                 -file => test_input_file('test-3.0-2.meme'),
31                 -format => 'meme');
32 isa_ok($str,'Bio::AlignIO');
33 $aln = $str->next_aln();
34 isa_ok($aln,'Bio::Align::AlignI');is $aln->length,20;
35 is $aln->num_sequences,8;
36 is $aln->get_seq_by_pos(8)->seq(),"CCAGTCTCCCCTGAATACCC";
37 is $aln->get_seq_by_pos(7)->strand,"-1";
38 is $aln->get_seq_by_pos(6)->strand,"1";
40 # version 4.9
41 $str = Bio::AlignIO->new(
42                 -file => test_input_file('test-4.9.meme'),
43                 -format => 'meme');
44 isa_ok($str,'Bio::AlignIO');
45 $aln = $str->next_aln();
46 isa_ok($aln,'Bio::Align::AlignI');is $aln->length,21;
47 is $aln->num_sequences,47;
48 is $aln->get_seq_by_pos(3)->seq(),"AGAGAAACAAGAGGCCTCTTT";
49 is $aln->get_seq_by_pos(3)->strand,"1";