JAL-2780 JAL-2781 only create a mapping entry or write a character to the ‘mapped...
authorJim Procter <jprocter@issues.jalview.org>
Tue, 13 Feb 2018 15:34:22 +0000 (15:34 +0000)
committerJim Procter <jprocter@issues.jalview.org>
Tue, 13 Feb 2018 15:34:22 +0000 (15:34 +0000)
src/jalview/ws/sifts/SiftsClient.java

index c9c4618..5050c34 100644 (file)
@@ -706,21 +706,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 });
         }
       }
     }