From 415f149083cc1a2112b922a18688adce0e1025d8 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 23 May 2016 14:34:22 +0100 Subject: [PATCH] JAL-2113 remove spaces in sequence from unmarshalling newlines --- src/jalview/datamodel/xdb/embl/EmblSequence.java | 3 ++- test/jalview/datamodel/xdb/embl/EmblTestHelper.java | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) 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() { -- 1.7.10.2