File: bsml.t

package info (click to toggle)
bioperl 1.6.1-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 40,768 kB
  • ctags: 12,005
  • sloc: perl: 174,299; xml: 13,923; sh: 1,941; lisp: 1,803; asm: 109; makefile: 53
file content (38 lines) | stat: -rw-r--r-- 1,256 bytes parent folder | download
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
# -*-Perl-*- Test Harness script for Bioperl
# $Id: bsml.t 15176 2008-12-16 05:51:46Z jason $

use strict;

BEGIN {
	use lib '.';
	use Bio::Root::Test;
	
	test_begin(-tests => 16,
			   -requires_modules => ['XML::DOM']
			  );
	use_ok('XML::DOM');
	use_ok('Bio::SeqIO::bsml');
}

my $verbose = test_debug();

my $str = Bio::SeqIO->new(-format => 'bsml',
			  -verbose => $verbose,
			  -file => test_input_file('U83300.bsml'));
my $seq = $str->next_seq;
isa_ok($seq, 'Bio::Seq::RichSeqI');
my @refs = $seq->annotation->get_Annotations('reference');
is(@refs, 2, 'got correct number of refs');
is($seq->display_id, 'MIVN83300', 'display_id');
is($seq->molecule, 'DNA', 'molecule');
ok(! $seq->is_circular, 'is_circular');
is($seq->get_dates, 2, 'dates');
is($seq->accession_number, 'U83300', 'accession_number');
is($seq->seq_version, 1, 'seq_version');
my @feats = $seq->get_SeqFeatures;
is(@feats, 2, 'got correct number of SeqFeatures');
is($feats[1]->start, 1, 'feature start');
is($feats[1]->end, 946, 'feature end');
is($feats[1]->get_tag_values('db_xref'), 3, 'get_tag_values db_xref');
is($seq->annotation->get_Annotations('reference'), 2, 'get_Annotations reference');
is($seq->annotation->get_Annotations('dblink'), 2, 'get_Annotations dblink');