UNPKG

@rcsb/rcsb-saguaro-app

Version:
44 lines 1.74 kB
import { __awaiter } from "tslib"; import queryAlignment from "../RcsbQueries/Borrego/QueryAlignments.graphql"; import queryGroupAlignment from "../RcsbQueries/Borrego/QueryGroupAlignments.graphql"; import queryGroupAlignmentNoLogo from "../RcsbQueries/Borrego/QueryGroupAlignmentsNoLogo.graphql"; export class RcsbQueryAlignment { constructor(getClient) { this.getClient = getClient; } request(requestConfig) { return __awaiter(this, void 0, void 0, function* () { try { const result = yield this.getClient().request({ queryId: requestConfig.queryId, from: requestConfig.from, to: requestConfig.to, range: requestConfig.range }, queryAlignment); return result.alignments; } catch (error) { console.error(error); throw error; } }); } } export class RcsbQueryGroupAlignment { constructor(getClient) { this.getClient = getClient; } request(requestConfig) { return __awaiter(this, void 0, void 0, function* () { try { const result = yield this.getClient().request({ group: requestConfig.group, groupId: requestConfig.groupId, filter: requestConfig.filter, first: requestConfig.page.first, after: requestConfig.page.after }, requestConfig.excludeLogo ? queryGroupAlignmentNoLogo : queryGroupAlignment); return result.group_alignments; } catch (error) { console.error(error); throw error; } }); } } //# sourceMappingURL=RcsbQueryAlignment.js.map