-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:bioperl/bioperl-live
- Loading branch information
Showing
5 changed files
with
146 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
use strict; | ||
|
||
BEGIN { | ||
use lib '.'; | ||
use Bio::Root::Test; | ||
|
||
test_begin(-tests => 3); | ||
|
||
use_ok('Bio::Tools::PrositeScan'); | ||
use_ok('Bio::SeqFeature::FeaturePair'); | ||
} | ||
|
||
# Note: data generated by running | ||
# | ||
# ./ps_scan.pl --pfscan ./pfscan -d prosite.dat -o fasta \ | ||
# t/data/test.fasta > t/data/ps_scan/out.PrositeScan | ||
# | ||
# followed by a manual removal of some of the output to simplify the test. | ||
|
||
subtest "Predictions" => sub { | ||
my $factory = Bio::Tools::PrositeScan->new( | ||
'-file' => test_input_file('ps_scan/out.PrositeScan'), | ||
'-format' => 'fasta' | ||
); | ||
|
||
my $expected_matches = [ | ||
{ seq_id => 'roa1_drome', coords => [253, 256], psac => 'PS00001', subseq => 'NNSF' }, | ||
{ seq_id => 'roa1_drome', coords => [270, 273], psac => 'PS00001', subseq => 'NNSW' }, | ||
{ seq_id => 'roa2_drome', coords => [344, 349], psac => 'PS00008', subseq => 'GNNQGF' }, | ||
{ seq_id => 'roa2_drome', coords => [217, 355], psac => 'PS50321', subseq => re(qr/NR.{135}NN/) }, | ||
]; | ||
|
||
my $actual_matches = []; | ||
while( my $match = $factory->next_prediction ) { | ||
push @$actual_matches, { | ||
seq_id => $match->seq_id, | ||
coords => [ $match->start, $match->end ], | ||
psac => $match->hseq_id, | ||
subseq => $match->feature1->seq->seq, | ||
}; | ||
} | ||
|
||
cmp_deeply( $actual_matches, $expected_matches, 'Comparing parsed prediction input' ); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
>roa1_drome/253-256 : PS00001 ASN_GLYCOSYLATION | ||
NNSF | ||
>roa1_drome/270-273 : PS00001 ASN_GLYCOSYLATION | ||
NNSW | ||
>roa2_drome/344-349 : PS00008 MYRISTYL | ||
GNNQGF | ||
>roa2_drome/217-355 : PS50321 ASN_RICH L=0 | ||
NRGNMGGGNYGNQNGGGNWNNGGNNWGNNRGNDNWGNNSFGGGGGGGGGYGGGNNSWGNN | ||
NPWDNGNGGGNFGGGGNNWNGGNDFGGYQQNYGGGPQRGGGNFNNNRMQPYQGGGGFKAG | ||
GGNQGNYGNNQGFNNGGNN |