Skip to content

Commit

Permalink
trim windows-style newlines in seq-len. Fixes #117
Browse files Browse the repository at this point in the history
  • Loading branch information
thackl committed Mar 30, 2022
1 parent 36a807e commit 7053a8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exec/seq-len
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ my @r;
my $seq_reg = 0;

# fasta
if ($first =~ /^>(\S+)(?:\s(.*))?/){
if ($first =~ /^>(\S+)(?:\s([^\n\r]*))?/){ # .* captures \r in some cases
@r = ($1, $2 // "", 0);
while (<>) {
tr/\r\n//d; # chomp() fails on \r\n;
Expand Down

0 comments on commit 7053a8e

Please sign in to comment.