@datagrok/bio 2.27.0 → 2.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/287.js +1 -1
- package/dist/287.js.map +1 -1
- package/dist/package-test.js +1 -1
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/package.json +1 -1
- package/scripts/mol-to-helm.py +642 -170
- package/src/analysis/sequence-activity-cliffs.ts +8 -6
- package/src/package-api.ts +2 -2
- package/src/package.ts +2 -1
- package/src/utils/annotations/annotation-manager-ui.ts +1 -1
- package/src/utils/monomer-lib/library-file-manager/ui.ts +1 -1
- package/src/utils/monomer-lib/monomer-manager/monomer-manager.ts +1 -1
- package/src/utils/multiple-sequence-alignment-ui.ts +2 -2
- package/test-console-output-1.log +546 -538
- package/test-record-1.mp4 +0 -0
package/dist/287.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkbio=self.webpackChunkbio||[]).push([[287],{9287(e,o,t){t.d(o,{showAnnotationManagerDialog:()=>d});var n=t(4328),i=t(7389),l=t(6082),a=t(4517),r=t(3736);const s={[a.eI.Structure]:"Structure (FR/CDR)",[a.eI.Liability]:"Liability",[a.eI.PTM]:"Post-translational Modification",[a.eI.Custom]:"Custom"},c={[a.Hq.High]:"High",[a.Hq.Medium]:"Medium",[a.Hq.Low]:"Low",[a.Hq.Info]:"Info"};function d(){const e=n.shell.tv?.dataFrame;if(!e)return void n.shell.warning("No table open");const o=e.columns.bySemTypeAll(l.SEMTYPE.MACROMOLECULE);if(0===o.length)return void n.shell.warning("No macromolecule columns found");let t=o[0];const a=i.input.column("Sequence Column",{table:e,value:t,filter:e=>e.semType===l.SEMTYPE.MACROMOLECULE,onValueChanged:e=>{t=e,u()}}),d=i.divV([],{style:{maxHeight:"380px",overflowY:"auto",paddingRight:"8px"}});function u(){d.innerHTML="";const o=(0,r.Ln)(t);if(0!==o.length)for(const n of o){const o=s[n.category]??n.category,a=n.severity?` [${c[n.severity]??n.severity}]`:"",p=n.start&&n.end?` (${n.start}-${n.end})`:"",g=n.sourceScheme?` ${n.sourceScheme}`:"",h=i.iconFA("trash",()=>{const o=(0,r.Ln)(t).filter(e=>e.id!==n.id);(0,r.fh)(t,o),e.fireValuesChanged(),u()});h.style.cursor="pointer",h.style.color="#999",h.style.marginLeft="8px";const f=n.color??"#ccc";let m=f;const y=i.div([],{style:{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:m,display:"inline-block",marginRight:"6px",flexShrink:"0",cursor:"pointer"}});i.colorPicker(l.Color.fromHtml(n.color??"#ccc"),e=>{m=l.Color.toHtml(e)},y,()=>{const o=(0,r.Ln)(t).map(e=>e.id===n.id?{...e,color:m}:e);(0,r.fh)(t,o),e.fireValuesChanged(),u()},()=>{m=f,y.style.backgroundColor=m});const x=i.divH([y,i.divText(`${n.name}${p}${g}${a}`,{style:{flex:"1",fontSize:"12px",padding:"4px"}}),i.divText(o,{style:{color:"#888",fontSize:"11px",marginRight:"8px"}}),h],{style:{alignItems:"center",padding:"4px 0",borderBottom:"1px solid #eee"}});d.append(x)}else d.append(i.divText("No annotations on this column.",{style:{color:"#888",padding:"8px"}}))}u();const p=i.button("Clear All",()=>{(0,r.OW)(e,t),e.fireValuesChanged(),u(),n.shell.info("All annotations cleared")});i.dialog({title:"Manage Annotations"}).add(i.inputs([a])).add(i.h3("Annotations")).add(d).add(i.divH([p],{style:{marginTop:"8px"}})).onOK(()=>{}).show()}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkbio=self.webpackChunkbio||[]).push([[287],{9287(e,o,t){t.d(o,{showAnnotationManagerDialog:()=>d});var n=t(4328),i=t(7389),l=t(6082),a=t(4517),r=t(3736);const s={[a.eI.Structure]:"Structure (FR/CDR)",[a.eI.Liability]:"Liability",[a.eI.PTM]:"Post-translational Modification",[a.eI.Custom]:"Custom"},c={[a.Hq.High]:"High",[a.Hq.Medium]:"Medium",[a.Hq.Low]:"Low",[a.Hq.Info]:"Info"};function d(){const e=n.shell.tv?.dataFrame;if(!e)return void n.shell.warning("No table open");const o=e.columns.bySemTypeAll(l.SEMTYPE.MACROMOLECULE);if(0===o.length)return void n.shell.warning("No macromolecule columns found");let t=o[0];const a=i.input.column("Sequence Column",{table:e,value:t,filter:e=>e.semType===l.SEMTYPE.MACROMOLECULE,onValueChanged:e=>{t=e,u()}}),d=i.divV([],{style:{maxHeight:"380px",overflowY:"auto",paddingRight:"8px"}});function u(){d.innerHTML="";const o=(0,r.Ln)(t);if(0!==o.length)for(const n of o){const o=s[n.category]??n.category,a=n.severity?` [${c[n.severity]??n.severity}]`:"",p=n.start&&n.end?` (${n.start}-${n.end})`:"",g=n.sourceScheme?` ${n.sourceScheme}`:"",h=i.iconFA("trash",()=>{const o=(0,r.Ln)(t).filter(e=>e.id!==n.id);(0,r.fh)(t,o),e.fireValuesChanged(),u()},"Delete");h.style.cursor="pointer",h.style.color="#999",h.style.marginLeft="8px";const f=n.color??"#ccc";let m=f;const y=i.div([],{style:{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:m,display:"inline-block",marginRight:"6px",flexShrink:"0",cursor:"pointer"}});i.colorPicker(l.Color.fromHtml(n.color??"#ccc"),e=>{m=l.Color.toHtml(e)},y,()=>{const o=(0,r.Ln)(t).map(e=>e.id===n.id?{...e,color:m}:e);(0,r.fh)(t,o),e.fireValuesChanged(),u()},()=>{m=f,y.style.backgroundColor=m});const x=i.divH([y,i.divText(`${n.name}${p}${g}${a}`,{style:{flex:"1",fontSize:"12px",padding:"4px"}}),i.divText(o,{style:{color:"#888",fontSize:"11px",marginRight:"8px"}}),h],{style:{alignItems:"center",padding:"4px 0",borderBottom:"1px solid #eee"}});d.append(x)}else d.append(i.divText("No annotations on this column.",{style:{color:"#888",padding:"8px"}}))}u();const p=i.button("Clear All",()=>{(0,r.OW)(e,t),e.fireValuesChanged(),u(),n.shell.info("All annotations cleared")});i.dialog({title:"Manage Annotations"}).add(i.inputs([a])).add(i.h3("Annotations")).add(d).add(i.divH([p],{style:{marginTop:"8px"}})).onOK(()=>{}).show()}}}]);
|
|
2
2
|
//# sourceMappingURL=287.js.map
|
package/dist/287.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"287.js","mappings":"uLAUA,MAAMA,EAAyC,CAC7C,CAAC,KAAmBC,WAAY,qBAChC,CAAC,KAAmBC,WAAY,YAChC,CAAC,KAAmBC,KAAM,kCAC1B,CAAC,KAAmBC,QAAS,UAGzBC,EAAyC,CAC7C,CAAC,KAAkBC,MAAO,OAC1B,CAAC,KAAkBC,QAAS,SAC5B,CAAC,KAAkBC,KAAM,MACzB,CAAC,KAAkBC,MAAO,QAGrB,SAASC,IACd,MAAMC,EAAK,QAAWC,IAAIC,UAC1B,IAAKF,EAEH,YADA,QAAWG,QAAQ,iBAIrB,MAAMC,EAAUJ,EAAGK,QAAQC,aAAa,UAAWC,eACnD,GAAuB,IAAnBH,EAAQI,OAEV,YADA,QAAWL,QAAQ,kCAIrB,IAAIM,EAAcL,EAAQ,GAC1B,MAAMM,EAAW,QAASC,OAAO,kBAAmB,CAClDC,MAAOZ,EAAIa,MAAOJ,EAClBK,OAASC,GAAmBA,EAAIC,UAAY,UAAWT,cACvDU,eAAiBF,IAAUN,EAAcM,EAAMG,OAG3CC,EAAU,OAAQ,GAAI,CAACC,MAAO,CAACC,UAAW,QAASC,UAAW,OAAQC,aAAc,SAE1F,SAASL,IACPC,EAAQK,UAAY,GACpB,MAAMC,GAAc,QAAqBhB,GACzC,GAA2B,IAAvBgB,EAAYjB,OAKhB,IAAK,MAAMkB,KAASD,EAAa,CAC/B,MAAME,EAAWtC,EAAeqC,EAAME,WAAaF,EAAME,SACnDC,EAAWH,EAAMI,SAAW,KAAKpC,EAAegC,EAAMI,WAAaJ,EAAMI,YAAc,GACvFC,EAAaL,EAAMM,OAASN,EAAMO,IAAM,KAAKP,EAAMM,SAASN,EAAMO,OAAS,GAC3EC,EAAcR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AAS,SAgDjG,CAEA5C,IAEA,MAAMgD,EAAW,SAAU,YAAa,MACtC,QAAiBlE,EAAIS,GACrBT,EAAGwC,oBACHtB,IACA,QAAWiD,KAAK,6BAGH,SAAU,CAACC,MAAO,uBAC9BC,IAAI,SAAU,CAAC3D,KACf2D,IAAI,KAAM,gBACVA,IAAIlD,GACJkD,IAAI,OAAQ,CAACH,GAAW,CAAC9C,MAAO,CAACkD,UAAW,UAC5CC,KAAK,QAEDC,MACT,C","sources":["webpack://bio/./src/utils/annotations/annotation-manager-ui.ts"],"sourcesContent":["/* eslint-disable max-len */\nimport * as grok from 'datagrok-api/grok';\nimport * as ui from 'datagrok-api/ui';\nimport * as DG from 'datagrok-api/dg';\n\nimport {\n SeqAnnotation, AnnotationCategory, LiabilitySeverity,\n} from '@datagrok-libraries/bio/src/utils/macromolecule/annotations';\nimport {getColumnAnnotations, setColumnAnnotations, clearAnnotations} from './annotation-manager';\n\nconst categoryLabels: Record<string, string> = {\n [AnnotationCategory.Structure]: 'Structure (FR/CDR)',\n [AnnotationCategory.Liability]: 'Liability',\n [AnnotationCategory.PTM]: 'Post-translational Modification',\n [AnnotationCategory.Custom]: 'Custom',\n};\n\nconst severityLabels: Record<string, string> = {\n [LiabilitySeverity.High]: 'High',\n [LiabilitySeverity.Medium]: 'Medium',\n [LiabilitySeverity.Low]: 'Low',\n [LiabilitySeverity.Info]: 'Info',\n};\n\nexport function showAnnotationManagerDialog(): void {\n const df = grok.shell.tv?.dataFrame;\n if (!df) {\n grok.shell.warning('No table open');\n return;\n }\n\n const seqCols = df.columns.bySemTypeAll(DG.SEMTYPE.MACROMOLECULE);\n if (seqCols.length === 0) {\n grok.shell.warning('No macromolecule columns found');\n return;\n }\n\n let selectedCol = seqCols[0];\n const colInput = ui.input.column('Sequence Column', {\n table: df, value: selectedCol,\n filter: (col: DG.Column) => col.semType === DG.SEMTYPE.MACROMOLECULE,\n onValueChanged: (col) => { selectedCol = col!; refreshList(); },\n });\n\n const listDiv = ui.divV([], {style: {maxHeight: '380px', overflowY: 'auto', paddingRight: '8px'}});\n\n function refreshList(): void {\n listDiv.innerHTML = '';\n const annotations = getColumnAnnotations(selectedCol);\n if (annotations.length === 0) {\n listDiv.append(ui.divText('No annotations on this column.', {style: {color: '#888', padding: '8px'}}));\n return;\n }\n\n for (const annot of annotations) {\n const catLabel = categoryLabels[annot.category] ?? annot.category;\n const sevLabel = annot.severity ? ` [${severityLabels[annot.severity] ?? annot.severity}]` : '';\n const rangeLabel = annot.start && annot.end ? ` (${annot.start}-${annot.end})` : '';\n const schemeLabel = annot.sourceScheme ? ` ${annot.sourceScheme}` : '';\n\n const removeBtn = ui.iconFA('trash', () => {\n const updated = getColumnAnnotations(selectedCol).filter((a) => a.id !== annot.id);\n setColumnAnnotations(selectedCol, updated);\n df.fireValuesChanged();\n refreshList();\n }, 'Delete');\n removeBtn.style.cursor = 'pointer';\n removeBtn.style.color = '#999';\n removeBtn.style.marginLeft = '8px';\n const originalColor = annot.color ?? '#ccc';\n let currentColor = originalColor;\n const colorSwatch = ui.div([], {style: {\n width: '12px', height: '12px', borderRadius: '2px',\n backgroundColor: currentColor, display: 'inline-block', marginRight: '6px',\n flexShrink: '0', cursor: 'pointer',\n }});\n\n ui.colorPicker(DG.Color.fromHtml(annot.color ?? '#ccc'), (newColor) => {\n currentColor = DG.Color.toHtml(newColor);\n }, colorSwatch, () => {\n const updated = getColumnAnnotations(selectedCol).map((a) => a.id === annot.id ? {...a, color: currentColor} : a);\n setColumnAnnotations(selectedCol, updated);\n df.fireValuesChanged();\n refreshList();\n }, () => {\n currentColor = originalColor;\n colorSwatch.style.backgroundColor = currentColor;\n });\n\n const row = ui.divH([\n colorSwatch,\n ui.divText(`${annot.name}${rangeLabel}${schemeLabel}${sevLabel}`, {style: {flex: '1', fontSize: '12px', padding: '4px'}}),\n ui.divText(catLabel, {style: {color: '#888', fontSize: '11px', marginRight: '8px'}}),\n removeBtn,\n ], {style: {alignItems: 'center', padding: '4px 0', borderBottom: '1px solid #eee'}});\n\n listDiv.append(row);\n }\n }\n\n refreshList();\n\n const clearBtn = ui.button('Clear All', () => {\n clearAnnotations(df, selectedCol);\n df.fireValuesChanged();\n refreshList();\n grok.shell.info('All annotations cleared');\n });\n\n const dialog = ui.dialog({title: 'Manage Annotations'})\n .add(ui.inputs([colInput]))\n .add(ui.h3('Annotations'))\n .add(listDiv)\n .add(ui.divH([clearBtn], {style: {marginTop: '8px'}}))\n .onOK(() => {});\n\n dialog.show();\n}\n"],"names":["categoryLabels","Structure","Liability","PTM","Custom","severityLabels","High","Medium","Low","Info","showAnnotationManagerDialog","df","tv","dataFrame","warning","seqCols","columns","bySemTypeAll","MACROMOLECULE","length","selectedCol","colInput","column","table","value","filter","col","semType","onValueChanged","refreshList","listDiv","style","maxHeight","overflowY","paddingRight","innerHTML","annotations","annot","catLabel","category","sevLabel","severity","rangeLabel","start","end","schemeLabel","sourceScheme","removeBtn","updated","a","id","fireValuesChanged","cursor","color","marginLeft","originalColor","currentColor","colorSwatch","width","height","borderRadius","backgroundColor","display","marginRight","flexShrink","fromHtml","newColor","toHtml","map","row","name","flex","fontSize","padding","alignItems","borderBottom","append","clearBtn","info","title","add","marginTop","onOK","show"],"sourceRoot":""}
|