1 # -*-Perl-*- Test Harness script for Bioperl
10 test_begin(-tests => 11);
12 use_ok('Bio::Tools::SiRNA');
17 my $DEBUG = test_debug();
19 my $input = Bio::SeqIO->new( -file => test_input_file('NM_002254.gb'),
20 -format => 'Genbank' );
21 my $seq = $input->next_seq;
23 isa_ok( $input, 'Bio::SeqIO' ) ;
27 my $sirna = Bio::Tools::SiRNA->new( -target => $seq,
29 isa_ok( $sirna, 'Bio::Tools::SiRNA' ) ;
31 # first test - cds only
32 my @pairs = $sirna->design;
33 is ( scalar(@pairs), 65, "CDS only: got ". scalar(@pairs) );
36 # next test - include 3prime utr
37 my @feats = $seq->remove_SeqFeatures;
38 foreach my $feat (@feats) {
39 $seq->add_SeqFeature($feat) unless
40 ($feat->primary_tag eq 'Target' or $feat->isa('Bio::SeqFeature::SiRNA::Pair'));
42 ok( $sirna->include_3pr(1) ) ;
43 @pairs = $sirna->design;
44 print "With 3p UTR: got ",scalar(@pairs),"\n" if $DEBUG;
45 is( scalar(@pairs), 140 );
48 #third test - naked sequence
49 my $newseq = Bio::Seq->new( -seq => $seq->seq);
50 isa_ok($newseq, 'Bio::Seq') ;
52 ok( $sirna->target($newseq) );
53 @pairs = $sirna->design;
54 print "Bare sequence: got ",scalar(@pairs),"\n" if $DEBUG;
55 is ( scalar(@pairs), 142 ) ;