-
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
3 changed files
with
71 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,46 @@ | ||
# -*-Perl-*- Test Harness script for Bioperl | ||
# $Id$ | ||
|
||
use strict; | ||
|
||
BEGIN { | ||
use lib '.'; | ||
use lib '.'; | ||
use Bio::Root::Test; | ||
test_begin(-tests => 9); | ||
use_ok('Bio::SeqIO::pir'); | ||
|
||
test_begin( -tests => 12 ); | ||
|
||
use_ok('Bio::SeqIO::pir'); | ||
} | ||
|
||
my $verbose = test_debug(); | ||
|
||
my $str = Bio::SeqIO->new(-file => test_input_file('seqfile.pir'), | ||
-verbose => $verbose, | ||
-format => 'pir'); | ||
my $in = Bio::SeqIO->new( | ||
-file => test_input_file('seqfile.pir'), | ||
-verbose => $verbose, | ||
-format => 'pir' | ||
); | ||
|
||
ok ( defined $str, 'new instance is defined '); | ||
isa_ok ($str, 'Bio::SeqIO'); | ||
ok( defined $in, 'new instance is defined ' ); | ||
isa_ok( $in, 'Bio::SeqIO' ); | ||
|
||
my $out = Bio::SeqIO->new(-format => 'pir', | ||
-fh => \*STDOUT); | ||
my $out = Bio::SeqIO->new( | ||
-format => 'pir', | ||
-fh => \*STDOUT | ||
); | ||
|
||
while (my $seq = $str->next_seq()) { | ||
ok( $seq->length > 1, 'checked length'); | ||
$out->write_seq($seq) if $verbose > 0; | ||
while ( my $seq = $in->next_seq() ) { | ||
ok( $seq->length > 1, 'checked length' ); | ||
$out->write_seq($seq) if $verbose > 0; | ||
} | ||
|
||
# Empty description line | ||
$in = Bio::SeqIO->new( | ||
-file => test_input_file('seqfile-no-desc.pir'), | ||
-verbose => $verbose, | ||
-format => 'pir' | ||
); | ||
my $seq = $in->next_seq(); | ||
ok( $seq->seq =~ /^MGD/, 'Correct start' ); | ||
$seq = $in->next_seq(); | ||
ok( $seq->seq =~ /^GDV/, 'Correct start' ); | ||
$seq = $in->next_seq(); | ||
ok( $seq->seq =~ /^GDV/, 'Correct start' ); |
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,9 @@ | ||
>P1;CCHU | ||
|
||
MGDVEKGKKIFIMKCSQCHTVEKGGKHKTGPNLHGLFGRKTGQAPGYSYTAANKNKGIIWGEDTLMEYLENPKKYIPGTKMIFVGIKKKEERADLIAYLKKATNE* | ||
>P1;CCCZ | ||
|
||
GDVEKGKKIFIMKCSQCHTVEKGGKHKTGPNLHGLFGRKTGQAPGYSYTAANKNKGIIWGEDTLMEYLENPKKYIPGTKMIFVGIKKKEERADLIAYLKKATNE* | ||
>P1;CCST | ||
|
||
GDVEK.GKKIF.VQKCAQCHTVEKGGKH.KTGPNLNGL.IGRKTGQAEGF.SYTEANKN.KGITWG.EETLM.EY.LENPKKY.IPGTKM.IF.AGIKKKAERADL.IAY.LKDATSK* |