/** * Copyright (c) 2018-2020 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal * @author Alexander Rose */ import { AminoAlphabet, NuclecicAlphabet } from './constants.js'; import { Column } from '../../mol-data/db.js'; type Sequence = Sequence.Protein | Sequence.DNA | Sequence.RNA | Sequence.Generic; declare namespace Sequence { enum Kind { Protein = "protein", RNA = "RNA", DNA = "DNA", Generic = "generic" } interface Base { readonly kind: K; readonly length: number; /** One letter code */ readonly code: Column; readonly label: Column; readonly seqId: Column; /** Component id */ readonly compId: Column; /** returns index for given seqId */ readonly index: (seqId: number) => number; /** maps seqId to list of compIds */ readonly microHet: ReadonlyMap; } interface Protein extends Base { } interface RNA extends Base { } interface DNA extends Base { } interface Generic extends Base { } function getSequenceString(seq: Sequence): string; function ofResidueNames(compId: Column, seqId: Column): Sequence; function ofSequenceRanges(seqIdBegin: Column, seqIdEnd: Column): Sequence; } export { Sequence };