Skip to content

Commit

Permalink
Merge branch 'master' into json-stabilize
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuels committed Feb 7, 2012
2 parents c2d3c60 + 66c055d commit 2ba41ea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/tutorial/data_files/volvox.fa
Original file line number Diff line number Diff line change
Expand Up @@ -833,3 +833,6 @@ tgaactcgtcacgtcatgcctagctcccggttgaaacacgaagacgcgtgaacctatctt
tgcttactattcgcctcctttaagaggcttcttgatgtggctctgcgacatggacagtag
tagttgtacctgggtatgttagtgaaattacaagtacctcaaaaacgaattacgtgtata
gagattatgtcactccgtcac
>ctgB
ACTGATCGATGATGACTGACTAGTAGA
ACATGCTAGCTACGTGCATGCTCGACATGCATCATCAGC
2 changes: 1 addition & 1 deletion lib/FastaDatabase.pm
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ sub from_fasta {
local $/ = "\n>";
while( my $entry = <$fh> ) {
my ( $name, $seq ) = split "\n", $entry, 2;
($name) = $name =~ /^\s*>\s*(\S+)/;
($name) = $name =~ /^\s*>?\s*(\S+)/;
$seq =~ s/\s//g;
$seqdata->{$name} = $seq;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/perl_tests/FastaDatabase.t
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use FastaDatabase;
my $db = FastaDatabase->from_fasta( 'sample_data/raw/volvox/volvox.fa', glob 'sample_data/raw/yeast_scaffolds/chr*.fa.*' );
my $seq_ids = [ sort $db->seq_ids ];
is_deeply( $seq_ids,
[ sort 'chrI','chrII', 'ctgA' ],
[ sort 'chrI','chrII', 'ctgA', 'ctgB' ],
'got right seq ids from FastaDatabase with multiple fasta files, some compressed, some not'
)
or diag explain $seq_ids;
Expand Down

0 comments on commit 2ba41ea

Please sign in to comment.