Skip to content

Commit

Permalink
added (another) fix to GenBankParser.pm to fix parsing of coordinates…
Browse files Browse the repository at this point in the history
…, which was broken because Genbank starting inserting newlines inside of join tokens.
  • Loading branch information
justaddcoffee committed Jul 15, 2013
1 parent bde127c commit 7152bf8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/perl5/Bio/GenBankParser.pm
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ Returns the next sequence from the C<file>.
}

if ( defined $rec && $rec =~ /\S+/ ) {
# okay, coordinate parsing is broken because someone decided to split join() coordinates across >1 line.
# okay, parsing of coordinate info is broken because someone at Genbank decided to split join() coordinates across >1 line.
# so, let's hack this to work by removing the newline inside of join() tokens
$rec =~ s/(^.*join\(.*\,)\n\s+(\d+.*\)$)/${1}${2}/m;
$rec` =~ s/(^.*join\(.*\,)\n\s+(\d+.*\)$)/${1}${2}/m;
return $self->parse( $rec );
}
Expand Down

0 comments on commit 7152bf8

Please sign in to comment.