1 # -*-Perl-*- Test Harness script for Bioperl
10 test_begin(-tests => 124);
12 use_ok('Bio::Tools::TargetP');
15 my $targetp = Bio::Tools::TargetP->new(
16 -file => test_input_file('targetp.out')
23 'id' => 'BC1G_00001.1',
33 'id' => 'BC1G_00002.1',
43 'id' => 'BC1G_00003.1',
53 'id' => 'BC1G_00004.1',
63 'id' => 'BC1G_00005.1',
73 'id' => 'BC1G_00006.1',
83 'id' => 'BC1G_00007.1',
93 'id' => 'BC1G_00008.1',
103 'id' => 'BC1G_00009.1',
113 'id' => 'BC1G_00010.1',
123 'id' => 'BC1G_04501.1',
133 'id' => 'BC1G_04502.1',
143 'id' => 'BC1G_04503.1',
153 'id' => 'BC1G_04504.1',
163 'id' => 'BC1G_04505.1',
175 $targetp->_parse_results();
177 is($targetp->network(), 'NON-PLANT');
178 is($targetp->analysis_method_version(), "v1.1");
180 while(my $feat = $targetp->next_prediction()){
182 is($feat->seq_id(), $items->{$i}->{id}, "good SeqID");
183 is($feat->length(), $items->{$i}->{len}, "good Seqlength");
184 is(($feat->get_tag_values('mitochondrionCutOff'))[0], $items->{$i}->{mTP}, "correct Mitochondrion cutoff");
185 is(($feat->get_tag_values('signalPeptideCutOff'))[0], $items->{$i}->{SP}, "correct signalpPeptide cutoff");
186 is(($feat->get_tag_values('otherCutOff'))[0], $items->{$i}->{other}, "correct other cutoff");
187 is(($feat->get_tag_values('location'))[0], $targetp->_toString_location($items->{$i}->{loc}), "correct location");
188 is(($feat->get_tag_values('reliabilityClass'))[0], $items->{$i}->{RC}, "correct Reliability class score");
190 if ($feat->has_tag('signalPeptideLength')) {
191 is(($feat->get_tag_values('signalPeptideLength'))[0], $items->{$i}->{tplen}, "correct peptide signal length")
193 is($feat->has_tag('signalPeptideLength'), '', "No peptide signal length reported")