String pdbFile, String chain) throws SiftsException
{
structId = (chain == null) ? pdbId : pdbId + "|" + chain;
- System.out.println("Getting mapping for: " + pdbId + "|" + chain
- + " : seq- " + seq.getName());
+ System.out.println("Getting SIFTS mapping for " + structId + ": seq "
+ + seq.getName());
final StringBuilder mappingDetails = new StringBuilder(128);
PrintStream ps = new PrintStream(System.out)
int pdbStart = UNASSIGNED;
int pdbEnd = UNASSIGNED;
- Integer[] keys = mapping.keySet().toArray(new Integer[0]);
- Arrays.sort(keys);
- if (keys.length < 1)
+ if (mapping.isEmpty())
{
- throw new SiftsException(">>> Empty SIFTS mapping generated!!");
+ throw new SiftsException(
+ "SIFTS mapping failed - falling back on Needleman-Wunsch");
}
+
+ Integer[] keys = mapping.keySet().toArray(new Integer[0]);
+ Arrays.sort(keys);
seqStart = keys[0];
seqEnd = keys[keys.length - 1];