X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fsifts%2FSiftsClient.java;h=b5f9653274344e97bad532411c21c7db43b45009;hb=ac8746eeccd41605a304b89cf43f7780526f10f8;hp=3899f040a7b76b2202b48de31d6da71025c6ba87;hpb=38889ac4815d29d1fbb040ff1dbbc47fe89ea87e;p=jalview.git diff --git a/src/jalview/ws/sifts/SiftsClient.java b/src/jalview/ws/sifts/SiftsClient.java index 3899f04..b5f9653 100644 --- a/src/jalview/ws/sifts/SiftsClient.java +++ b/src/jalview/ws/sifts/SiftsClient.java @@ -676,11 +676,7 @@ public class SiftsClient implements SiftsClientI // 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) { @@ -694,6 +690,13 @@ public class SiftsClient implements SiftsClientI ++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 @@ -710,21 +713,18 @@ public class SiftsClient implements SiftsClientI : 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 }); } } }