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