File: SimilarityPair.t

package info (click to toggle)
bioperl 1.7.1-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 50,136 kB
  • sloc: perl: 172,618; xml: 22,869; lisp: 2,034; sh: 1,984; makefile: 19
file content (29 lines) | stat: -rw-r--r-- 738 bytes parent folder | download | duplicates (4)
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
# -*-Perl-*- Test Harness script for Bioperl
# $Id$

use strict;

BEGIN {     
    use lib '.';
    use Bio::Root::Test;
    
    test_begin(-tests => 12);
	
	use_ok('Bio::SearchIO');
	use_ok('Bio::SeqIO');
}

# test SimilarityPair

ok my $seq = (Bio::SeqIO->new('-format' => 'fasta',
			  '-file' => test_input_file('AAC12660.fa')))->next_seq();
isa_ok $seq, 'Bio::SeqI';
ok my $blast = Bio::SearchIO->new('-file'=>test_input_file('blast.report'), '-format' => 'blast');
isa_ok $blast, 'Bio::SearchIO';
my $r = $blast->next_result;
ok my $hit = $r->next_hit;
isa_ok $hit, 'Bio::Search::Hit::HitI';
ok my $sim_pair = $hit->next_hsp;
isa_ok $sim_pair, 'Bio::SeqFeatureI';
ok $seq->add_SeqFeature($sim_pair);
is $seq->all_SeqFeatures(), 1;