From 2c9b93f44b1837859552b14ab82d265ec7959d1b Mon Sep 17 00:00:00 2001 From: pvtroshin Date: Wed, 27 Apr 2011 23:39:38 +0000 Subject: [PATCH] A wee improvement git-svn-id: link to svn.lifesci.dundee.ac.uk/svn/barton/ptroshin/JABA2@4044 e3abac25-378b-4346-85de-24260fe3988d --- datamodel/compbio/data/sequence/FastaReader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datamodel/compbio/data/sequence/FastaReader.java b/datamodel/compbio/data/sequence/FastaReader.java index dd09acd..ed91e93 100644 --- a/datamodel/compbio/data/sequence/FastaReader.java +++ b/datamodel/compbio/data/sequence/FastaReader.java @@ -147,12 +147,12 @@ public class FastaReader implements Iterator { } String header = sc.next(); // Get rid of the new line chars (should cover common cases) - header = header.replaceAll("\n", "").replaceAll("\r", ""); + header = header.replaceAll("\r", ""); sc.useDelimiter("\\s*"); final StringBuilder sb = new StringBuilder(); while (sc.hasNext()) { - sb.append(sc.next().trim()); + sb.append(sc.next()); } final String sequence = sb.toString(); if (Util.isEmpty(sequence)) { -- 1.7.10.2