+ // 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]);
+ SequenceI dbseq = seqs[i];
+ while (dbseq.getDatasetSequence()!=null)
+ {
+ dbseq = dbseq.getDatasetSequence();
+ }
+ // add in any interesting identifiers
+ if (dbseq.getDBRef() != null)
+ {
+ DBRefEntry dbr[] = dbseq.getDBRef();
+ SeqIdName sid = null;
+ for (int r = 0; r < dbr.length; r++)
+ {
+ sid = new SeqIdName(dbr[r].getAccessionId());
+ if (!names.contains(sid))
+ {
+ names.put(sid, seqs[i]);
+ }
+ }
+ }