// if the sequence has a primary reference to the PDB, then we are
// dealing with a sequence extracted directly from the PDB. In that
// case, numbering is PDBe - non-observed residues
- currSeqIndex = pdbeIndex;
- }
- if (currSeqIndex == UNASSIGNED)
- {
- continue;
+ currSeqIndex = seq.getStart() - 1 + pdbeIndex;
}
if (!isObserved)
{
++nonObservedShiftIndex;
}
}
+ if (currSeqIndex == UNASSIGNED)
+ {
+ // change in logic - unobserved residues with no currSeqIndex
+ // corresponding are still counted in both nonObservedShiftIndex and
+ // pdbeIndex...
+ continue;
+ }
// if (currSeqIndex >= seq.getStart() && currSeqIndex <= seqlength) //
// true
// numbering
: getLeadingIntegerValue(pdbRefDb.getDbResNum(),
UNASSIGNED);
- if (isResidueObserved(residue)
- || seqCoordSys == CoordinateSys.UNIPROT)
+ if (isObserved)
{
char resCharCode = ResidueProperties
.getSingleCharacterCode(ResidueProperties
.getCanonicalAminoAcid(residue.getDbResName()));
resNumMap.put(currSeqIndex, String.valueOf(resCharCode));
+
+ int[] mappingcols = new int[] { Integer.valueOf(resNum),
+ UNASSIGNED, isObserved ? firstPDBResNum : UNASSIGNED };
+
+ mapping.put(currSeqIndex - nonObservedShiftIndex, mappingcols);
}
- // TODO: mapping should have SeqCoordSysNum => int[] {PDBeNum,
- // PDBRESNUM, ATOMNUM }
- mapping.put(currSeqIndex - nonObservedShiftIndex,
- new int[]
- { Integer.valueOf(resNum), UNASSIGNED,
- isObserved ? firstPDBResNum
- : UNASSIGNED });
}
}
}