diff --git a/dist/lineup/renderer/StructureImageColumn.d.ts b/dist/lineup/renderer/StructureImageColumn.d.ts new file mode 100644 index 000000000..65e77fca6 --- /dev/null +++ b/dist/lineup/renderer/StructureImageColumn.d.ts @@ -0,0 +1,16 @@ +import { StringColumn, IDataRow, IStringFilter } from 'lineupjs'; +export interface IStructureFilter extends IStringFilter { + filter: string; + valid: Set; +} +export declare class StructureImageColumn extends StringColumn { + protected structureFilter: IStructureFilter | null; + protected align: string | null; + filter(row: IDataRow): boolean; + isFiltered(): boolean; + getFilter(): IStructureFilter; + setFilter(filter: IStructureFilter | null): void; + getAlign(): string | null; + setAlign(structure: string | null): void; +} +//# sourceMappingURL=StructureImageColumn.d.ts.map \ No newline at end of file diff --git a/dist/lineup/renderer/StructureImageColumn.d.ts.map b/dist/lineup/renderer/StructureImageColumn.d.ts.map new file mode 100644 index 000000000..3b8123f7f --- /dev/null +++ b/dist/lineup/renderer/StructureImageColumn.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"StructureImageColumn.d.ts","sourceRoot":"","sources":["../../../src/lineup/renderer/StructureImageColumn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAU,MAAM,UAAU,CAAC;AAGzE,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACpB;AAED,qBAAa,oBAAqB,SAAQ,YAAY;IACpD,SAAS,CAAC,eAAe,EAAE,gBAAgB,GAAG,IAAI,CAAQ;IAE1D,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEtC,MAAM,CAAC,GAAG,EAAE,QAAQ,GAAG,OAAO;IAO9B,UAAU,IAAI,OAAO;IAIrB,SAAS;IAIT,SAAS,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI;IAQzC,QAAQ,IAAI,MAAM,GAAG,IAAI;IAIzB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;CAOzC"} \ No newline at end of file diff --git a/dist/lineup/renderer/StructureImageColumn.js b/dist/lineup/renderer/StructureImageColumn.js new file mode 100644 index 000000000..96276c2d3 --- /dev/null +++ b/dist/lineup/renderer/StructureImageColumn.js @@ -0,0 +1,38 @@ +import { StringColumn, Column } from 'lineupjs'; +import { isEqual } from 'lodash'; +export class StructureImageColumn extends StringColumn { + constructor() { + super(...arguments); + this.structureFilter = null; + this.align = null; + } + filter(row) { + if (!this.isFiltered()) { + return true; + } + return this.structureFilter.valid.has(this.getLabel(row)); + } + isFiltered() { + var _a; + return this.structureFilter != null && ((_a = this.structureFilter.valid) === null || _a === void 0 ? void 0 : _a.size) > 0; + } + getFilter() { + return this.structureFilter; + } + setFilter(filter) { + if (isEqual(filter, this.structureFilter)) { + return; + } + this.fire([StringColumn.EVENT_FILTER_CHANGED, Column.EVENT_DIRTY_VALUES, Column.EVENT_DIRTY], this.structureFilter, (this.structureFilter = filter)); + } + getAlign() { + return this.align; + } + setAlign(structure) { + if (isEqual(structure, this.align)) { + return; + } + this.fire([Column.EVENT_DIRTY_VALUES, Column.EVENT_DIRTY], (this.align = structure)); + } +} +//# sourceMappingURL=StructureImageColumn.js.map \ No newline at end of file diff --git a/dist/lineup/renderer/StructureImageColumn.js.map b/dist/lineup/renderer/StructureImageColumn.js.map new file mode 100644 index 000000000..a1a5b56ae --- /dev/null +++ b/dist/lineup/renderer/StructureImageColumn.js.map @@ -0,0 +1 @@ +{"version":3,"file":"StructureImageColumn.js","sourceRoot":"","sources":["../../../src/lineup/renderer/StructureImageColumn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA2B,MAAM,EAAE,MAAM,UAAU,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAOjC,MAAM,OAAO,oBAAqB,SAAQ,YAAY;IAAtD;;QACY,oBAAe,GAA4B,IAAI,CAAC;QAEhD,UAAK,GAAkB,IAAI,CAAC;IAoCxC,CAAC;IAlCC,MAAM,CAAC,GAAa;QAClB,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE;YACtB,OAAO,IAAI,CAAC;SACb;QACD,OAAO,IAAI,CAAC,eAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED,UAAU;;QACR,OAAO,IAAI,CAAC,eAAe,IAAI,IAAI,IAAI,CAAA,MAAA,IAAI,CAAC,eAAe,CAAC,KAAK,0CAAE,IAAI,IAAG,CAAC,CAAC;IAC9E,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,eAAgB,CAAC;IAC/B,CAAC;IAED,SAAS,CAAC,MAA+B;QACvC,IAAI,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,eAAe,CAAC,EAAE;YACzC,OAAO;SACR;QAED,IAAI,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,oBAAoB,EAAE,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,CAAC,CAAC;IACvJ,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,QAAQ,CAAC,SAAwB;QAC/B,IAAI,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE;YAClC,OAAO;SACR;QAED,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC;IACvF,CAAC;CACF"} \ No newline at end of file diff --git a/dist/lineup/renderer/StructureImageRenderer.d.ts b/dist/lineup/renderer/StructureImageRenderer.d.ts new file mode 100644 index 000000000..65efd3bc3 --- /dev/null +++ b/dist/lineup/renderer/StructureImageRenderer.d.ts @@ -0,0 +1,13 @@ +import { ICellRendererFactory, ERenderMode, ICellRenderer, IRenderContext, IGroupCellRenderer } from 'lineupjs'; +import { StructureImageColumn } from './StructureImageColumn'; +export declare function getImageURL(structure: string, substructure?: string | null, align?: string | null): string; +export declare function getReducedImages(structures: string[], method?: 'single' | 'murcko' | 'mcs' | 'similarity' | 'auto'): Promise; +export declare function svgToImageSrc(svg: string): string; +export declare function svgToCSSBackground(svg: string): string; +export declare class StructureImageRenderer implements ICellRendererFactory { + readonly title: string; + canRender(col: StructureImageColumn, mode: ERenderMode): boolean; + create(col: StructureImageColumn): ICellRenderer; + createGroup(col: StructureImageColumn, context: IRenderContext): IGroupCellRenderer; +} +//# sourceMappingURL=StructureImageRenderer.d.ts.map \ No newline at end of file diff --git a/dist/lineup/renderer/StructureImageRenderer.d.ts.map b/dist/lineup/renderer/StructureImageRenderer.d.ts.map new file mode 100644 index 000000000..5f53e2c73 --- /dev/null +++ b/dist/lineup/renderer/StructureImageRenderer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"StructureImageRenderer.d.ts","sourceRoot":"","sources":["../../../src/lineup/renderer/StructureImageRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,aAAa,EAAY,cAAc,EAAE,kBAAkB,EAAmC,MAAM,UAAU,CAAC;AAE3J,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAK9D,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,GAAE,MAAM,GAAG,IAAW,EAAE,KAAK,GAAE,MAAM,GAAG,IAAW,GAAG,MAAM,CAItH;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,MAAM,GAAE,QAAQ,GAAG,QAAQ,GAAG,KAAK,GAAG,YAAY,GAAG,MAAe,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQnJ;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,qBAAa,sBAAuB,YAAW,oBAAoB;IACjE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAwB;IAE9C,SAAS,CAAC,GAAG,EAAE,oBAAoB,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO;IAIhE,MAAM,CAAC,GAAG,EAAE,oBAAoB,GAAG,aAAa;IA6BhD,WAAW,CAAC,GAAG,EAAE,oBAAoB,EAAE,OAAO,EAAE,cAAc,GAAG,kBAAkB;CAYpF"} \ No newline at end of file diff --git a/dist/lineup/renderer/StructureImageRenderer.js b/dist/lineup/renderer/StructureImageRenderer.js new file mode 100644 index 000000000..bf5d82412 --- /dev/null +++ b/dist/lineup/renderer/StructureImageRenderer.js @@ -0,0 +1,72 @@ +import { ERenderMode, renderMissingDOM } from 'lineupjs'; +import { abortAble } from 'lineupengine'; +import { StructureImageColumn } from './StructureImageColumn'; +import { AppContext } from '../../app'; +const template = ''; +export function getImageURL(structure, substructure = null, align = null) { + return `/api/image/?structure=${encodeURIComponent(structure)}${substructure ? `&substructure=${encodeURIComponent(substructure)}` : ''}${align ? `&align=${encodeURIComponent(align)}` : ''}`; +} +export function getReducedImages(structures, method = 'auto') { + // return fetchText('/api/image/', { + // structures, + // method, + // }).catch(() => null); + return AppContext.getInstance() + .getAPIData('/image', { structures, method }) + .catch(() => null); +} +export function svgToImageSrc(svg) { + return `data:image/svg+xml;base64,${btoa(svg)}`; +} +export function svgToCSSBackground(svg) { + return `url('${svgToImageSrc(svg)}')`; +} +export class StructureImageRenderer { + constructor() { + this.title = 'Chemical Structure'; + } + canRender(col, mode) { + return col instanceof StructureImageColumn && (mode === ERenderMode.CELL || mode === ERenderMode.GROUP); + } + create(col) { + return { + template, + update: (n, d) => { + var _a; + if (!renderMissingDOM(n, col, d)) { + if ((_a = d.v.images) === null || _a === void 0 ? void 0 : _a[0]) { + n.style.backgroundImage = svgToCSSBackground(d.v.images[0]); + return null; + } + const value = col.getValue(d); + // Load aysnc to avoid triggering + return abortAble(new Promise((resolve) => { + window.setTimeout(() => resolve(value), 500); + })).then((image) => { + var _a; + if (typeof image === 'symbol') { + return; + } + n.style.backgroundImage = `url('${getImageURL(value, (_a = col.getFilter()) === null || _a === void 0 ? void 0 : _a.filter, col.getAlign())}')`; + n.title = value; + n.href = `https://pubchem.ncbi.nlm.nih.gov/#query=${value}`; + }); + } + return null; + }, + }; + } + createGroup(col, context) { + return { + template, + update: (n, group) => { + context.tasks.groupRows(col, group, 'StructureImageRendererGroup', (rows) => { + return abortAble(getReducedImages(Array.from(rows.map((row) => col.getLabel(row))))).then((res) => { + n.style.backgroundImage = res ? svgToCSSBackground(res) : ''; + }); + }); + }, + }; + } +} +//# sourceMappingURL=StructureImageRenderer.js.map \ No newline at end of file diff --git a/dist/lineup/renderer/StructureImageRenderer.js.map b/dist/lineup/renderer/StructureImageRenderer.js.map new file mode 100644 index 000000000..8948b3a5e --- /dev/null +++ b/dist/lineup/renderer/StructureImageRenderer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"StructureImageRenderer.js","sourceRoot":"","sources":["../../../src/lineup/renderer/StructureImageRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,WAAW,EAA8E,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC3J,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,MAAM,QAAQ,GAAG,qIAAqI,CAAC;AAEvJ,MAAM,UAAU,WAAW,CAAC,SAAiB,EAAE,eAA8B,IAAI,EAAE,QAAuB,IAAI;IAC5G,OAAO,yBAAyB,kBAAkB,CAAC,SAAS,CAAC,GAAG,YAAY,CAAC,C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,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAQ,EAAE,EAAE;wBACrG,CAAC,CAAC,KAAK,CAAC,eAAe,GAAG,GAAG,CAAC,CAAC,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;oBAC/D,CAAC,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF"} \ No newline at end of file diff --git a/src/lineup/renderer/StructureImageColumn.ts b/src/lineup/renderer/StructureImageColumn.ts new file mode 100644 index 000000000..ca301b224 --- /dev/null +++ b/src/lineup/renderer/StructureImageColumn.ts @@ -0,0 +1,48 @@ +import { StringColumn, IDataRow, IStringFilter, Column } from 'lineupjs'; +import { isEqual } from 'lodash'; + +export interface IStructureFilter extends IStringFilter { + filter: string; + valid: Set; +} + +export class StructureImageColumn extends StringColumn { + protected structureFilter: IStructureFilter | null = null; + + protected align: string | null = null; + + filter(row: IDataRow): boolean { + if (!this.isFiltered()) { + return true; + } + return this.structureFilter!.valid.has(this.getLabel(row)); + } + + isFiltered(): boolean { + return this.structureFilter != null && this.structureFilter.valid?.size > 0; + } + + getFilter() { + return this.structureFilter!; + } + + setFilter(filter: IStructureFilter | null) { + if (isEqual(filter, this.structureFilter)) { + return; + } + + this.fire([StringColumn.EVENT_FILTER_CHANGED, Column.EVENT_DIRTY_VALUES, Column.EVENT_DIRTY], this.structureFilter, (this.structureFilter = filter)); + } + + getAlign(): string | null { + return this.align; + } + + setAlign(structure: string | null): void { + if (isEqual(structure, this.align)) { + return; + } + + this.fire([Column.EVENT_DIRTY_VALUES, Column.EVENT_DIRTY], (this.align = structure)); + } +} diff --git a/src/lineup/renderer/StructureImageRenderer.ts b/src/lineup/renderer/StructureImageRenderer.ts new file mode 100644 index 000000000..a2dafca52 --- /dev/null +++ b/src/lineup/renderer/StructureImageRenderer.ts @@ -0,0 +1,80 @@ +import { ICellRendererFactory, ERenderMode, ICellRenderer, IDataRow, IRenderContext, IGroupCellRenderer, IOrderedGroup, renderMissingDOM } from 'lineupjs'; +import { abortAble } from 'lineupengine'; +import { StructureImageColumn } from './StructureImageColumn'; +import { AppContext } from '../../app'; + +const template = ''; + +export function getImageURL(structure: string, substructure: string | null = null, align: string | null = null): string { + return `/api/image/?structure=${encodeURIComponent(structure)}${substructure ? `&substructure=${encodeURIComponent(substructure)}` : ''}${ + align ? `&align=${encodeURIComponent(align)}` : '' + }`; +} + +export function getReducedImages(structures: string[], method: 'single' | 'murcko' | 'mcs' | 'similarity' | 'auto' = 'auto'): Promise { + // return fetchText('/api/image/', { + // structures, + // method, + // }).catch(() => null); + return AppContext.getInstance() + .getAPIData('/image', { structures, method }) + .catch(() => null); +} + +export function svgToImageSrc(svg: string): string { + return `data:image/svg+xml;base64,${btoa(svg)}`; +} + +export function svgToCSSBackground(svg: string): string { + return `url('${svgToImageSrc(svg)}')`; +} + +export class StructureImageRenderer implements ICellRendererFactory { + readonly title: string = 'Chemical Structure'; + + canRender(col: StructureImageColumn, mode: ERenderMode): boolean { + return col instanceof StructureImageColumn && (mode === ERenderMode.CELL || mode === ERenderMode.GROUP); + } + + create(col: StructureImageColumn): ICellRenderer { + return { + template, + update: (n: HTMLLinkElement, d: IDataRow) => { + if (!renderMissingDOM(n, col, d)) { + if (d.v.images?.[0]) { + n.style.backgroundImage = svgToCSSBackground(d.v.images[0]); + return null; + } + const value = col.getValue(d)!; + // Load aysnc to avoid triggering + return abortAble( + new Promise((resolve) => { + window.setTimeout(() => resolve(value), 500); + }), + ).then((image) => { + if (typeof image === 'symbol') { + return; + } + n.style.backgroundImage = `url('${getImageURL(value, col.getFilter()?.filter, col.getAlign())}')`; + n.title = value; + n.href = `https://pubchem.ncbi.nlm.nih.gov/#query=${value}`; + }); + } + return null; + }, + }; + } + + createGroup(col: StructureImageColumn, context: IRenderContext): IGroupCellRenderer { + return { + template, + update: (n: HTMLImageElement, group: IOrderedGroup) => { + context.tasks.groupRows(col, group, 'StructureImageRendererGroup', (rows) => { + return abortAble(getReducedImages(Array.from(rows.map((row) => col.getLabel(row))))).then((res: any) => { + n.style.backgroundImage = res ? svgToCSSBackground(res) : ''; + }); + }); + }, + }; + } +}