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
49
50
51
52
53
54
55
56
57
|
# -*-Perl-*- Test Harness script for Bioperl
# $Id: po.t 14971 2008-10-28 16:08:52Z cjfields $
use strict;
BEGIN {
use lib '.';
use Bio::Root::Test;
test_begin(-tests => 11);
use_ok('Bio::AlignIO::po');
}
my $DEBUG = test_debug();
my ($str,$aln,$strout,$status);
# POA
# just skip on perl 5.6.0 and earlier as it causes a crash on
# default perl with OS X 10.2
# fink perl 5.6.0 does not seem to have the problem
# can't figure out what it is so just skip for now
SKIP: {
skip("skipping due to bug in perl 5.6.0 that comes with OS X 10.2", 10) unless ($^O ne 'darwin' || $] > 5.006);
$str = Bio::AlignIO->new(
-file => test_input_file('testaln.po'),
-format => 'po',
);
isa_ok($str, 'Bio::AlignIO');
$aln = $str->next_aln();
isa_ok($aln,'Bio::Align::AlignI');
is $aln->num_sequences, 6;
# output is? i.e. does conversion from clustalw to po give the same alignment?
$str = Bio::AlignIO->new(
'-file' => test_input_file('testaln.aln'),
'-format' => 'clustalw');
isa_ok($str,'Bio::AlignIO');
$aln = $str->next_aln();
isa_ok($aln,'Bio::Align::AlignI');
$strout = Bio::AlignIO->new(
'-file' => ">" . test_output_file(),
'-format' => 'po');
$status = $strout->write_aln($aln);
is $status, 1, "po output test";
$str = Bio::AlignIO->new(
'-file' => test_input_file('testaln.po'),
'-format' => 'po');
isa_ok($str,'Bio::AlignIO');
my $aln2 = $str->next_aln();
isa_ok($aln2,'Bio::Align::AlignI');
is $aln2->num_sequences, $aln->num_sequences;
is $aln2->length, $aln->length;
}
|