From: gmungoc Date: Mon, 23 May 2016 13:34:22 +0000 (+0100) Subject: JAL-2113 remove spaces in sequence from unmarshalling newlines X-Git-Tag: Release_2_10_0~196^2~2^2~2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=415f149083cc1a2112b922a18688adce0e1025d8;p=jalview.git JAL-2113 remove spaces in sequence from unmarshalling newlines --- diff --git a/src/jalview/datamodel/xdb/embl/EmblSequence.java b/src/jalview/datamodel/xdb/embl/EmblSequence.java index 5a18929..92c424b 100644 --- a/src/jalview/datamodel/xdb/embl/EmblSequence.java +++ b/src/jalview/datamodel/xdb/embl/EmblSequence.java @@ -43,6 +43,7 @@ public class EmblSequence */ public void setSequence(String sequence) { - this.sequence = sequence; + // remove spaces introduced by unmarshalling of newline characters + this.sequence = sequence.replace(" ", ""); } } diff --git a/test/jalview/datamodel/xdb/embl/EmblTestHelper.java b/test/jalview/datamodel/xdb/embl/EmblTestHelper.java index 8f631df..71ca508 100644 --- a/test/jalview/datamodel/xdb/embl/EmblTestHelper.java +++ b/test/jalview/datamodel/xdb/embl/EmblTestHelper.java @@ -17,7 +17,9 @@ public class EmblTestHelper + "" + "L-lactate dehydrogenase A-chainpickle" + "MSLKDHLIHNKeith" - + "" + "GTGACG"; + // emulate EMBL XML 1.2 which splits sequence data every 60 characters + // see EmblSequence.setSequence + + "" + "GTG\nACG"; static EmblFile getEmblFile() {