From 2412e11620087354bedebab2a09947169519c22f Mon Sep 17 00:00:00 2001 From: martinahansen Date: Thu, 28 Aug 2008 05:22:35 +0000 Subject: [PATCH] fix of \r feature in Fasta::get_entry git-svn-id: http://biopieces.googlecode.com/svn/trunk@228 74ccb610-7750-0410-82ae-013aeee3265d --- code_perl/Maasha/Fasta.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code_perl/Maasha/Fasta.pm b/code_perl/Maasha/Fasta.pm index 0689de7..cf399cf 100644 --- a/code_perl/Maasha/Fasta.pm +++ b/code_perl/Maasha/Fasta.pm @@ -175,7 +175,7 @@ sub get_entry return if not defined $block; # $block =~ />?([^\n]+)\n/m; - $block =~ /^>?(.+)(\n|\r)/m; + $block =~ /^>?(.+)\n/m; $seq_name = $1; $seq = $'; @@ -183,7 +183,8 @@ sub get_entry chomp $seq; - $seq =~ tr/ \t\n\r//d; + $seq_name =~ tr/\r//d; + $seq =~ tr/ \t\n\r//d; $entry = [ $seq_name, $seq ]; -- 2.39.5