File: meme.t

package info (click to toggle)
bioperl 1.7.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 35,788 kB
  • sloc: perl: 94,019; xml: 14,811; makefile: 20
file content (48 lines) | stat: -rw-r--r-- 1,351 bytes parent folder | download | duplicates (2)
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
39
40
41
42
43
44
45
46
47
48
# -*-Perl-*- Test Harness script for Bioperl

use strict;

BEGIN {
    use Bio::Root::Test;
    
    test_begin(-tests => 20);
	
	use_ok('Bio::AlignIO::meme');
}

my $DEBUG = test_debug();

# MEME
# this file has no Strand column, and it's version 3.0
my $str = Bio::AlignIO->new(
		-file => test_input_file('test-3.0-1.meme'),
		-format => 'meme');
isa_ok($str,'Bio::AlignIO');
my $aln = $str->next_aln();
isa_ok($aln,'Bio::Align::AlignI');is $aln->length,25;
is $aln->num_sequences,4;
is $aln->get_seq_by_pos(3)->seq(),"CCTTAAAATAAAATCCCCACCACCA";
is $aln->get_seq_by_pos(3)->strand,"1";

# this file has a Strand column, also version 3.0
$str = Bio::AlignIO->new(
		-file => test_input_file('test-3.0-2.meme'),
		-format => 'meme');
isa_ok($str,'Bio::AlignIO');
$aln = $str->next_aln();
isa_ok($aln,'Bio::Align::AlignI');is $aln->length,20;
is $aln->num_sequences,8;
is $aln->get_seq_by_pos(8)->seq(),"CCAGTCTCCCCTGAATACCC";
is $aln->get_seq_by_pos(7)->strand,"-1";
is $aln->get_seq_by_pos(6)->strand,"1";

# version 4.9
$str = Bio::AlignIO->new(
		-file => test_input_file('test-4.9.meme'),
		-format => 'meme');
isa_ok($str,'Bio::AlignIO');
$aln = $str->next_aln();
isa_ok($aln,'Bio::Align::AlignI');is $aln->length,21;
is $aln->num_sequences,47;
is $aln->get_seq_by_pos(3)->seq(),"AGAGAAACAAGAGGCCTCTTT";
is $aln->get_seq_by_pos(3)->strand,"1";