try
{
SequenceI seq = null;
+ /**
+ * keep track of any sequences we try to create from the data if it is a GFF3 file
+ */
+ ArrayList<SequenceI> newseqs = new ArrayList<SequenceI>();
String type, desc, token = null;
int index, start, end;
// Still possible this is an old Jalview file,
// which does not have type colours at the beginning
seqId = token = st.nextToken();
- seq = findName(align, seqId, relaxedIdmatching);
+ seq = findName(align, seqId, relaxedIdmatching, newseqs);
if (seq != null)
{
desc = st.nextToken();
if (!token.equals("ID_NOT_SPECIFIED"))
{
- seq = findName(align, seqId = token, relaxedIdmatching);
+ seq = findName(align, seqId = token, relaxedIdmatching, null);
st.nextToken();
}
else
}
private SequenceI findName(AlignmentI align, String seqId,
- boolean relaxedIdMatching)
+ boolean relaxedIdMatching, List<SequenceI> newseqs)
{
SequenceI match = null;
if (relaxedIdMatching)
{
matcher = new SequenceIdMatcher(
(lastmatchedAl = align).getSequencesArray());
+ if (newseqs != null)
+ {
+ matcher.addAll(newseqs);
+ }
}
match = matcher.findIdMatch(seqId);
}
else
{
match = align.findName(seqId, true);
+
+ }
+ if (match==null && newseqs!=null)
+ {
+ match = new SequenceDummy(seqId);
+ if (relaxedIdMatching)
+ {
+ matcher.addAll(Arrays.asList(new SequenceI[]
+ { match }));
+ }
}
return match;
}
-
public void parseDescriptionHTML(SequenceFeature sf, boolean removeHTML)
{
if (sf.getDescription() == null)