Переглянути джерело

fix sequence label for non-standard residues, #70

Alexander Rose 4 роки тому
батько
коміт
aa2899bfbd

+ 6 - 3
docs/interesting-pdb-entries.md

@@ -10,8 +10,8 @@
     * GFP chromophores (5Z6Y)
 * Nucleotides that don’t have a parent base set, i.e. detect purine/pyrimidine from geometry (THX in 1AUL, OMC in e.g. 5D3G)
 * Bases with modified ring atoms
-    * DZ has C1 instead of N1 (e.g. 5I4N)
-    * DP has N5 instead of C5 and C7 instead of N7 (e.g. 5I4N)
+    * DZ has C1 instead of N1 (e.g. 6I4N)
+    * DP has N5 instead of C5 and C7 instead of N7 (e.g. 6I4N)
 * Beta & Gamma peptides (e.g. 1GAC, 6PQF)
 * Mixed (heterogeneous) all-atom/trace-only RNA model (1JGQ)
 * Polymers with residues with missing trace atoms (e.g. 2QFJ)
@@ -21,4 +21,7 @@
 * DNA (2np2, 1d66)
 * C-alpha only (2rcj)
 * Not cyclic, but termini are backbone-only and within distance but seqIds are not compatible (6SW3)
-* Close backbone atoms but not linked (e.g. 4HIV)
+* Close backbone atoms but not linked (e.g. 4HIV)
+* Non-standard residues
+    * Protein (1BRR, 5Z6Y)
+    * DNA (5D3G)

+ 1 - 1
src/mol-model/sequence/sequence.ts

@@ -137,7 +137,7 @@ namespace Sequence {
                     });
                     labels[i] = `(${l.join('|')})`;
                 } else {
-                    labels[i] = codes[i] === 'X' ? compIds[idx] : codes[i];
+                    labels[i] = codes[i] === 'X' ? compIds[i] : codes[i];
                 }
             }