]> git.donarmstrong.com Git - biopieces.git/commitdiff
fix of \r feature in Fasta::get_entry
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Thu, 28 Aug 2008 05:22:35 +0000 (05:22 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Thu, 28 Aug 2008 05:22:35 +0000 (05:22 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@228 74ccb610-7750-0410-82ae-013aeee3265d

code_perl/Maasha/Fasta.pm

index 0689de7b424357797896fd981c4bc2c339969dfa..cf399cf16ba07854f230ca67f0a8e285d53dcd79 100644 (file)
@@ -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 ];