List<Residue> residues = segment.getListResidue().getResidue();
for (Residue residue : residues)
{
+ int pdbeIndex = getLeadingIntegerValue(residue.getDbResNum(),
+ UNASSIGNED);
int currSeqIndex = UNASSIGNED;
List<CrossRefDb> cRefDbs = residue.getCrossRefDb();
CrossRefDb pdbRefDb = null;
}
}
}
+ if (seqCoordSys == seqCoordSys.PDB) // FIXME: is seqCoordSys ever PDBe
+ // ???
+ {
+ // 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;
}
- if (currSeqIndex >= seq.getStart() && currSeqIndex <= seq.getEnd())
+ if (!isResidueObserved(residue)
+ && seqCoordSys != seqCoordSys.UNIPROT)
+ {
+ // mapping to PDB or PDBe so we need to bookkeep for the non-observed
+ // SEQRES positions
+ omitNonObserved.add(currSeqIndex);
+ ++nonObservedShiftIndex;
+ }
+
+ // if (currSeqIndex >= seq.getStart() && currSeqIndex <= seqlength) //
+ // true
+ // numbering
+ // is
+ // not
+ // up
+ // to
+ // seq.getEnd()
{
int resNum = (pdbRefDb == null)
.getCanonicalAminoAcid(residue.getDbResName()));
resNumMap.put(currSeqIndex, String.valueOf(resCharCode));
}
- else
- {
- omitNonObserved.add(currSeqIndex);
- ++nonObservedShiftIndex;
- }
+
mapping.put(currSeqIndex - nonObservedShiftIndex,
new int[]
{ Integer.valueOf(resNum), UNASSIGNED });