diff --git a/src/mol-model/structure/model/properties/sequence.ts b/src/mol-model/structure/model/properties/sequence.ts index 229c5509b72ccff1ec691a867bdfa3f1e1f44a1b..f10338b174124e571eb7f069bd0d34da39eb8001 100644 --- a/src/mol-model/structure/model/properties/sequence.ts +++ b/src/mol-model/structure/model/properties/sequence.ts @@ -12,6 +12,12 @@ interface Sequence { readonly byEntityKey: { [key: number]: Sequence.Entity } } +// TODO lift to model/sequence/ folder +// TODO add one letter code sequence string +// TODO add mapping support to other sequence spaces, e.g. uniprot +// TODO add sequence kind, e.g. protein, dna, rna (alphabets?) +// TODO sequence alignment (take NGL code as starting point) + namespace Sequence { export interface Entity { readonly entityId: string, @@ -27,6 +33,9 @@ namespace Sequence { const byEntityKey: Sequence['byEntityKey'] = {}; + // TODO get min/max of label_seq_id to handle missing residues at start and in between + // note that this assumes label_seq_id is monotonically increasing + const chainCount = hierarchy.chains._rowCount for (let i = 0; i < chainCount; ++i) { const entityId = label_entity_id.value(i) diff --git a/src/mol-model/structure/structure/element.ts b/src/mol-model/structure/structure/element.ts index e62dcf1333a3585005a1075391a2314152e4f21d..48e0307605f4516c66b8540c46f74fefb05340a2 100644 --- a/src/mol-model/structure/structure/element.ts +++ b/src/mol-model/structure/structure/element.ts @@ -4,7 +4,7 @@ * @author David Sehnal <david.sehnal@gmail.com> */ -import { Tuple } from 'mol-data/int' +import { Tuple, SortedArray } from 'mol-data/int' import Unit from './unit' import Structure from './structure' @@ -35,6 +35,9 @@ namespace Element { } export function property<T>(p: Property<T>) { return p; } + + /** Represents multiple element locations */ + export type Loci = ReadonlyArray<{ unit: Unit, elements: SortedArray }> } export default Element \ No newline at end of file