Browse Source

fix display issue with sifts mapping (#854)

* fix display issue with sifts mapping

* update header
David Sehnal 1 year ago
parent
commit
5e1c351efc
2 changed files with 6 additions and 5 deletions
  1. 2 0
      CHANGELOG.md
  2. 4 5
      src/mol-model-props/sequence/sifts-mapping.ts

+ 2 - 0
CHANGELOG.md

@@ -6,6 +6,8 @@ Note that since we don't clearly distinguish between a public and private interf
 
 ## [Unreleased]
 
+- Fix display issue with SIFTS mapping
+
 ## [v3.37.1] - 2023-06-20
 
 - Fix issues with wboit/dpoit in large scenes

+ 4 - 5
src/mol-model-props/sequence/sifts-mapping.ts

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
+ * Copyright (c) 2021-23 mol* contributors, licensed under MIT, See LICENSE file for more info.
  *
  * @author David Sehnal <david.sehnal@gmail.com>
  */
@@ -52,8 +52,7 @@ namespace SIFTSMapping {
         const model = loc.unit.model;
         const data = Provider.get(model).value;
         if (!data) return '';
-        const eI = loc.unit.elements[loc.element];
-        const rI = model.atomicHierarchy.residueAtomSegments.index[eI];
+        const rI = model.atomicHierarchy.residueAtomSegments.index[loc.element];
         return data.accession[rI];
     }
 
@@ -61,9 +60,9 @@ namespace SIFTSMapping {
         const model = loc.unit.model;
         const data = Provider.get(model).value;
         if (!data) return;
-        const eI = loc.unit.elements[loc.element];
-        const rI = model.atomicHierarchy.residueAtomSegments.index[eI];
+        const rI = model.atomicHierarchy.residueAtomSegments.index[loc.element];
         const dbName = data.dbName[rI];
+
         if (!dbName) return;
         return `${dbName} ${data.accession[rI]} ${data.num[rI]} ${data.residue[rI]}`;
     }