JAL-1828 lookup table to convert MSE to MET when parsing PDB data
[jalview.git] / src / jalview / ext / jmol / PDBFileWithJmol.java
index 240ea7b..cb19769 100644 (file)
@@ -242,6 +242,19 @@ public class PDBFileWithJmol extends AlignFile implements
                 lastrnum = group.getResno();
               }
               seq[len] = group.getGroup1();
+
+              /*
+               * JAL-1828 replace a modified amino acid with its standard
+               * equivalent (e.g. MSE with MET->M) to maximise sequence matching
+               */
+              String threeLetterCode = group.getGroup3();
+              String canonical = ResidueProperties.getCanonicalAminoAcid(threeLetterCode);
+              if (canonical != null
+                      && !canonical.equalsIgnoreCase(threeLetterCode))
+              {
+                seq[len] = ResidueProperties
+                        .getSingleCharacterCode(canonical);
+              }
               switch (group.getProteinStructureSubType())
               {
               case HELIX310: