UNPKG

@rcsb/rcsb-saguaro-app

Version:
43 lines 2 kB
import { __awaiter } from "tslib"; import { SequenceReference, AnnotationReference } from "@rcsb/rcsb-api-tools/lib/RcsbGraphQL/Types/Borrego/GqlTypes"; import { RcsbFvProteinSequence } from "../RcsbFvModule/RcsbFvProteinSequence"; import { RcsbFvCoreBuilder } from "./RcsbFvCoreBuilder"; export class RcsbFvProteinSequenceBuilder { static buildPfv(elementId, config) { return __awaiter(this, void 0, void 0, function* () { var _a; const alignmentSource = (_a = config.alignmentSource) !== null && _a !== void 0 ? _a : config.reference; const sources = [AnnotationReference.Uniprot]; if (config.reference == SequenceReference.PdbEntity) sources.unshift(AnnotationReference.PdbEntity); if (config.reference == SequenceReference.PdbInstance) sources.unshift(AnnotationReference.PdbInstance); return new Promise((resolve, reject) => { try { RcsbFvCoreBuilder.createFv({ elementId: elementId, fvModuleI: RcsbFvProteinSequence, config: { queryId: config.queryId, from: config.reference, to: alignmentSource, sources: sources, additionalConfig: { rcsbContext: { queryId: config.queryId }, hideAlignments: config.hideAlignments, bottomAlignments: config.bottomAlignments }, resolve: resolve } }); } catch (e) { reject(e); } }); }); } } //# sourceMappingURL=RcsbFvProteinSequenceBuilder.js.map