JAL-653 make sure dummy sequences created during GFF parsing are actually resolved...
authorJim Procter <jprocter@issues.jalview.org>
Sat, 6 Jun 2015 17:00:53 +0000 (18:00 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Sat, 6 Jun 2015 17:02:21 +0000 (18:02 +0100)
src/jalview/io/FeaturesFile.java

index 4085fc1..d6c3c21 100755 (executable)
@@ -1082,6 +1082,16 @@ public class FeaturesFile extends AlignFile
     else
     {
       match = align.findName(seqId, true);
+      if (match == null && newseqs != null)
+      {
+        for (SequenceI m : newseqs)
+        {
+          if (seqId.equals(m.getName()))
+          {
+            return m;
+          }
+        }
+      }
       
     }
     if (match==null && newseqs!=null)
@@ -1092,6 +1102,8 @@ public class FeaturesFile extends AlignFile
         matcher.addAll(Arrays.asList(new SequenceI[]
         { match }));
       }
+      // add dummy sequence to the newseqs list
+      newseqs.add(match);
     }
     return match;
   }