1 # -*-Perl-*- Test Harness script for Bioperl
10 test_begin(-tests => 30);
12 use_ok('Bio::Tools::QRNA');
15 my $inputfilename= test_input_file('ecoli-trna-qrna.out');
16 ok my $parser = Bio::Tools::QRNA->new(-file => $inputfilename);
19 while( my $f = $parser->next_feature ) {
20 if( $f->primary_tag eq 'RNA' ) { # winning model is primary tag
21 if( ! $rnacount ) { # 1st time through let's test
22 is($f->feature1->start,4);
23 is($f->feature1->end, 70);
24 is($f->score, 22.147);
25 is($f->feature1->seq_id,'DA0780-1-');
27 is($f->feature2->start, 4);
28 is($f->feature2->end, 70);
29 is($f->feature2->seq_id, 'ECOLI-3979754-');
30 is(($f->get_tag_values('alignment_len'))[0], 70);
31 is(($f->get_tag_values('alignment_pid'))[0], '72.86');
32 is(($f->get_tag_values('COD_score'))[0], '16.954');
33 is(($f->get_tag_values('COD_logoddspost'))[0], '-4.365');
34 is(($f->get_tag_values('OTH_score'))[0], '21.319');
35 is(($f->get_tag_values('OTH_logoddspost'))[0], '0.000');
41 $inputfilename= test_input_file('qrna-relloc.out');
42 $parser = Bio::Tools::QRNA->new(-file => $inputfilename);
44 my $qrna = $parser->next_feature;
45 is($qrna->primary_tag, 'COD');
46 is($qrna->source_tag, 'qrna');
47 is($qrna->feature1->seq_id, 'Contig1');
48 is($qrna->feature2->seq_id, 'chr5.pseudo');
49 is($qrna->feature1->start, 24732);
50 is($qrna->feature1->end, 24881);
52 is($qrna->feature2->start, 527251);
53 is($qrna->feature2->end, 527400);
55 is($parser->seq_file,'tst.out');
56 is($parser->RNA_model, '/mix_tied_linux.cfg');
57 is($parser->PAM_model, 'BLOSUM62 scaled by 1.000');
58 is($parser->program_name, 'qrna');
59 is($parser->program_version, '1.2b');
60 is($parser->program_date, 'Tue Dec 18 15:04:38 CST 2001');