X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FFeaturesFile.java;h=2dd5f26275e0ed0d12a4c6b706ae9b2281181066;hb=refs%2Fheads%2Fmungo_develop;hp=22b0601bad31056fde221e12dae0532cda2a856e;hpb=8f920d337154e092f5f9056ffde3cdf2735eca43;p=jalview.git diff --git a/src/jalview/io/FeaturesFile.java b/src/jalview/io/FeaturesFile.java index 22b0601..2dd5f26 100755 --- a/src/jalview/io/FeaturesFile.java +++ b/src/jalview/io/FeaturesFile.java @@ -74,8 +74,6 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI private static final String NOTE = "Note"; - protected static final String FRAME = "FRAME"; - protected static final String TAB = "\t"; protected static final String GFF_VERSION = "##gff-version"; @@ -271,6 +269,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; } @@ -1067,7 +1076,8 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI out.append(strand == 1 ? "+" : (strand == -1 ? "-" : ".")); out.append(TAB); - out.append(sf.getValue(FRAME, ".")); + String phase = sf.getPhase(); + out.append(phase == null ? "." : phase); // miscellaneous key-values (GFF column 9) String attributes = sf.getAttributes(); @@ -1319,6 +1329,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); } }