Browse Source

fix seq number in sequence widget for atomic models without auth_seq_id

Alexander Rose 5 years ago
parent
commit
4911585a85
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/mol-plugin/ui/sequence/sequence.tsx

+ 4 - 1
src/mol-plugin/ui/sequence/sequence.tsx

@@ -132,7 +132,10 @@ export class Sequence<P extends SequenceProps> extends PluginUIComponent<P> {
         const l = StructureElement.Loci.getFirstLocation(loci, this.location);
         if (l) {
             if (Unit.isAtomic(l.unit)) {
-                const seqId = StructureProperties.residue.auth_seq_id(l)
+                const { residues } = l.unit.model.atomicHierarchy
+                const seqId = residues.auth_seq_id.isDefined
+                    ? StructureProperties.residue.auth_seq_id(l)
+                    : StructureProperties.residue.label_seq_id(l)
                 const insCode = StructureProperties.residue.pdbx_PDB_ins_code(l)
                 sequenceNumber = `${seqId}${insCode ? insCode : ''}`
             } else if (Unit.isCoarse(l.unit)) {