Pārlūkot izejas kodu

fix coarse seq label (index error)

Alexander Rose 6 gadi atpakaļ
vecāks
revīzija
2b6c941ec2
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      src/mol-view/label.ts

+ 1 - 1
src/mol-view/label.ts

@@ -61,7 +61,7 @@ export function elementLabel(loc: Element.Location) {
         if (seq_id_begin === seq_id_end) {
             const entityKey = Props.coarse.entityKey(loc)
             const seq = loc.unit.model.sequence.byEntityKey[entityKey]
-            const comp_id = seq.compId.value(seq_id_begin)
+            const comp_id = seq.compId.value(seq_id_begin - 1) // 1-indexed
             element = `[${comp_id}]${seq_id_begin}:${asym_id}`
         } else {
             element = `${seq_id_begin}-${seq_id_end}:${asym_id}`