UNPKG

@rcsb/rcsb-saguaro-app

Version:
23 lines 1.16 kB
import { __awaiter } from "tslib"; import { rcsbClient } from "../../RcsbGraphQL/RcsbClient"; import { Assertions } from "../../RcsbUtils/Helpers/Assertions"; var assertDefined = Assertions.assertDefined; export class MultipleInstanceSequencesCollector { constructor() { this.rcsbFvQuery = rcsbClient; } collect(requestConfig) { return __awaiter(this, void 0, void 0, function* () { const result = yield this.rcsbFvQuery.requestMultipleInstanceSequences(requestConfig); return result.map(r => { var _a, _b, _c, _d; assertDefined(r.rcsb_id), assertDefined((_b = (_a = r.polymer_entity) === null || _a === void 0 ? void 0 : _a.entity_poly) === null || _b === void 0 ? void 0 : _b.pdbx_seq_one_letter_code_can); return { rcsbId: r.rcsb_id, sequence: (_d = (_c = r.polymer_entity) === null || _c === void 0 ? void 0 : _c.entity_poly) === null || _d === void 0 ? void 0 : _d.pdbx_seq_one_letter_code_can }; }); }); } } //# sourceMappingURL=MultipleInstanceSequencesCollector.js.map