From 17ab31afb5684076ec2c030811ec6e6363ba85ac Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 21 Jan 2016 15:17:12 +0000 Subject: [PATCH] JAL-1705 include dummy sequences in returned alignment --- src/jalview/io/FeaturesFile.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/jalview/io/FeaturesFile.java b/src/jalview/io/FeaturesFile.java index 22b0601..2d91a08 100755 --- a/src/jalview/io/FeaturesFile.java +++ b/src/jalview/io/FeaturesFile.java @@ -271,6 +271,17 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI return false; } + /* + * experimental - add any dummy sequences with features to the alignment + * - we need them for Ensembl feature extraction - though maybe not otherwise + */ + for (SequenceI newseq : newseqs) + { + if (newseq.getSequenceFeatures() != null) + { + align.addSequence(newseq); + } + } return true; } @@ -1319,6 +1330,11 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI * replace parsed sequence with the realised forward reference */ includedseqs.set(p, dummyseq); + + /* + * and remove from the newseqs list + */ + newseqs.remove(dummyseq); } } -- 1.7.10.2