- // TODO: deal with ID collisions - SequenceI should be appended to list
- // associated with this key.
- names.put(new SeqIdName(seqs[i].getDisplayId(true)), seqs[i]);
- // add in any interesting identifiers
- if (seqs[i].getDBRef() != null)
+ add(seq);
+ }
+ }
+
+ /**
+ * Adds one sequence to this matcher
+ *
+ * @param seq
+ */
+ public void add(SequenceI seq)
+ {
+ SeqIdName key = new SeqIdName(seq.getDisplayId(true));
+ addMatchCandidate(key, seq);
+ SequenceI dbseq = seq;
+ while (dbseq.getDatasetSequence() != null)
+ {
+ dbseq = dbseq.getDatasetSequence();
+ }
+ // add in any interesting identifiers
+ if (dbseq.getDBRefs() != null)
+ {
+ DBRefEntry dbr[] = dbseq.getDBRefs();
+ for (int r = 0; r < dbr.length; r++)