DBRefEntry[] dbRefs = seq.getDBRefs();
if (dbRefs == null || dbRefs.length < 1)
{
- throw new SiftsException("Could not get source DB Ref");
+ throw new SiftsException(
+ "Source DBRef could not be determined. DBRefs might not have been retrieved.");
}
for (DBRefEntryI dbRef : dbRefs)
&& (dbRef.getSource().equalsIgnoreCase(DBRefSource.UNIPROT) || dbRef
.getSource().equalsIgnoreCase(DBRefSource.PDB)))
{
+ seq.setSourceDBRef(dbRef);
return dbRef;
}
}
.getMapRegion();
for (MapRegion mapRegion : mapRegions)
{
- accessions.add(mapRegion.getDb().getDbAccessionId());
+ accessions
+ .add(mapRegion.getDb().getDbAccessionId().toLowerCase());
}
}
}
jalview.util.Comparison.GapChars, seq.getSequenceAsString());
HashMap<Integer, int[]> mapping = new HashMap<Integer, int[]>();
DBRefEntryI sourceDBRef = seq.getSourceDBRef();
- if (sourceDBRef == null)
- {
- sourceDBRef = getValidSourceDBRef(seq);
- // TODO ensure sequence start/end is in the same coordinate system and
- // consistent with the choosen sourceDBRef
- }
+ sourceDBRef = getValidSourceDBRef(seq);
+ // TODO ensure sequence start/end is in the same coordinate system and
+ // consistent with the choosen sourceDBRef
// set sequence coordinate system - default value is UniProt
if (sourceDBRef.getSource().equalsIgnoreCase(DBRefSource.PDB))
private boolean isFoundInSiftsEntry(String accessionId)
{
+ HashSet<String> siftsDBRefs = getAllMappingAccession();
return accessionId != null
- && getAllMappingAccession().contains(accessionId);
+ && siftsDBRefs.contains(accessionId.toLowerCase());
}
/**