@datagrok/sequence-translator 1.4.1 → 1.4.3
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/.eslintrc.json +1 -1
- package/CHANGELOG.md +20 -0
- 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/files/polytool-rules/rules_example.json +10 -0
- package/files/samples/cyclized.csv +2 -1
- package/files/tests/polytool-reaction-lib.json +40 -0
- package/package.json +7 -7
- package/src/package-test.ts +9 -1
- package/src/package.ts +8 -0
- package/src/polytool/const.ts +1 -0
- package/src/polytool/pt-conversion.ts +147 -43
- package/src/polytool/pt-dialog.ts +86 -24
- package/src/polytool/pt-enumeration-helm-dialog.ts +35 -20
- package/src/polytool/pt-enumeration-helm.ts +46 -26
- package/src/polytool/pt-placeholders-breadth-input.ts +111 -0
- package/src/polytool/pt-placeholders-input.ts +13 -20
- package/src/polytool/pt-rules.ts +24 -4
- package/src/polytool/pt-unrule-dialog.ts +106 -0
- package/src/polytool/pt-unrule.ts +37 -0
- package/src/polytool/types.ts +5 -2
- package/src/tests/polytool-convert-tests.ts +8 -9
- package/src/tests/polytool-enumerate-breadth-tests.ts +116 -0
- package/src/tests/polytool-enumerate-tests.ts +40 -41
- package/src/tests/polytool-unrule-tests.ts +10 -0
- package/src/tests/toAtomicLevel-tests.ts +72 -0
package/.eslintrc.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
],
|
|
22
22
|
"max-len": ["error", 120],
|
|
23
23
|
"max-params": ["warn", 5],
|
|
24
|
-
"max-lines-per-function": ["warn",
|
|
24
|
+
"max-lines-per-function": ["warn", 300],
|
|
25
25
|
"max-lines": ["warn", 500],
|
|
26
26
|
"no-unused-vars": "off",
|
|
27
27
|
"@typescript-eslint/no-unused-vars": "warn",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Sequence Translator changelog
|
|
2
2
|
|
|
3
|
+
## 1.4.3 (2024-09-27)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* Add PolyTool convert reverse
|
|
8
|
+
|
|
9
|
+
### Bug fixes
|
|
10
|
+
|
|
11
|
+
* Add sample reaction rule aG + azG = GGaz, test data
|
|
12
|
+
* Fix using MonomerLibHelper.loadMonomerLibForTests
|
|
13
|
+
* Add test toAtomicLevel with overridden monomer lib
|
|
14
|
+
* Fix PolyTool Enumerate for zero-based monomer position
|
|
15
|
+
* Fix Chain.getHelm square brackets for multi char symbols
|
|
16
|
+
|
|
17
|
+
## 1.4.2 (2024-09-24)
|
|
18
|
+
|
|
19
|
+
### New features
|
|
20
|
+
|
|
21
|
+
* Add PolyTool breadth enumerator
|
|
22
|
+
|
|
3
23
|
## 1.4.1 (2024-09-12)
|
|
4
24
|
|
|
5
25
|
### Bug fixes
|
package/dist/package-test.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var sequencetranslator_test;(()=>{var t={982:function(t,e,n){var s;!function(){var e={};!function(t){"use strict";t.__esModule=!0,t.digestLength=32,t.blockSize=64;var e=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function n(t,n,s,i,r){for(var o,a,l,c,h,u,f,g,d,y,p,C,m;r>=64;){for(o=n[0],a=n[1],l=n[2],c=n[3],h=n[4],u=n[5],f=n[6],g=n[7],y=0;y<16;y++)p=i+4*y,t[y]=(255&s[p])<<24|(255&s[p+1])<<16|(255&s[p+2])<<8|255&s[p+3];for(y=16;y<64;y++)C=((d=t[y-2])>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,m=((d=t[y-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3,t[y]=(C+t[y-7]|0)+(m+t[y-16]|0);for(y=0;y<64;y++)C=(((h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&u^~h&f)|0)+(g+(e[y]+t[y]|0)|0)|0,m=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&a^o&l^a&l)|0,g=f,f=u,u=h,h=c+C|0,c=l,l=a,a=o,o=C+m|0;n[0]+=o,n[1]+=a,n[2]+=l,n[3]+=c,n[4]+=h,n[5]+=u,n[6]+=f,n[7]+=g,i+=64,r-=64}return i}var s=function(){function e(){this.digestLength=t.digestLength,this.blockSize=t.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return e.prototype.reset=function(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},e.prototype.clean=function(){for(var t=0;t<this.buffer.length;t++)this.buffer[t]=0;for(t=0;t<this.temp.length;t++)this.temp[t]=0;this.reset()},e.prototype.update=function(t,e){if(void 0===e&&(e=t.length),this.finished)throw new Error("SHA256: can't update because hash was finished.");var s=0;if(this.bytesHashed+=e,this.bufferLength>0){for(;this.bufferLength<64&&e>0;)this.buffer[this.bufferLength++]=t[s++],e--;64===this.bufferLength&&(n(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(e>=64&&(s=n(this.temp,this.state,t,s,e),e%=64);e>0;)this.buffer[this.bufferLength++]=t[s++],e--;return this},e.prototype.finish=function(t){if(!this.finished){var e=this.bytesHashed,s=this.bufferLength,i=e/536870912|0,r=e<<3,o=e%64<56?64:128;this.buffer[s]=128;for(var a=s+1;a<o-8;a++)this.buffer[a]=0;this.buffer[o-8]=i>>>24&255,this.buffer[o-7]=i>>>16&255,this.buffer[o-6]=i>>>8&255,this.buffer[o-5]=i>>>0&255,this.buffer[o-4]=r>>>24&255,this.buffer[o-3]=r>>>16&255,this.buffer[o-2]=r>>>8&255,this.buffer[o-1]=r>>>0&255,n(this.temp,this.state,this.buffer,0,o),this.finished=!0}for(a=0;a<8;a++)t[4*a+0]=this.state[a]>>>24&255,t[4*a+1]=this.state[a]>>>16&255,t[4*a+2]=this.state[a]>>>8&255,t[4*a+3]=this.state[a]>>>0&255;return this},e.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},e.prototype._saveState=function(t){for(var e=0;e<this.state.length;e++)t[e]=this.state[e]},e.prototype._restoreState=function(t,e){for(var n=0;n<this.state.length;n++)this.state[n]=t[n];this.bytesHashed=e,this.finished=!1,this.bufferLength=0},e}();t.Hash=s;var i=function(){function t(t){this.inner=new s,this.outer=new s,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var e=new Uint8Array(this.blockSize);if(t.length>this.blockSize)(new s).update(t).finish(e).clean();else for(var n=0;n<t.length;n++)e[n]=t[n];for(n=0;n<e.length;n++)e[n]^=54;for(this.inner.update(e),n=0;n<e.length;n++)e[n]^=106;for(this.outer.update(e),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate),n=0;n<e.length;n++)e[n]=0}return t.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},t.prototype.clean=function(){for(var t=0;t<this.istate.length;t++)this.ostate[t]=this.istate[t]=0;this.inner.clean(),this.outer.clean()},t.prototype.update=function(t){return this.inner.update(t),this},t.prototype.finish=function(t){return this.outer.finished?this.outer.finish(t):(this.inner.finish(t),this.outer.update(t,this.digestLength).finish(t)),this},t.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},t}();function r(t){var e=(new s).update(t),n=e.digest();return e.clean(),n}function o(t,e){var n=new i(t).update(e),s=n.digest();return n.clean(),s}function a(t,e,n,s){var i=s[0];if(0===i)throw new Error("hkdf: cannot expand more");e.reset(),i>1&&e.update(t),n&&e.update(n),e.update(s),e.finish(t),s[0]++}t.HMAC=i,t.hash=r,t.default=r,t.hmac=o;var l=new Uint8Array(t.digestLength);t.hkdf=function(t,e,n,s){void 0===e&&(e=l),void 0===s&&(s=32);for(var r=new Uint8Array([1]),c=o(e,t),h=new i(c),u=new Uint8Array(h.digestLength),f=u.length,g=new Uint8Array(s),d=0;d<s;d++)f===u.length&&(a(u,h,n,r),f=0),g[d]=u[f++];return h.clean(),u.fill(0),r.fill(0),g},t.pbkdf2=function(t,e,n,s){for(var r=new i(t),o=r.digestLength,a=new Uint8Array(4),l=new Uint8Array(o),c=new Uint8Array(o),h=new Uint8Array(s),u=0;u*o<s;u++){var f=u+1;a[0]=f>>>24&255,a[1]=f>>>16&255,a[2]=f>>>8&255,a[3]=f>>>0&255,r.reset(),r.update(e),r.update(a),r.finish(c);for(var g=0;g<o;g++)l[g]=c[g];for(g=2;g<=n;g++){r.reset(),r.update(c).finish(c);for(var d=0;d<o;d++)l[d]^=c[d]}for(g=0;g<o&&u*o+g<s;g++)h[u*o+g]=l[g]}for(u=0;u<o;u++)l[u]=c[u]=0;for(u=0;u<4;u++)a[u]=0;return r.clean(),h}}(e);var i=e.default;for(var r in e)i[r]=e[r];"object"==typeof t.exports?t.exports=i:void 0===(s=function(){return i}.call(e,n,e,t))||(t.exports=s)}()}},e={};function n(s){var i=e[s];if(void 0!==i)return i.exports;var r=e[s]={exports:{}};return t[s].call(r.exports,r,r.exports,n),r.exports}n.d=(t,e)=>{for(var s in e)n.o(e,s)&&!n.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var s={};(()=>{"use strict";n.r(s),n.d(s,{_package:()=>Ht,test:()=>Ft,tests:()=>f});const t=DG,e=grok;n(982);const i=t.DataFrame.fromCsv('countries,fasta,smiles,molregno,LON,Zip Code,Street Address Line 1,ImageUrl,user_id,error_message,xray,flag,magnitude,CS-id,pdb_id,accel_a,time_offset,chart,fit,Questions,empty_number,empty_string\nBelgium,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C(=O)OCCCc1cccnc1)c2cccc(c2)C(=O)c3ccccc3,1480014,36.276729583740234,995042300,14016 ROUTE 31W,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,1,1,1QBS,1,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.497360340644872, 1.7058694986686864, 5.278052678195135, 0.16000320889028383],""points"":[{""x"":0.10000000149011612,""y"":2.374499797821045},{""x"":0.6000000238418579,""y"":2.6242473125457764},{""x"":1.100000023841858,""y"":2.367267608642578},{""x"":1.600000023841858,""y"":2.6723148822784424},{""x"":2.0999999046325684,""y"":2.6537344455718994},{""x"":2.5999999046325684,""y"":2.3651671409606934},{""x"":3.0999999046325684,""y"":2.5654284954071045},{""x"":3.5999999046325684,""y"":2.4160959720611572},{""x"":4.099999904632568,""y"":2.286726713180542},{""x"":4.599999904632568,""y"":2.5100042819976807},{""x"":5.099999904632568,""y"":1.6676985025405884},{""x"":5.599999904632568,""y"":0.680136501789093},{""x"":6.099999904632568,""y"":0.3391543924808502},{""x"":6.599999904632568,""y"":0.09038983285427094},{""x"":7.099999904632568,""y"":0.19802775979042053}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[7.525235855508179, 1.3186911876809984, 5.335672608564294, 0.7860743343958098],""points"":[{""x"":0.10000000149011612,""y"":7.988070487976074},{""x"":0.6000000238418579,""y"":7.018453121185303},{""x"":1.100000023841858,""y"":8.115279197692871},{""x"":1.600000023841858,""y"":7.486658096313477},{""x"":2.0999999046325684,""y"":7.396438121795654},{""x"":2.5999999046325684,""y"":7.477052211761475},{""x"":3.0999999046325684,""y"":6.913095474243164},{""x"":3.5999999046325684,""y"":8.01385498046875},{""x"":4.099999904632568,""y"":6.985900402069092},{""x"":4.599999904632568,""y"":6.970335960388184},{""x"":5.099999904632568,""y"":5.448817253112793},{""x"":5.599999904632568,""y"":2.5534818172454834},{""x"":6.099999904632568,""y"":1.893947958946228},{""x"":6.599999904632568,""y"":0.6340042352676392},{""x"":7.099999904632568,""y"":0.8403874039649963}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,100,abc\nBurundi,MDYKETLLMPKTDFPMRGGLPNKEPQIQEKW,COc1ccc2cc(ccc2c1)C(C)C(=O)Oc3ccc(C)cc3OC,1480015,36.276729583740234,995073444,80 STATE HIGHWAY 310,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,2,2,1ZP8,2,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[4.431460753103398, 2.1691498799246745, 5.266445597102774, 0.7825762827017926],""points"":[{""x"":0.10000000149011612,""y"":4.751083850860596},{""x"":0.6000000238418579,""y"":4.203000068664551},{""x"":1.100000023841858,""y"":4.415858745574951},{""x"":1.600000023841858,""y"":4.68414306640625},{""x"":2.0999999046325684,""y"":4.198400974273682},{""x"":2.5999999046325684,""y"":4.179222106933594},{""x"":3.0999999046325684,""y"":4.638473987579346},{""x"":3.5999999046325684,""y"":4.708553314208984},{""x"":4.099999904632568,""y"":4.291589260101318},{""x"":4.599999904632568,""y"":4.038082599639893},{""x"":5.099999904632568,""y"":3.4349939823150635},{""x"":5.599999904632568,""y"":1.2194708585739136},{""x"":6.099999904632568,""y"":1.1920831203460693},{""x"":6.599999904632568,""y"":0.5352635979652405},{""x"":7.099999904632568,""y"":0.3346920311450958}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[2.339458017970126, -1.0734184310171178, 4.746332950550934, 0.2482416857595658],""points"":[{""x"":0.10000000149011612,""y"":0.2139337658882141},{""x"":0.6000000238418579,""y"":0.4269562065601349},{""x"":1.100000023841858,""y"":0.2441573292016983},{""x"":1.600000023841858,""y"":0.146635964512825},{""x"":2.0999999046325684,""y"":0.08818462491035461},{""x"":2.5999999046325684,""y"":0.2560656666755676},{""x"":3.0999999046325684,""y"":0.42434045672416687},{""x"":3.5999999046325684,""y"":0.37111231684684753},{""x"":4.099999904632568,""y"":0.5581737160682678},{""x"":4.599999904632568,""y"":1.183590054512024},{""x"":5.099999904632568,""y"":1.5629843473434448},{""x"":5.599999904632568,""y"":2.3211288452148438},{""x"":6.099999904632568,""y"":2.229961633682251},{""x"":6.599999904632568,""y"":2.2560226917266846},{""x"":7.099999904632568,""y"":2.2142398357391357}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCameroon,MIEVFLFGIVLGLIPITLAGLFVTAYLQYRRGDQLDL,COc1ccc2cc(ccc2c1)C(C)C(=O)OCCCc3cccnc3,1480016,36.26095962524414,995153596,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,3,3,2BDJ,3,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[4.6760652578642325, 0.9046956320756703, 5.651408971856738, 0.07738846012184185],""points"":[{""x"":0.10000000149011612,""y"":4.32425594329834},{""x"":0.6000000238418579,""y"":4.668442249298096},{""x"":1.100000023841858,""y"":4.379785060882568},{""x"":1.600000023841858,""y"":5.0345139503479},{""x"":2.0999999046325684,""y"":4.878653526306152},{""x"":2.5999999046325684,""y"":4.3451313972473145},{""x"":3.0999999046325684,""y"":4.336992263793945},{""x"":3.5999999046325684,""y"":5.037430286407471},{""x"":4.099999904632568,""y"":5.0092692375183105},{""x"":4.599999904632568,""y"":4.151902675628662},{""x"":5.099999904632568,""y"":3.4066951274871826},{""x"":5.599999904632568,""y"":2.3732759952545166},{""x"":6.099999904632568,""y"":1.673728108406067},{""x"":6.599999904632568,""y"":0.48574790358543396},{""x"":7.099999904632568,""y"":0.2783052325248718}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[2.938395863010111, -1.4658480661392117, 5.462702751996584, 0.3473139023615039],""points"":[{""x"":0.10000000149011612,""y"":0.4941710829734802},{""x"":0.6000000238418579,""y"":0.15323974192142487},{""x"":1.100000023841858,""y"":0.46373432874679565},{""x"":1.600000023841858,""y"":0.3370431363582611},{""x"":2.0999999046325684,""y"":0.5179030299186707},{""x"":2.5999999046325684,""y"":0.27899765968322754},{""x"":3.0999999046325684,""y"":0.22075064480304718},{""x"":3.5999999046325684,""y"":0.5789918899536133},{""x"":4.099999904632568,""y"":0.21169911324977875},{""x"":4.599999904632568,""y"":0.27857646346092224},{""x"":5.099999904632568,""y"":1.0906332731246948},{""x"":5.599999904632568,""y"":1.8520300388336182},{""x"":6.099999904632568,""y"":2.7177059650421143},{""x"":6.599999904632568,""y"":2.8680918216705322},{""x"":7.099999904632568,""y"":3.2413077354431152}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCanada,MMELVLKTIIGPIVVGVVLRIVDKWLNKDK,CC(C(=O)NCCS)c1cccc(c1)C(=O)c2ccccc2,1480017,36.26095962524414,99515,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,4,4,1IAN,4,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[0.8597390975430008, 1.0957625732481946, 5.260537067987958, 0.07974187998177736],""points"":[{""x"":0.10000000149011612,""y"":0.8190152645111084},{""x"":0.6000000238418579,""y"":0.8421689867973328},{""x"":1.100000023841858,""y"":0.8740922212600708},{""x"":1.600000023841858,""y"":0.8924275040626526},{""x"":2.0999999046325684,""y"":0.8249067664146423},{""x"":2.5999999046325684,""y"":0.9327669143676758},{""x"":3.0999999046325684,""y"":0.8522974252700806},{""x"":3.5999999046325684,""y"":0.8174492716789246},{""x"":4.099999904632568,""y"":0.8394647240638733},{""x"":4.599999904632568,""y"":0.7139387726783752},{""x"":5.099999904632568,""y"":0.5561167597770691},{""x"":5.599999904632568,""y"":0.3276226818561554},{""x"":6.099999904632568,""y"":0.12479474395513535},{""x"":6.599999904632568,""y"":0.13006797432899475},{""x"":7.099999904632568,""y"":0.059702079743146896}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.760930219582546, 1.6591793293833013, 4.667155929720851, 0.7858109544121652],""points"":[{""x"":0.10000000149011612,""y"":6.156993389129639},{""x"":0.6000000238418579,""y"":5.236701965332031},{""x"":1.100000023841858,""y"":6.010560512542725},{""x"":1.600000023841858,""y"":5.495512962341309},{""x"":2.0999999046325684,""y"":6.087770462036133},{""x"":2.5999999046325684,""y"":5.79986572265625},{""x"":3.0999999046325684,""y"":5.597546577453613},{""x"":3.5999999046325684,""y"":5.520902156829834},{""x"":4.099999904632568,""y"":5.360654354095459},{""x"":4.599999904632568,""y"":3.5539746284484863},{""x"":5.099999904632568,""y"":1.577236294746399},{""x"":5.599999904632568,""y"":1.0001264810562134},{""x"":6.099999904632568,""y"":0.9305797815322876},{""x"":6.599999904632568,""y"":0.6033638715744019},{""x"":7.099999904632568,""y"":0.4203685522079468}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nColombia,MDRTDEVSNHTHDKPTLTWFEEIFEEYHSPFHN,FC(F)(F)c1ccc(OC2CCNCC2)cc1,1480029,36.3309440612793,995152050,1 COURT HOUSE SQUARE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,5,5,4UJ1,5,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[6.4995088314153655, 2.4270351004539914, 5.178659535348579, 0.625653346241577],""points"":[{""x"":0.10000000149011612,""y"":6.496231555938721},{""x"":0.6000000238418579,""y"":6.42543363571167},{""x"":1.100000023841858,""y"":7.040063858032227},{""x"":1.600000023841858,""y"":6.1115403175354},{""x"":2.0999999046325684,""y"":6.680728435516357},{""x"":2.5999999046325684,""y"":6.406774520874023},{""x"":3.0999999046325684,""y"":6.611269474029541},{""x"":3.5999999046325684,""y"":5.889094352722168},{""x"":4.099999904632568,""y"":6.75344705581665},{""x"":4.599999904632568,""y"":6.361435890197754},{""x"":5.099999904632568,""y"":4.1666975021362305},{""x"":5.599999904632568,""y"":1.172118902206421},{""x"":6.099999904632568,""y"":0.801048994064331},{""x"":6.599999904632568,""y"":0.4640021026134491},{""x"":7.099999904632568,""y"":0.0010357667924836278}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[1.4734381347446401, 1.1649805188074196, 4.82958608866421, 0.09500545496710007],""points"":[{""x"":0.10000000149011612,""y"":1.5279096364974976},{""x"":0.6000000238418579,""y"":1.3559974431991577},{""x"":1.100000023841858,""y"":1.5246378183364868},{""x"":1.600000023841858,""y"":1.5567657947540283},{""x"":2.0999999046325684,""y"":1.4114240407943726},{""x"":2.5999999046325684,""y"":1.4045010805130005},{""x"":3.0999999046325684,""y"":1.4769829511642456},{""x"":3.5999999046325684,""y"":1.4875500202178955},{""x"":4.099999904632568,""y"":1.2991987466812134},{""x"":4.599999904632568,""y"":0.922961413860321},{""x"":5.099999904632568,""y"":0.6520044803619385},{""x"":5.599999904632568,""y"":0.15350978076457977},{""x"":6.099999904632568,""y"":0.1078903079032898},{""x"":6.599999904632568,""y"":0.17276449501514435},{""x"":7.099999904632568,""y"":0.14066608250141144}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCosta Rica,MKSTKEEIQTIKTLLKDSRTAKYHKRLQIVL,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCCc3ccccc3,1480018,36.3309440612793,995084218,4041 SOUTHWESTERN BLVD,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,6,6,2BPW,6,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.4833641843311227, -1.8945978742090062, 4.671127708092568, 0.24159861311815153],""points"":[{""x"":0.10000000149011612,""y"":0.0969524160027504},{""x"":0.6000000238418579,""y"":0.028483040630817413},{""x"":1.100000023841858,""y"":0.22087176144123077},{""x"":1.600000023841858,""y"":0.0068915546871721745},{""x"":2.0999999046325684,""y"":0.4305879771709442},{""x"":2.5999999046325684,""y"":0.44774115085601807},{""x"":3.0999999046325684,""y"":0.45346319675445557},{""x"":3.5999999046325684,""y"":0.2370593100786209},{""x"":4.099999904632568,""y"":0.4657953977584839},{""x"":4.599999904632568,""y"":1.155200719833374},{""x"":5.099999904632568,""y"":2.2294070720672607},{""x"":5.599999904632568,""y"":2.4311530590057373},{""x"":6.099999904632568,""y"":2.33846116065979},{""x"":6.599999904632568,""y"":2.608201026916504},{""x"":7.099999904632568,""y"":2.8136143684387207}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.224573521642033, 1.4454033924198528, 5.6014197746076535, 0.2823216054197577],""points"":[{""x"":0.10000000149011612,""y"":4.95027494430542},{""x"":0.6000000238418579,""y"":5.1754679679870605},{""x"":1.100000023841858,""y"":5.276752948760986},{""x"":1.600000023841858,""y"":5.589294910430908},{""x"":2.0999999046325684,""y"":5.616994857788086},{""x"":2.5999999046325684,""y"":5.120813846588135},{""x"":3.0999999046325684,""y"":5.340766906738281},{""x"":3.5999999046325684,""y"":4.876471042633057},{""x"":4.099999904632568,""y"":4.94999361038208},{""x"":4.599999904632568,""y"":5.162564754486084},{""x"":5.099999904632568,""y"":4.399557590484619},{""x"":5.599999904632568,""y"":2.7977969646453857},{""x"":6.099999904632568,""y"":1.0229872465133667},{""x"":6.599999904632568,""y"":0.48275601863861084},{""x"":7.099999904632568,""y"":0.10408931970596313}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCuba,MHAILRYFIRRLFYHIFYKIYSLISKKHQSLPSDVRQF,COc1ccc2c(c1)c(CC(=O)N3CCCC3C(=O)Oc4ccc(C)cc4OC)c(C)n2C(=O)c5ccc(Cl)cc5,1480019,36.33115768432617,995081928,1227 US HIGHWAY 11,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,7,7,1QBS,7,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[3.320838679713925, -1.2421619987316728, 4.831325425225256, 0.3236011098403072],""points"":[{""x"":0.10000000149011612,""y"":0.3727470338344574},{""x"":0.6000000238418579,""y"":0.12365014106035233},{""x"":1.100000023841858,""y"":0.48422467708587646},{""x"":1.600000023841858,""y"":0.2264465093612671},{""x"":2.0999999046325684,""y"":0.16821794211864471},{""x"":2.5999999046325684,""y"":0.3879014551639557},{""x"":3.0999999046325684,""y"":0.5470244884490967},{""x"":3.5999999046325684,""y"":0.3419053554534912},{""x"":4.099999904632568,""y"":0.7655120491981506},{""x"":4.599999904632568,""y"":1.2346516847610474},{""x"":5.099999904632568,""y"":2.453336715698242},{""x"":5.599999904632568,""y"":2.9565491676330566},{""x"":6.099999904632568,""y"":3.335299491882324},{""x"":6.599999904632568,""y"":3.240290880203247},{""x"":7.099999904632568,""y"":3.1107218265533447}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[3.6401853521511094, 1.26211588875013, 5.399028074402744, 0.5089580830068091],""points"":[{""x"":0.10000000149011612,""y"":3.8585598468780518},{""x"":0.6000000238418579,""y"":3.6077206134796143},{""x"":1.100000023841858,""y"":3.855252265930176},{""x"":1.600000023841858,""y"":3.619039297103882},{""x"":2.0999999046325684,""y"":3.839388370513916},{""x"":2.5999999046325684,""y"":3.335283041000366},{""x"":3.0999999046325684,""y"":3.571141481399536},{""x"":3.5999999046325684,""y"":3.4155046939849854},{""x"":4.099999904632568,""y"":3.7316646575927734},{""x"":4.599999904632568,""y"":3.0680155754089355},{""x"":5.099999904632568,""y"":2.891066551208496},{""x"":5.599999904632568,""y"":1.6022753715515137},{""x"":6.099999904632568,""y"":0.7652576565742493},{""x"":6.599999904632568,""y"":0.6875326037406921},{""x"":7.099999904632568,""y"":0.5828871726989746}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nItaly,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO[N+](=O)[O-],1480020,36.33115768432617,99502,"168-46 91ST AVE., 2ND FLR",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,8,8,1ZP8,8,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.293592105923809, 1.3781586549141835, 5.1025898038676605, 0.03493851245291291],""points"":[{""x"":0.10000000149011612,""y"":2.1287283897399902},{""x"":0.6000000238418579,""y"":2.267972230911255},{""x"":1.100000023841858,""y"":2.398442506790161},{""x"":1.600000023841858,""y"":2.5130622386932373},{""x"":2.0999999046325684,""y"":2.3255116939544678},{""x"":2.5999999046325684,""y"":2.127340793609619},{""x"":3.0999999046325684,""y"":2.47259783744812},{""x"":3.5999999046325684,""y"":2.131181478500366},{""x"":4.099999904632568,""y"":2.090421438217163},{""x"":4.599999904632568,""y"":2.02299165725708},{""x"":5.099999904632568,""y"":1.1105059385299683},{""x"":5.599999904632568,""y"":0.4494485855102539},{""x"":6.099999904632568,""y"":0.1375635862350464},{""x"":6.599999904632568,""y"":0.036351121962070465},{""x"":7.099999904632568,""y"":0.1619771122932434}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.953125499439879, 1.2528620255306528, 5.187637440149802, 0.3110348753260886],""points"":[{""x"":0.10000000149011612,""y"":5.6585283279418945},{""x"":0.6000000238418579,""y"":5.911152362823486},{""x"":1.100000023841858,""y"":5.924920082092285},{""x"":1.600000023841858,""y"":5.8469438552856445},{""x"":2.0999999046325684,""y"":5.929472923278809},{""x"":2.5999999046325684,""y"":6.190037727355957},{""x"":3.0999999046325684,""y"":6.236179828643799},{""x"":3.5999999046325684,""y"":6.141019344329834},{""x"":4.099999904632568,""y"":5.295210838317871},{""x"":4.599999904632568,""y"":5.265801906585693},{""x"":5.099999904632568,""y"":3.3722851276397705},{""x"":5.599999904632568,""y"":1.8299226760864258},{""x"":6.099999904632568,""y"":0.32690900564193726},{""x"":6.599999904632568,""y"":0.6274543404579163},{""x"":7.099999904632568,""y"":0.8441857099533081}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nRwanda,MPNSEPASLLELFNSIATQGELVRSLKAGNASK,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO,1480021,36.33137130737305,995037247,"168-46 91ST AVE., 2ND FLR",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,9,9,2BDJ,9,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[3.8209972202654474, 1.3779216716448506, 5.299882228439686, 0.06040645519069608],""points"":[{""x"":0.10000000149011612,""y"":3.7821109294891357},{""x"":0.6000000238418579,""y"":3.542433023452759},{""x"":1.100000023841858,""y"":3.7008674144744873},{""x"":1.600000023841858,""y"":3.717301607131958},{""x"":2.0999999046325684,""y"":4.024452209472656},{""x"":2.5999999046325684,""y"":4.013899326324463},{""x"":3.0999999046325684,""y"":3.945094347000122},{""x"":3.5999999046325684,""y"":3.866621971130371},{""x"":4.099999904632568,""y"":3.7461626529693604},{""x"":4.599999904632568,""y"":3.3454740047454834},{""x"":5.099999904632568,""y"":2.61944317817688},{""x"":5.599999904632568,""y"":0.999405026435852},{""x"":6.099999904632568,""y"":0.46259793639183044},{""x"":6.599999904632568,""y"":0.054134611040353775},{""x"":7.099999904632568,""y"":0.05711187422275543}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.6318079657726035, 1.8495493770000595, 5.391793312471116, 0.17060707587348442],""points"":[{""x"":0.10000000149011612,""y"":5.458079814910889},{""x"":0.6000000238418579,""y"":5.554427146911621},{""x"":1.100000023841858,""y"":5.799983024597168},{""x"":1.600000023841858,""y"":5.364140033721924},{""x"":2.0999999046325684,""y"":5.864485740661621},{""x"":2.5999999046325684,""y"":5.4509806632995605},{""x"":3.0999999046325684,""y"":5.702574729919434},{""x"":3.5999999046325684,""y"":5.7314534187316895},{""x"":4.099999904632568,""y"":5.5123443603515625},{""x"":4.599999904632568,""y"":5.724395751953125},{""x"":5.099999904632568,""y"":4.354506969451904},{""x"":5.599999904632568,""y"":1.7307666540145874},{""x"":6.099999904632568,""y"":0.6305936574935913},{""x"":6.599999904632568,""y"":0.035183437168598175},{""x"":7.099999904632568,""y"":0.7575169205665588}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nSwitzerland,IRVVGRYLIEVWKAAGMDMDKVLFLWSSDEI,CN1CCC(CC1)Oc2ccc(cc2)C(F)(F)F,1480028,36.33137130737305,99504,92-11 179TH PLACE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,9,10,1IAN,10,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[1.1190255865097471, 2.3163895161544437, 5.4968866182279195, 0.2035204047289052],""points"":[{""x"":0.10000000149011612,""y"":1.1057683229446411},{""x"":0.6000000238418579,""y"":1.1019697189331055},{""x"":1.100000023841858,""y"":1.0818607807159424},{""x"":1.600000023841858,""y"":1.062997817993164},{""x"":2.0999999046325684,""y"":1.046447515487671},{""x"":2.5999999046325684,""y"":1.1217249631881714},{""x"":3.0999999046325684,""y"":1.2166996002197266},{""x"":3.5999999046325684,""y"":1.215477705001831},{""x"":4.099999904632568,""y"":1.0581893920898438},{""x"":4.599999904632568,""y"":1.1747995615005493},{""x"":5.099999904632568,""y"":1.0181127786636353},{""x"":5.599999904632568,""y"":0.5344523191452026},{""x"":6.099999904632568,""y"":0.2569526433944702},{""x"":6.599999904632568,""y"":0.1912207305431366},{""x"":7.099999904632568,""y"":0.15060538053512573}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[3.1038581025805785, 2.0032224204185245, 5.087602825989163, 0.13277988512492753],""points"":[{""x"":0.10000000149011612,""y"":3.0498509407043457},{""x"":0.6000000238418579,""y"":2.805217742919922},{""x"":1.100000023841858,""y"":3.3415253162384033},{""x"":1.600000023841858,""y"":3.0549843311309814},{""x"":2.0999999046325684,""y"":3.250074863433838},{""x"":2.5999999046325684,""y"":3.0432586669921875},{""x"":3.0999999046325684,""y"":3.265852451324463},{""x"":3.5999999046325684,""y"":2.9475724697113037},{""x"":4.099999904632568,""y"":3.1929898262023926},{""x"":4.599999904632568,""y"":2.7460060119628906},{""x"":5.099999904632568,""y"":1.6175861358642578},{""x"":5.599999904632568,""y"":0.3006608486175537},{""x"":6.099999904632568,""y"":0.3444803059101105},{""x"":6.599999904632568,""y"":0.015537971630692482},{""x"":7.099999904632568,""y"":0.5527358055114746}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\n,,,,,,,,,,,,,,,,,,,,,');i.columns.add(t.Column.fromList(t.TYPE.BYTE_ARRAY,"BinaryImage",Array.from(new Uint8Array(11))));var r=function(t,e,n,s){return new(n||(n=Promise))((function(i,r){function o(t){try{l(s.next(t))}catch(t){r(t)}}function a(t){try{l(s.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}l((s=s.apply(t,e||[])).next())}))};const o=3e4,a=108e5,l=console.log.bind(console),c=console.info.bind(console),h=console.warn.bind(console),u=console.error.bind(console),f={},g="Auto Tests",d="Demo",y="Detectors",p="Core",C={};let m;var x;!function(t){t.notNull=function(t,e){if(null==t)throw new Error(`${null==e?"Value":e} not defined`)}}(x||(x={}));class b{constructor(t,e){this.catchUnhandled=!0,this.report=!1,void 0!==t&&(this.catchUnhandled=t),void 0!==e&&(this.report=e)}}class A{constructor(t,e,n,s){var i;this.category=t,this.name=e,null!=s||(s={}),null!==(i=s.timeout)&&void 0!==i||(s.timeout=o),this.options=s,this.test=()=>r(this,void 0,void 0,(function*(){return new Promise(((t,e)=>r(this,void 0,void 0,(function*(){let s="";try{s=yield n()}catch(t){e(t)}t(s)}))))}))}}function E(t,e,n){null==f[m]&&(f[m]={}),null==f[m].tests&&(f[m].tests=[]),f[m].tests.push(new A(m,t,e,n))}function v(t,e=!0,n){if(n=n?`${n}, `:"",t!==e)throw new Error(`${n}Expected "${e}", got "${t}"`)}function T(t,e,n=.001,s){if(t===Number.POSITIVE_INFINITY&&e===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY&&e===Number.NEGATIVE_INFINITY||t===Number.NaN&&e===Number.NaN||isNaN(t)&&isNaN(e))return;const i=Math.abs(t-e)<n;if(v(i,!0,`${null!=s?s:""} (tolerance = ${n})`),!i)throw new Error(`Expected ${e}, got ${t} (tolerance = ${n})`)}function N(t,e){for(const[n,s]of Object.entries(e)){if(!t.hasOwnProperty(n))throw new Error(`Expected property "${n}" not found`);const e=t[n];if(e instanceof Array&&s instanceof Array)P(e,s);else if(e instanceof Object&&s instanceof Object)N(e,s);else if(Number.isFinite(e)&&Number.isFinite(s))T(e,s);else if(e!=s)throw new Error(`Expected (${s}) for key '${n}', got (${e})`)}}function P(t,e){const n=t.length,s=e.length;if(n!=s)throw new Error(`Arrays are of different length: actual array length is ${n} and expected array length is ${s}`);for(let s=0;s<n;s++)if(t[s]instanceof Array&&e[s]instanceof Array)P(t[s],e[s]);else if(t[s]instanceof Object&&e[s]instanceof Object)N(t[s],e[s]);else if(t[s]!=e[s])throw new Error(`Expected ${e[s]} at position ${s}, got ${t[s]}`)}function w(t,e,n){var s;m=t,e(),f[m]&&(f[m].clear=null===(s=null==n?void 0:n.clear)||void 0===s||s,f[m].timeout=null==n?void 0:n.timeout,f[m].benchmarks=null==n?void 0:n.benchmarks,f[m].stressTests=null==n?void 0:n.stressTests)}function $(t){null==f[m]&&(f[m]={}),f[m].before=t}function O(t){null==f[m]&&(f[m]={}),f[m].after=t}function _(t,e){return t.replace(new RegExp(e.name,"gi"),e.nqName)}function I(n){var s,a,m,x;return r(this,void 0,void 0,(function*(){const T=null===(a=null===(s=e.functions.getCurrentCall())||void 0===s?void 0:s.func)||void 0===a?void 0:a.package;yield function(n){var s,a,l,c;return r(this,void 0,void 0,(function*(){const h=n.id;if(C[h])return;const u=f;if(void 0!==u[g]||void 0!==u[d]||Object.keys(u).find((t=>t.startsWith(g)||t.startsWith(p))))return void(C[h]=!0);if("DevTools"===n.name)for(const t of window.dartTests){const e=t.name.split(/\s*\|\s*!/g);let n=null!==(s=e.pop())&&void 0!==s?s:t.name,i=e.length?p+": "+e.join(": "):p,r=n.split(" | ");n=r[r.length-1],r.unshift(i),r.pop(),i=r.join(": "),void 0===u[i]&&(u[i]={tests:[],clear:!0}),u[i].tests.push(new A(i,n,t.test,{isAggregated:!1,timeout:null!==(l=null===(a=t.options)||void 0===a?void 0:a.timeout)&&void 0!==l?l:o,skipReason:null===(c=t.options)||void 0===c?void 0:c.skipReason}))}const m=[],x=[],b=[],E=yield e.dapi.functions.filter(`package.id = "${h}"`).list(),T=new RegExp(/skip:\s*([^,\s]+)|wait:\s*(\d+)|cat:\s*([^,\s]+)|timeout:\s*(\d+)/g);for(const n of E){const s=n.options.test,o=n.options.demoPath;if(s&&Array.isArray(s)&&s.length)for(let i=0;i<s.length;i++){const o=s[i].matchAll(T),a={};Array.from(o).forEach((t=>{t[0].startsWith("skip")?a.skip=t[1]:t[0].startsWith("wait")?a.wait=parseInt(t[2]):t[0].startsWith("cat")?a.cat=t[3]:t[0].startsWith("timeout")&&(a.timeout=parseInt(t[4]))}));const l=new A(g,1===s.length?n.name:`${n.name} ${i+1}`,(()=>r(this,void 0,void 0,(function*(){const t=yield e.functions.eval(_(s[i],n));if(a.wait&&(yield S(a.wait)),"boolean"==typeof t&&!t)throw`Failed: ${s[i]}, expected true, got ${t}`}))),{skipReason:a.skip,timeout:t.Test.isInBenchmark?a.benchmarkTimeout:a.timeout});if(a.cat){const t=g+": "+a.cat;l.category=t,void 0===u[t]&&(u[t]={tests:[],clear:!0}),u[t].tests.push(l)}else m.push(l)}if(o){const s=n.options.demoWait?parseInt(n.options.demoWait):void 0,i=new A(d,n.friendlyName,(()=>r(this,void 0,void 0,(function*(){e.shell.isInDemo=!0,void 0===e.shell.view(t.View.BROWSE)&&(e.shell.v=t.View.createByType(t.View.BROWSE)),yield S(300),e.shell.clearLastError(),yield n.apply(),yield S(s||2e3);const i=yield e.shell.lastError;if(i)throw new Error(i);e.shell.isInDemo=!1}))),{skipReason:n.options.demoSkip});x.push(i)}if(n.hasTag("semTypeDetector")){const t=new A(y,n.friendlyName,(()=>r(this,void 0,void 0,(function*(){const t=[];for(const e of i.clone().columns){const s=yield n.apply([e]);t.push(s||e.semType)}v(t.filter((t=>t)).length,1)}))),{skipReason:n.options.skipTest});b.push(t)}}C[h]=!0,m.length&&(u[g]={tests:m,clear:!0}),x.length&&(u[d]={tests:x,clear:!0}),b.length&&(u[y]={tests:b,clear:!1})}))}(T);const N=[];console.log("Running tests"),null!=n||(n={}),null!==(m=(x=n).testContext)&&void 0!==m||(x.testContext=new b),e.shell.clearLastError();const P=function(){const t=[];return console.log=(...e)=>{t.push(...e),l(...e)},console.info=(...e)=>{t.push(...e),c(...e)},console.warn=(...e)=>{t.push(...e),h(...e)},console.error=(...e)=>{t.push(...e),u(...e)},t}();(null==n?void 0:n.stressTest)?yield function(e){var n,s,i,o,a,l;return r(this,void 0,void 0,(function*(){let r=[];for(const[t,e]of Object.entries(f)){let t=null===(n=e.tests)||void 0===n?void 0:n.filter((t=>{var e;return null===(e=t.options)||void 0===e?void 0:e.stressTest}));e.stressTests&&(t=null===(s=e.tests)||void 0===s?void 0:s.filter((t=>{var e,n;return void 0===(null===(e=t.options)||void 0===e?void 0:e.stressTest)||!0===(null===(n=t.options)||void 0===n?void 0:n.stressTest)})));const a=null===(i=e.tests)||void 0===i?void 0:i.every((t=>{var e;return null===(e=t.options)||void 0===e?void 0:e.skipReason}));if(!a)for(let n of null!=t?t:[])null==(null===(o=n.options)||void 0===o?void 0:o.skipReason)&&r.push({test:n,value:e})}r=function(t){const e=t.slice();return e.sort((()=>Math.random()-.5)),e}(r);const c=[];for(let n of r){yield w(n.value.before,null!==(a=e.category)&&void 0!==a?a:"");let s=yield R(n.test,null==e?void 0:e.test,P,t.Test.isInBenchmark?n.value.benchmarkTimeout:n.value.timeout,T.name,e.verbose);s&&c.push(s),console.log(`Test: ${null==E?void 0:E.name}; result: ${s}`),yield w(n.value.after,null!==(l=e.category)&&void 0!==l?l:"")}N.push(...c)}))}(n):yield function(n,s){var i,o,a,f,g,d,y;return r(this,void 0,void 0,(function*(){try{for(const[r,c]of Object.entries(n)){if((null==s?void 0:s.category)&&!r.toLowerCase().startsWith(null==s?void 0:s.category.toLowerCase())||(null===(i=s.exclude)||void 0===i?void 0:i.some((t=>r.startsWith(t)))))continue;l(`Started ${r} category`);const n=null===(o=c.tests)||void 0===o?void 0:o.every((t=>{var e;return null===(e=t.options)||void 0===e?void 0:e.skipReason}));n||(c.beforeStatus=yield w(c.before,null!==(a=s.category)&&void 0!==a?a:""));const h=null!==(f=c.tests)&&void 0!==f?f:[],u=[];if(c.clear)for(let n=0;n<h.length;n++){h[n].options&&void 0===(null===(g=h[n].options)||void 0===g?void 0:g.benchmark)&&(h[n].options||(h[n].options={}),h[n].options.benchmark=null!==(d=c.benchmarks)&&void 0!==d&&d);let i=yield R(h[n],null==s?void 0:s.test,P,t.Test.isInBenchmark?c.benchmarkTimeout:c.timeout,T.name,s.verbose);i&&u.push(i),e.shell.closeAll(),t.Balloon.closeAll()}else for(let e=0;e<h.length;e++){let n=yield R(h[e],null==s?void 0:s.test,P,t.Test.isInBenchmark?c.benchmarkTimeout:c.timeout,T.name,s.verbose);n&&u.push(n)}const p=u.filter((t=>"skipped"!=t.result));n||(c.afterStatus=yield w(c.after,null!==(y=s.category)&&void 0!==y?y:"")),c.afterStatus&&p.push({date:(new Date).toISOString(),logs:"",category:r,name:"after",result:c.afterStatus,success:!1,ms:0,skipped:!1}),c.beforeStatus&&p.push({date:(new Date).toISOString(),logs:"",category:r,name:"before",result:c.beforeStatus,success:!1,ms:0,skipped:!1}),N.push(...p)}}finally{console.log=l,console.info=c,console.warn=h,console.error=u}if(s.testContext.catchUnhandled&&!t.Test.isInBenchmark){yield S(1e3);const t=yield e.shell.lastError,n={logs:"",date:(new Date).toISOString(),category:"Unhandled exceptions",name:"Exception",result:null!=t?t:"",success:!t,ms:0,skipped:!1};N.push(n),n.package=T.name,null!=e.shell.reportTest?yield e.shell.reportTest("package",n):yield fetch(`${e.dapi.root}/log/tests/package`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(n)})}}))}(f,n);for(let t of N)t.result=t.result.toString().replace(/"/g,"'"),null!=t.logs&&(t.logs=t.logs.toString().replace(/"/g,"'"));return N;function w(t,e){return r(this,void 0,void 0,(function*(){var n=void 0;try{void 0!==t&&(yield M((()=>r(this,void 0,void 0,(function*(){yield t()}))),1e5,`before ${e}: timeout error`))}catch(t){n=yield L(t)}return n}))}}))}function L(e){return r(this,void 0,void 0,(function*(){return`${e.toString()}\n${e.stack?yield t.Logger.translateStackTrace(e.stack):""}`}))}function R(n,s,i,c,h,f){var g,d,y,p,C,m,x,b;return r(this,void 0,void 0,(function*(){let r;i.length=0;let A="package";const E=null!=s&&n.name.toLowerCase()!==s.toLowerCase();let v=(null===(g=n.options)||void 0===g?void 0:g.skipReason)||E,T=E?"skipped":null===(d=n.options)||void 0===d?void 0:d.skipReason;if(t.Test.isInBenchmark&&!(null===(y=n.options)||void 0===y?void 0:y.benchmark))return void l(`SKIPPED: ${n.category} ${n.name} doesnt available in benchmark mode`);v||l(`Started ${n.category} ${n.name}`);const N=Date.now();try{if(v)r={date:(new Date).toISOString(),success:!0,result:T,ms:0,skipped:!0};else{let e=(null===(p=n.options)||void 0===p?void 0:p.timeout)===o&&c?c:null===(C=n.options)||void 0===C?void 0:C.timeout;e=e===o&&t.Test.isInBenchmark?a:e,r={date:(new Date).toISOString(),success:!0,result:null!==(m=yield M(n.test,e))&&void 0!==m?m:"OK",ms:0,skipped:!1}}}catch(t){u(t),r={date:(new Date).toISOString(),success:!1,result:yield L(t),ms:0,skipped:!1}}if((null===(x=n.options)||void 0===x?void 0:x.isAggregated)&&r.result.constructor===t.DataFrame){const t=r.result.col("success");if(t&&(r.success=t.stats.sum===t.length),!f){const t=r.result;t.columns.remove("stack"),t.rows.removeWhere((t=>t.get("success"))),r.result=t}r.result=r.result.toCsv()}if(r.logs=i.join("\n"),r.ms=Date.now()-N,v||l(`Finished ${n.category} ${n.name} for ${r.ms} ms`),r.category=n.category,r.name=n.name,!E){let s={success:r.success,result:r.result,ms:r.ms,skipped:r.skipped,package:h,category:n.category,name:n.name,logs:r.logs};if(r.result.constructor==Object){const t=Object.keys(r.result).reduce(((t,e)=>Object.assign(Object.assign({},t),{["result."+e]:r.result[e]})),{});s=Object.assign(Object.assign({},s),t)}s.result instanceof t.DataFrame&&(s.result=JSON.stringify(null===(b=s.result)||void 0===b?void 0:b.toJson())||""),null!=e.shell.reportTest?yield e.shell.reportTest(A,s):yield fetch(`${e.dapi.root}/log/tests/${A}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(s)})}return r}))}function S(t){return r(this,void 0,void 0,(function*(){yield new Promise((e=>setTimeout(e,t)))}))}function M(t,e,n="EXECUTION TIMEOUT"){return r(this,void 0,void 0,(function*(){let s=null;const i=new Promise(((t,i)=>{s=setTimeout((()=>{i(n)}),e)}));try{return yield Promise.race([t(),i])}finally{s&&clearTimeout(s)}}))}t.DataFrame.fromColumns([t.Column.fromStrings("col",["val1","val2","val3"])]);const D=["A","G","C","U"];var H,F;(F=H||(H={})).HELM="HELM",F.AXOLABS="Axolabs";class k extends t.Package{async getTranslationHelper(){return await e.functions.call(`${this.name}:getTranslationHelper`)}}function G(t,e,n){return n.createFormatConverter(t,e).convertTo(H.HELM)}function V(t,e,n){return n.createFormatConverter(t,H.HELM).convertTo(e)}const B={Axolabs:{UfAfsCfsGfuacg:"RNA1{[fR](U)p.[fR](A)[sp].[fR](C)[sp].[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)}$$$$"},BioSpring:{"A*GC*123456789":"RNA1{r(A)[sp].r(G)p.r(C)[sp].[fR](U)p.[fR](A)p.[fR](C)p.[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)p.d([m5C])}$$$$"},Mermade12:{hefglijkLIJKHEFG:"RNA1{[25r](U)[sp].[25r](A)[sp].[25r](C)[sp].[25r](G)[sp].[fR](U)[sp].[fR](A)[sp].[fR](C)[sp].[fR](G)[sp].[fR](U)p.[fR](A)p.[fR](C)p.[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)}$$$$"}},U={"RNA1{[fR](U)p.[fR](A)[sp].[fR](C)[sp].[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)}$$$$":"UACGUACG","RNA1{r(A)[sp].r(G)p.r(C)[sp].[fR](U)p.[fR](A)p.[fR](C)p.[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)p}$$$$":"AGCUACGUACG","RNA1{[25r](U)[sp].[25r](A)[sp].[25r](C)[sp].[25r](G)[sp].[fR](U)[sp].[fR](A)[sp].[fR](C)[sp].[fR](G)[sp].[fR](U)p.[fR](A)p.[fR](C)p.[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)}$$$$":"UACGUACGUACGUACG"};w("Formats to HELM",(()=>{let t;$((async()=>{t=await Ht.getTranslationHelper()}));for(const e of Object.keys(B))for(const[n,s]of Object.entries(B[e]))E(`${e} to HELM`,(async()=>{const i=s;v(G(n,e,t),i)}))})),w("HELM to Formats",(()=>{let t;$((async()=>{t=await Ht.getTranslationHelper()}));for(const e of Object.keys(B))for(const[n,s]of Object.entries(B[e]))E(`${e} to HELM`,(async()=>{const i=n;v(V(s,e,t),i)}))}));const W="<?>";function Y(t,e){const n=new RegExp("\\([^()]*\\)","g"),s=t.match(n);return s?s.map((t=>{const n=t.replace(/[\[\]()]/g,"");return D.includes(n)?n:e.getNaturalAnalogBySymbol(n)})).map((t=>t||W)).join(""):null}w("HELM to Nucleotides",(()=>{let t;$((async()=>{t=await Ht.getTranslationHelper()})),Object.entries(U).forEach((([e,n],s)=>{E(`Sequence ${s+1} to nucleotides`,(async()=>{const s=n;v(Y(e,t.monomerLibWrapper),s)}))}))}));const K={[H.AXOLABS]:"Afcgacsu",[H.HELM]:"RNA1{[fR](A)p.[25r](C)p.[25r](G)p.[25r](A)p.[25r](C)[sp].[25r](U)}$$$$"};function j(t){return"string"==typeof t||t instanceof String?t:"StateError"===t.constructor.name?t.message:"StateError"===t.constructor.name&&"$thrownJsError"in t?j(t.$thrownJsError):t instanceof Error?t.message:t.toString()}function Q(t){return t instanceof Error?t.stack:"StateError"===t.constructor.name&&"$thrownJsError"in t?Q(t.$thrownJsError):void 0}function q(t){return[j(t),Q(t)]}w("Formats support",(()=>{let t;$((async()=>{t=await Ht.getTranslationHelper()})),Object.entries(K).forEach((([e,n])=>{E(`All formats for ${e}`,(async()=>{const s=function(t,e,n){return function(t,e,n,s){const i=Object.keys(s.jsonData.codesToHelmDict).concat([H.HELM]);if(!t||-1!==e&&n!==H.HELM)return{};if(!i.includes(n))throw new Error(`${n} format is not supported by SequenceTranslator`);const r=i.filter((t=>t!=n)).sort(((t,e)=>t.localeCompare(e))),o=s.createFormatConverter(t,n),a=Object.fromEntries(r.map((t=>{let e;try{e=o.convertTo(t)}catch{e=null}return[t,e]})).filter((([t,e])=>e))),l=Y(n===H.HELM?t:a[H.HELM],s.monomerLibWrapper);return l&&(a.Nucleotides=l),a}(t,n.createSequenceValidator(t).getInvalidCodeIndex(e),e,n)}(n,e,t),i=Object.keys(s).length;v(!0,Object.keys(B).length+1<=i)}))}))})),w("files",(()=>{let e;$((async()=>{e=await Ht.getTranslationHelper()})),E("list",(async()=>{let n;const s=t.DataFrame.fromColumns([t.Column.string("subTest"),n=t.Column.bool("success"),t.Column.string("format"),t.Column.string("src"),t.Column.string("res"),t.Column.string("tgt"),t.Column.string("error"),t.Column.string("stack")]),i=await Ht.files.list("tests",!0,".csv");for(const n of i){const i=t.DataFrame.fromCsv(await n.readAsString()),r=i.columns.byIndex(0),o=r.name,a=i.columns.byIndex(1),l=i.rowCount;for(let t=0;t<l;++t){const i=s.rows.addNew();i.subTest=`${n.name}, row: ${t}`;try{const n=r.get(t),s=a.get(t);i.format=o,i.src=n,i.tgt=s,v(i.res=G(n,o,e),s),i.success=!0}catch(t){const[e,n]=q(t);i.error=e,i.stack=n,i.success=!1}}}0==s.rowCount&&s.rows.addNew(["empty",!0,"",""]);const r=n.toList().findIndex((t=>1!=t));if(-1!=r){const t=s.rows.get(r);throw new Error(`Subtest '${t.subTest}' failed: ${t.error}`)}return s}),{skipReason:"Can not create test in async manner based on files in Shares."})}));class J{constructor(t,e=!1){if(this._length=0,this._version=0,this._updateLevel=0,this._selectedCount=0,this._selectedCountVersion=-1,this._selectedIndexesVersion=-1,this._versionedName="",this._versionedNameVersion=-1,this.SHRINK_THRESHOLD=256,"number"==typeof t){const n=t,s=J._createBuffer(n);if(e)for(let t=0;t<s.length;t++)s[t]=-1;this._data=s,this._length=n}else{if(!(t instanceof Uint32Array))throw new Error("Invalid constructor");this._data=t,this._length=e}}getRawData(){return this._data}assureGoez(t,e){if(t<0)throw new Error(`${e} should be greater than zero`)}assureInRange(t,e,n,s){if(t<e||t>n)throw new Error(`Argument ${s} (${t}) out of range (${e}, ${n})`)}copy(t,e,n){for(let s=0;s<n;s++)e[s]=t[s]}copyFrom(t){if(this._length!=t._length)throw new Error(`Lengths differ (${this._length} != ${t._length})`);this.copy(t._data,this._data,this.lengthInInts),this._version++}get length(){return this._length}get buffer(){return this._data}set buffer(t){this._data=t,this._version++}get version(){return this._version}set version(t){this._version=t}incrementVersion(t=!0){this._version++}get lengthInInts(){return Math.floor((this._length+31)/32)}get versionedName(){return this._version==this._versionedNameVersion?this._versionedName:""}set versionedName(t){this._versionedName=t,this._versionedNameVersion=this._version}get self(){return this}setLength(t){if(t<0)throw new Error("should be >= 0");if(t==this._length)return;const e=Math.floor((t+31)/32);if(e>this._data.length||e+this.SHRINK_THRESHOLD<this._data.length){const t=new Uint32Array(e);this.copy(this._data,t,e>this._data.length?this._data.length:e),this._data=t}t>this._length&&(this._length%32>0&&(this._data[this.lengthInInts-1]&=(1<<(this._length%32&31))-1),this._data.fill(0,this.lengthInInts,e)),this._length=t,this._version++}static fromAnd(t,e){if(t._length!=e._length)throw new Error(`Lengths differ (${t._length} != ${e._length})`);const n=new J(t._length);n._length=t._length,n._data=J._createBuffer(n._length),n._version=0;const s=t.lengthInInts;for(let i=0;i<s;i++)n._data[i]=t._data[i]&e._data[i];return n}static _createBuffer(t){return new Uint32Array(Math.floor((t+31)/32))}static fromValues(t){const e=new J(t.length);e._version=0;for(let n=0;n<e._length;n++)t[n]&&(e._data[Math.floor(n/32)]|=1<<(n%32&31));return e}static fromSeq(t,e){const n=new J(t);for(let s=0;s<t;++s)n.setBit(s,e(s));return n._version=0,n}static fromString(t){return J.fromSeq(t.length,(e=>"1"==t.charAt(e)))}static fromUint32Array(t,e){const n=new J(t);return n._data=e,n}static fromBytes(t){const e=t.length,n=new J(8*e);n._data=new Uint32Array(Math.floor((e+3)/4)),n._length=8*e;let s=0,i=0;for(;e-i>=4;)n._data[s++]=255&t[i]|(255&t[i+1])<<8|(255&t[i+2])<<16|(255&t[i+3])<<24,i+=4;return e-i==3&&(n._data[s]=(255&t[i+2])<<16),e-i==2&&(n._data[s]|=(255&t[i+1])<<8),e-i==1&&(n._data[s]|=255&t[i]),n._version=0,n}toString(){return`${this._length} bits, ${this.countBits(!0)} set`}equals(t){if(this==t)return!0;if(null==t)return!1;if(this._length!=t._length)return!1;if(0==this._length)return!0;for(let e=0;e<this._data.length-1;e++)if(this._data[e]!=t._data[e])return!1;for(let e=8*(this._data.length-1);e<this._length;e++)if(this.getBit(e)!=t.getBit(e))return!1;return!0}clone(){const t=new J(0,!1);return t._data=Uint32Array.from(this._data),t._length=this._length,t._version=this._version,t}init(t,e){this.setAll(!1,!1);for(let e=0;e<this._length;e++)t(e)&&(this._data[Math.floor(e/32)]|=1<<(e%32&31));return this.incrementVersion(e),this}invert(t=!0){for(let t=0;t<this._data.length;t++)this._data[t]^=-1;this.incrementVersion(t)}setAll(t,e=!1){const n=t?-1:0,s=this.lengthInInts;for(let t=0;t<s;t++)this._data[t]=n;this.incrementVersion(e)}setIndexes(t,e=!0,n=!0,s=!0){n&&this.setAll(!e,!1);for(const n of t)this.setFast(n,e);this.incrementVersion(s)}everyIndex(t,e=!0){for(const n of t)if(this.getBit(n)!=e)return!1;return!0}anyIndex(t,e=!0){for(const n of t)if(this.getBit(n)==e)return!0;return!1}setWhere(t,e=!0,n=!0,s=!0,i=!0){if(n&&i&&this.setAll(!e,!1),i)for(let n=0;n<this._length;n++)t(n)&&this.setFast(n,e);else for(let n=0;n<this._length;n++)this.setFast(n,t(n)?e:!e);this.incrementVersion(s)}getRange(t,e){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length,"to");const n=[];for(let s=t;s<e;++s)n.push(this.getBit(s));return J.fromValues(n)}getRangeAsList(t,e){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length,"to");const n=[];for(let s=t;s<e;++s)n.push(this.getBit(s));return n}setRange(t,e,n,s=!0){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length-1,"to");const i=Math.min(t,e),r=Math.max(t,e);if(n)for(let t=i;t<=r;t++)this.setTrue(t);else for(let t=i;t<=r;t++)this.setFalse(t);return this.incrementVersion(s),this}setRandom(t,e,n=!0){if(t<0||t>this._length)throw new Error("n must be >= 0 && <= Count");t>this._length/2&&this.setRandom(this._length-t,!e),this.setAll(!e);for(let n=0;n<t;){const t=Math.floor(Math.random()*this._length);this.getBit(t)!=e&&(this.setFast(t,e),n++)}this.incrementVersion(n)}and(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]&=t._data[e];return this.incrementVersion(e),this}andNot(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");const n=this.lengthInInts;for(let e=0;e<n;e++)this._data[e]&=~t._data[e];return this.incrementVersion(e),this}notAnd(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]=~this._data[e]&t._data[e];return this.incrementVersion(e),this}not(t=!0){for(let t=0,e=this.lengthInInts;t<e;t++)this._data[t]=~this._data[t];return this.incrementVersion(t),this}or(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]|=t._data[e];return this.incrementVersion(e),this}xor(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]^=t._data[e];return this.incrementVersion(e),this}insertAt(t,e,n=!1){if(this.assureInRange(t,0,this._length,"pos"),0==e)return;const s=this._length;this.setLength(this._length+e);for(let n=s-1;n>=t;n--)this.setBit(n+e,this.getBit(n));for(let s=t;s<t+e;s++)this.setBit(s,n)}removeAt(t,e=1){if(e<0)throw new Error("n cannot be negative");if(this.assureInRange(t,0,this._length-e,"pos"),this.contains(!0))for(let n=t;n<this._length-e;n++)this.setBit(n,this.getBit(n+e));this.setLength(this._length-e)}removeByMask(t,e=!0){if(this._length!=t.length)throw new Error("length != mask.length");if(t==this)this.setLength(t.countBits(!e)),this.setAll(!e);else{let n=0;for(let s=-1;-1!=(s=t.findNext(s,!e));)this.setFast(n++,this.getBit(s));this._length=n,this._version++}return this}getBit(t){return!!(this._data[Math.floor(t/32)]&1<<(31&t))}setBit(t,e,n=!0){this.setFast(t,e),this._version++}setFast(t,e){e?this._data[Math.floor(t/32)]|=1<<(31&t):this._data[Math.floor(t/32)]&=~(1<<(31&t))}setTrue(t){this._data[Math.floor(t/32)]|=1<<(31&t)}setFalse(t){this._data[Math.floor(t/32)]&=~(1<<(31&t))}trueCount(){return this.countBits(!0)}falseCount(){return this.countBits(!1)}countBits(t){if(0==this._length)return 0;if(this._selectedCountVersion!=this._version){this._selectedCount=0;const t=this.lengthInInts;let e=0;for(;e<t-1;e++)for(let t=this._data[e];0!=t;t>>>=8)this._selectedCount+=J._onBitCount[255&t];let n=this._data[e];const s=31&this._length;for(0!=s&&(n&=~(4294967295<<s));0!=n;n>>>=8)this._selectedCount+=J._onBitCount[255&n];this._selectedCountVersion=this._version}return t?this._selectedCount:this._length-this._selectedCount}countWhere(t){let e=0;if(this.trueCount()==this._length)for(let n=0;n<this._length;n++)e+=t(n)?1:0;else for(let n=-1;-1!=(n=this.findNext(n,!0));)e+=t(n)?1:0;return e}andWithCountBits(t,e){if(0==this._length)return 0;let n=0;const s=this.lengthInInts;let i=0;for(;i<s-1;i++)for(let e=this._data[i]&t._data[i];0!=e;e>>>=8)n+=J._onBitCount[255&e];let r=this._data[i]&t._data[i];const o=31&this._length;for(0!=o&&(r&=~(4294967295<<o));0!=r;r>>>=8)n+=J._onBitCount[255&r];return e?n:this._length-n}clear(){this.setLength(0)}contains(t){return this.findNext(-1,t)>=0}get allTrue(){return this.countBits(!0)==this._length}get allFalse(){return this.countBits(!1)==this._length}get anyTrue(){return this.countBits(!0)>0}get anyFalse(){return this.countBits(!1)>0}findNext(t,e=!0){if(this.assureInRange(t,-1,this._length,"index"),t>=this._length-1)return-1;let n=31&(t=t<0?0:t+1);const s=this.lengthInInts;for(let i=Math.floor(t/32);i<s;i++){let s=e?this._data[i]:~this._data[i];if(0!=n)s&=4294967295<<n&4294967295,n=0;else if(!e&&-4294967296==s)continue;for(let e=0;0!=s;e+=8,s>>>=8){const n=J._firstOnBit[255&s];if(n>=0)return(t=n+32*i+e)>=this._length?-1:t}}return-1}findPrev(t,e=!0){if(0==t)return-1;this.assureInRange(t,-1,this._length,"index");let n=1+(t=t<0?this._length-1:t-1)&31;for(let s=Math.floor(t/32);s>=0;s--){let t=e?this._data[s]:~this._data[s];0!=n&&(t&=~(4294967295<<n),n=0);for(let e=24;0!=t;e-=8,t<<=8){const n=J._lastOnBit[t>>>24];if(n>=0)return n+32*s+e}}return-1}}var z,X,Z,tt,et,nt,st;J._onBitCount=Int8Array.from([0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8]),J._firstOnBit=Int8Array.from([-1,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0]),J._lastOnBit=Int8Array.from([-1,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7]),function(t){t.Levenshtein="Levenshtein",t.JaroWinkler="Jaro-Winkler",t.Manhattan="Manhattan",t.Onehot="One-Hot"}(z||(z={})),function(t){t.Euclidean="Euclidean"}(X||(X={})),function(t){t.Tanimoto="Tanimoto",t.Dice="Dice",t.Asymmetric="Asymmetric",t.BraunBlanquet="Braun-Blanquet",t.Cosine="Cosine",t.Kulczynski="Kulczynski",t.McConnaughey="Mc-Connaughey",t.RogotGoldberg="Rogot-Goldberg",t.Russel="Russel",t.Sokal="Sokal",t.Hamming="Hamming",t.Euclidean="Euclidean"}(Z||(Z={})),function(t){t.TanimotoIntArray="TanimotoIntArray"}(tt||(tt={})),function(t){t.Vector="Vector",t.String="String",t.BitArray="BitArray",t.MacroMolecule="MacroMolecule",t.Number="Number",t.IntArray="IntArray",t.NumberArray="NumberArray"}(et||(et={})),function(t){t.Difference="Difference"}(nt||(nt={})),function(t){t.CommonItems="Common Items"}(st||(st={}));new Uint32Array(65536);var it,rt,ot,at,lt,ct,ht,ut;(rt=it||(it={})).HAMMING="Hamming",rt.LEVENSHTEIN="Levenshtein",rt.NEEDLEMANN_WUNSCH="Needlemann-Wunsch",rt.MONOMER_CHEMICAL_DISTANCE="Monomer chemical distance",it.HAMMING,it.LEVENSHTEIN,it.NEEDLEMANN_WUNSCH,it.MONOMER_CHEMICAL_DISTANCE,Z.Tanimoto,Z.Dice,Z.Asymmetric,Z.BraunBlanquet,Z.Cosine,Z.Kulczynski,Z.McConnaughey,Z.RogotGoldberg,Z.Russel,Z.Sokal,Z.Hamming,Z.Euclidean,Z.Tanimoto,Z.Dice,Z.Asymmetric,Z.BraunBlanquet,Z.Cosine,Z.Kulczynski,Z.McConnaughey,Z.RogotGoldberg,Z.Russel,Z.Sokal,Z.Hamming,Z.Euclidean,Z.Tanimoto,Z.Dice,Z.Cosine,Z.Tanimoto,Z.Asymmetric,Z.Cosine,Z.Sokal,it.HAMMING,it.LEVENSHTEIN,it.MONOMER_CHEMICAL_DISTANCE,it.NEEDLEMANN_WUNSCH,new RegExp("[rd]\\((\\w)\\)p?","g");class ft{constructor(t,e,n){this.name=t,this.alphabet=e,this.cutoff=n}}wu,(ut=ot||(ot={})).FASTA="fasta",ut.SEPARATOR="separator",ut.HELM="helm",(ht=at||(at={})).DNA="DNA",ht.RNA="RNA",ht.PT="PT",ht.UN="UN",(ct=lt||(lt={})).aligned="aligned",ct.alphabet="alphabet",ct.alphabetSize=".alphabetSize",ct.alphabetIsMultichar=".alphabetIsMultichar",ct.separator="separator",ct.isHelmCompatible=".isHelmCompatible",ct.positionNames=".positionNames",ct.positionLabels=".positionLabels",ct.regions=".regions";const gt=new class{constructor(){this.fasta={peptide:new Set(["G","L","Y","S","E","Q","D","N","F","A","K","R","H","C","V","P","W","I","M","T"]),dna:new Set(["A","C","G","T"]),rna:new Set(["A","C","G","U"])}}};new ft(at.PT,gt.fasta.peptide,.5),new ft(at.DNA,gt.fasta.dna,.55),new ft(at.RNA,gt.fasta.rna,.55);class dt{static makePalette(t,e=!1,n=dt){const s={};return t.forEach((t=>{const n=t[0],i=t[1];n.forEach(((t,n)=>{s[t]=this.colourPalette[i][e?0:n]}))})),new n(s)}constructor(t){this._palette=t}get(t){return this._palette[t]}}dt.undefinedColor="rgb(100,100,100)",dt.colourPalette={orange:["rgb(255,187,120)","rgb(245,167,100)","rgb(235,137,70)","rgb(205, 111, 71)"],all_green:["rgb(44,160,44)","rgb(74,160,74)","rgb(23,103,57)","rgb(30,110,96)","rgb(60,131,95)","rgb(24,110,79)","rgb(152,223,138)","rgb(182, 223, 138)","rgb(152, 193, 138)"],all_blue:["rgb(31,119,180)","rgb(23,190,207)","rgb(122, 102, 189)","rgb(158,218,229)","rgb(141, 124, 217)","rgb(31, 120, 150)"],magenta:["rgb(162,106,192)","rgb(197,165,224)","rgb(208,113,218)"],red:["rgb(214,39,40)","rgb(255,152,150)"],st_blue:["rgb(23,190,207)","rgb(158,218,229)","rgb(31,119,180)"],dark_blue:["rgb(31,119,180)","rgb(31, 120, 150)"],light_blue:["rgb(23,190,207)","rgb(158,218,229)","rgb(108, 218, 229)","rgb(23,190,227)"],lilac_blue:["rgb(124,102,211)","rgb(149,134,217)","rgb(97, 81, 150)"],dark_green:["rgb(23,103,57)","rgb(30,110,96)","rgb(60,131,95)","rgb(24,110,79)"],green:["rgb(44,160,44)","rgb(74,160,74)"],light_green:["rgb(152,223,138)","rgb(182, 223, 138)","rgb(152, 193, 138)"],st_green:["rgb(44,160,44)","rgb(152,223,138)","rgb(39, 174, 96)","rgb(74,160,74)"],pink:["rgb(247,182,210)"],brown:["rgb(140,86,75)","rgb(102, 62, 54)"],gray:["rgb(127,127,127)","rgb(199,199,199)","rgb(196,156,148)","rgb(222, 222, 180)"],yellow:["rgb(188,189,34)"],white:["rgb(230,230,230)"]};class yt extends dt{static get Lesk(){return void 0===this.lesk&&(this.lesk=this.makePalette([[["G","A","S","T"],"orange"],[["C","V","I","L","P","F","Y","M","W"],"all_green"],[["N","Q","H"],"magenta"],[["D","E"],"red"],[["K","R"],"all_blue"]],!1,yt)),this.lesk}static get GrokGroups(){return void 0===this.grokGroups&&(this.grokGroups=this.makePalette([[["C","U"],"yellow"],[["G","P"],"red"],[["A","V","I","L","M","F","Y","W"],"all_green"],[["R","H","K"],"light_blue"],[["D","E"],"dark_blue"],[["S","T","N","Q"],"orange"]],!1,yt)),this.grokGroups}static get RasMol(){return void 0===this.rasMol&&(this.rasMol=new yt({D:"#E60A0A",E:"#E60A0A",C:"#E6E600",M:"#E6E600",K:"#145AFF",R:"#145AFF",S:"#FA9600",T:"#FA9600",F:"#3232AA",Y:"#3232AA",N:"#00DCDC",Q:"#00DCDC",G:"#EBEBEB",L:"#0F820F",V:"#0F820F",I:"#0F820F",A:"#C8C8C8",W:"#B45AB4",H:"#8282D2",P:"#DC9682",others:"#BEA06E"})),this.rasMol}get(t){const e=t in yt.aaSynonyms?yt.aaSynonyms[t]:t;return super.get(e)}}yt.aaSynonyms={MeNle:"L",MeA:"A",MeG:"G",MeF:"F"};class pt{static getPalette(t="grok"){switch(t){case"grok":return yt.GrokGroups;case"lesk":return yt.Lesk;default:throw new Error(`ChemPalette: scheme \`${t}\` does not exist`)}}static getInnerOuter(t){let e=0,n="",s="";for(const i of t)"("==i?e++:")"==i?e--:e?n+=i:s+=i;return isNaN(parseInt(n))?[s,n]:[s,""]}static getColorAAPivot(t="",e="grok"){const n=this.getPalette(e);let[s,i]=this.getInnerOuter(t);if(s=s.length>6?`${s.slice(0,3)}...`:s,i=i.length>6?`${i.slice(0,3)}...`:i,1==t.length||"("==t[1]){const e=t[0]?.toUpperCase();return e in n?[n.get(e),e,i,1]:[this.undefinedColor,s,i,1]}if("d"==t[0]&&t[1]in n&&(2==t.length||"("==t[2])){const e=t[1]?.toUpperCase();return e in n?[n.get(e),e,i,2]:[this.undefinedColor,s,i,2]}if(t.substring(0,3)in this.AAFullNames&&(3==t.length||"("==t[3])){const e=this.AAFullNames[t.substring(0,3)];return e in n?[n.get(e),e,i,3]:[this.undefinedColor,s,i,3]}if(t[0]?.toLowerCase()==t[0]&&t.substring(1,3)in this.AAFullNames&&(4==t.length||"("==t[4])){const e=this.AAFullNames[t.substring(1,3)];return e in n?[n.get(e),e,i,4]:[this.undefinedColor,s,i,4]}return[this.undefinedColor,s,i,0]}}pt.SemType="Aminoacids",pt.SemTypeMultipleAlignment="AminoacidsMultipleAlignment",pt.undefinedColor="rgb(100,100,100)",pt.Names={G:"Glycine",L:"Leucine",Y:"Tyrosine",S:"Serine",E:"Glutamic acid",Q:"Glutamine",D:"Aspartic acid",N:"Asparagine",F:"Phenylalanine",A:"Alanine",K:"Lysine",R:"Arginine",H:"Histidine",C:"Cysteine",V:"Valine",P:"Proline",W:"Tryptophan",I:"Isoleucine",M:"Methionine",T:"Threonine"},pt.AASmiles={G:"NCC(=O)O",L:"N[C@H](CC(C)C)C(=O)O",Y:"NC(CC1=CC=C(O)C=C1)C(=O)O",S:"NC(CO)C(=O)O",E:"N[C@@H](CCC(O)=O)C(=O)O",Q:"N[C@@H](CCC(N)=O)C(=O)O",D:"N[C@@H](CC(O)=O)C(=O)O",N:"N[C@@H](CC(N)=O)C(=O)O",F:"NC(CC1=CC=CC=C1)C(=O)O",A:"N[C@H](C)C(=O)O",K:"NC(CCCCN)C(=O)O",R:"N[C@H](CCCNC(=N)C)C(=O)O",H:"NC(CC1=CN=C[N]1)C(=O)O",C:"N[C@@H](CS)C(=O)O",V:"NC(C(C)C)C(=O)O",P:"N(CCC1)C1C(=O)O",W:"N[C@@H](Cc1c2ccccc2n([H])c1)C(=O)O",I:"N[C@H]([C@H](C)CC)C(=O)O",M:"NC(CCSC)C(=O)O",T:"NC(C(O)C)C(=O)O"},pt.AASmilesTruncated={G:"*C*",L:"CC(C)C[C@H](*)*",Y:"C1=CC(=CC=C1CC(*)*)O",S:"OCC(*)C*",E:"*[C@@H](CCC(O)=O)*",Q:"*N[C@@H](CCC(N)=O)*",D:"*[C@@H](CC(O)=O)*",N:"*[C@@H](CC(N)=O)*",F:"C1=CC=C(C=C1)CC(*)*",A:"C[C@H](*)*",K:"C(CCN)CC(*)*",R:"*[C@H](CCCNC(=N)C)*",H:"C1=C(NC=N1)CC(*)*",C:"C([C@@H](*)*)S",V:"CC(C)C(*)*",P:"C1CCN(*)C1*",W:"*[C@@H](Cc1c2ccccc2n([H])c1)*",I:"CC[C@H](C)[C@H](*)*",M:"CSCCC(*)*",T:"CC(O)C(*)*"},pt.AAFullNames={Ala:"A",Arg:"R",Asn:"N",Asp:"D",Cys:"C",Gln:"Q",Glu:"E",Gly:"G",His:"H",Ile:"I",Leu:"L",Lys:"K",Met:"M",Phe:"F",Pro:"P",Ser:"S",Thr:"T",Trp:"W",Tyr:"Y",Val:"V"};class Ct{}Ct.SemType="Nucleotides",Ct.SemTypeMultipleAlignment="NucleotidesMultipleAlignment",Ct.Names={A:"Adenine",C:"Cytosine",G:"Guanine",T:"Thymine",U:"Uracil"};class mt{static hashCode(t){let e=0;if(0===t.length)return e;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return e}}class xt{}class bt extends xt{static buildPalette(){return[].concat(...Object.values(dt.colourPalette))}get(e){const n=mt.hashCode(e)%bt.palette.length;return function(e){if(null==e)return"rgb(100,100,100)";const n=t.Color.fromHtml(e),s=t.Color.g(n),i=t.Color.r(n),r=t.Color.b(n),o=Math.sqrt(Math.pow(0-i,2)+Math.pow(0-s,2)+Math.pow(0-r,2));return o>210?`rgb(${i/o*210},${s/o*210},${r/o*210})`:t.Color.toRgb(n)}(bt.palette[n])}}async function At(){const e=t.Func.find({package:"Bio",name:"getMonomerLibHelper"});if(0===e.length)throw new Error('Package "Bio" must be installed for MonomerLibHelper.');return(await e[0].prepare().call()).getOutputParamValue()}bt.palette=bt.buildPalette(),new class{constructor(){this.seqHandler="seq-handler",this.notationProvider="seq-handler.notation-provider"}},ot.FASTA,ot.SEPARATOR,ot.HELM;const Et="Libraries",vt={explicit:["HELMCoreLibrary.json","polytool-lib.json"],exclude:[],duplicateMonomerPreferences:{}};let Tt=Promise.resolve();async function Nt(){let t;return Tt=Tt.then((async()=>{const n=await e.dapi.userDataStorage.getValue(Et,"Settings",!0);t=n?JSON.parse(n):{exclude:[],explicit:[],duplicateMonomerPreferences:{}},t.exclude=t.exclude instanceof Array?t.exclude:[],t.explicit=t.explicit instanceof Array?t.explicit:[],t.duplicateMonomerPreferences=t.duplicateMonomerPreferences instanceof Object?t.duplicateMonomerPreferences:{},console.debug(`Bio: getUserLibSettings()\n${JSON.stringify(t,void 0,2)}`)})),await Tt,t}async function Pt(t){Tt=Tt.then((async()=>{console.debug(`Bio: setUserLibSettings()\n${JSON.stringify(t,void 0,2)}`),await e.dapi.userDataStorage.postValue(Et,"Settings",JSON.stringify(t),!0)})),await Tt}async function wt(){await Pt(vt)}class $t{constructor(t,e){this.linkages=e,this.monomers=t}static fromHelm(t){const e=t.split("$"),n=e[0].split("|"),s=e[1].split("|"),i=new Array(n.length),r=[];for(let t=0;t<n.length;t++){const e=n[t].indexOf("{"),s=n[t].indexOf("}");i[t]=n[t].slice(e+1,s).split(".")}for(let t=0;t<s.length;t++)if(""!==s[t]&&"V2.0"!==s[t]){const e=s[t].split(","),n=e[0].replace("PEPTIDE","")-1,i=e[1].replace("PEPTIDE","")-1,o=e[2].split("-"),a=o[0].split(":"),l=o[1].split(":");r.push({fChain:n,sChain:i,fMonomer:a[0],sMonomer:l[0],fR:a[1].replace("R",""),sR:l[1].replace("R","")})}return new $t(i,r)}static fromNotation(t,e){const n=e.heterodimerCode,s=e.homodimerCode,i=[],r=[],o=null!==n?t.split(`(${e.heterodimerCode})`):"";null!==n&&o.length>1?(r.push({fChain:0,sChain:1,fMonomer:1,sMonomer:1,fR:1,sR:1}),i.push(o[1].replaceAll("{","").replaceAll("}","")),i.push(o[2].replaceAll("{","").replaceAll("}",""))):i.push(t);for(let t=0;t<i.length;t++)if(null!==s&&i[t].includes(`(${s})`)){const e=i.length;r.push({fChain:t,sChain:e,fMonomer:1,sMonomer:1,fR:1,sR:1});const n=i[t].replace(`(${s})`,""),o=n.indexOf("{"),a=n.slice(0,o),l=n.replace(a,"").replaceAll("{","").replaceAll("}","");i[t]=a+l,i.push(l)}const a=new Array(i.length);for(let t=0;t<i.length;t++){const n=i[t].split("-"),s=this.getLinkedPositions(n,e.linkRules),[o,l,c,h,u]=this.getAllCycles(e.linkRules,n,s),f=new Array(o.length);for(let t=0;t<o.length;t++)f[t]=`[${o[t]}]`;for(let e=0;e<l.length;e++)r.push({fChain:t,sChain:t,fMonomer:l[e],sMonomer:c[e],fR:h[e],sR:u[e]});a[t]=f}return new $t(a,r)}getHelmChanged(t,e){let n=0,s=0,i=0;t:for(let e=0;e<this.monomers.length;e++)for(let r=0;r<this.monomers[e].length;r++){if(n==t){s=e,i=r;break t}n++}const r=this.monomers[s][i];this.monomers[s][i]=`[${e}]`;const o=this.getHelm();return this.monomers[s][i]=r,o}getHelm(){let t="";for(let e=0;e<this.monomers.length;e++){e>0&&(t+="|"),t+=`PEPTIDE${e+1}{`;for(let n=0;n<this.monomers[e].length;n++)n>0&&(t+="."),t+=this.monomers[e][n];t+="}"}t+="$";for(let e=0;e<this.linkages.length;e++)e>0&&(t+="|"),t+=`PEPTIDE${this.linkages[e].fChain+1},PEPTIDE${this.linkages[e].sChain+1},`,t+=`${this.linkages[e].fMonomer}:R${this.linkages[e].fR}-`,t+=`${this.linkages[e].sMonomer}:R${this.linkages[e].sR}`;return t+="$$$",t}static getLinkedPositions(t,e){const n=new Array(e.length);for(let s=0;s<e.length;s++){let i=!1,r=!1,o=!1,a=-1,l=-1;const c=`(${e[s].code})`;for(let n=0;n<t.length;n++)if(t[n].includes(c)){if(i){if(o&&t[n]==e[s].secondMonomer+c){r=!0,l=n;break}if(o||t[n]!=e[s].firstMonomer+c)continue;r=!0,l=n;break}if(t[n]==e[s].firstMonomer+c)i=!0,o=!0,a=n;else{if(t[n]!=e[s].secondMonomer+c)continue;i=!0,o=!1,a=n}}n[s]=i&&r?o?[a,l]:[l,a]:[-1,-1]}return n}static getAllCycles(t,e,n){const s=[],i=[],r=[],o=[],a=t.length;for(let l=0;l<a;l++){if(-1==n[l][0])continue;const a=e[n[l][0]],c=e[n[l][1]];e[n[l][0]]=e[n[l][0]].replace(a,t[l].firstSubstitution),e[n[l][1]]=e[n[l][1]].replace(c,t[l].secondSubstitution),s.push(n[l][0]+1),i.push(n[l][1]+1),r.push(t[l].firstLinkingGroup),o.push(t[l].secondLinkingGroup)}return[e,s,i,r,o]}}function Ot(t,e){const n=new Array(t.length);for(let s=0;s<t.length;s++)if(void 0===t[s])n[s]="";else{const i=$t.fromNotation(t[s],e);n[s]=i.getHelm()}return n}const _t=ui,It="System:AppData/SequenceTranslator/polytool-rules/";async function Lt(n){const s=new t.FileSource(It),i=[],r={homodimerCode:null,heterodimerCode:null,linkRules:i};for(let t=0;t<n.length;t++){const o=await s.readAsText(n[t].replace(It,"")),a=JSON.parse(o);for(let t=0;t<a.length;t++)if(void 0!==a[t].type&&void 0!==a[t].code)switch(a[t].type){case"link":{const e=a[t].monomericSubstitution;e.code=a[t].code,i.push(e);break}case"fragmentDuplication":r.homodimerCode&&e.shell.warning("PolyTool: homodimer code is duplicated in rules."),r.homodimerCode=a[t].code;break;case"differentFragments":r.heterodimerCode&&e.shell.warning("PolyTool: heterodimer code is duplicated in rules."),r.heterodimerCode=a[t].code;break;default:e.shell.warning(`PolyTool: Unexpected type - '${a[t]}'.`)}else e.shell.warning("Polytool: rules contain invalid rule")}return r}async function Rt(){const e="Helm",n=t.Func.find({package:e,name:"getHelmHelper"});if(0===n.length)throw new Error(`Package '${e}' must be installed for HelmHelper.`);return(await n[0].prepare().call()).getOutputParamValue()}var St;function Mt(t,e,n){const s=new Array(n.length);for(let i=0;i<n.length;i++){const r=n[i],o=s[i]=t.clone(),a=o.atoms[e].elem;o.atoms[e].elem=r;const l=a?.length>1?`[${a}]`:a,c=r?.length>1?`[${r}]`:r;o.name=`${t.name}-${l}${e+1}${c}`}return s}function Dt(t,e,n){const s=new JSDraw2.MolHandler,i=new org.helm.webeditor.Plugin(s);org.helm.webeditor.IO.parseHelm(i,t,new JSDraw2.Point(0,0),void 0);const r=s.m;let o;switch(r.name=e,n.type){case St.Single:o=function(t,e){return Object.entries(e).map((([e,n])=>Mt(t,parseInt(e),n))).reduce(((t,e)=>t.concat(e)),[])}(s.m,n.placeholders);break;case St.Matrix:o=function(t,e){let n=[t];for(const[t,s]of Object.entries(e)){const e=parseInt(t),i=n.map((t=>Mt(t,e,s)));n=i.reduce(((t,e)=>t.concat(e)),[])}return n}(s.m,n.placeholders)}n.keepOriginal&&(o=[r,...o]);const a=o.map((t=>[org.helm.webeditor.IO.getHelm(t),t.name]));return a}w("PolyTool: Convert",(()=>{let n,s;$((async()=>{n=await At(),s=await Nt(),await wt(),await n.loadMonomerLib(!0)})),O((async()=>{await Pt(s),await n.loadMonomerLib(!0)}));const i={cyclized:{src:["R-F-C(1)-T-G-H-F-Y-P-C(1)-meI","C(1)-T-G-H-F-Y-P-C(1)-meI","R-F-C(1)-T-G-H-F-Y-P-C(1)","C(1)-T-G-H-F-H-P-C(1)","R-F-D(2)-T-G-H-F-Y-P-NH2(2)"],tgt:["PEPTIDE1{[R].[F].[C].[T].[G].[H].[F].[Y].[P].[C].[meI]}$PEPTIDE1,PEPTIDE1,3:R3-10:R3$$$","PEPTIDE1{[C].[T].[G].[H].[F].[Y].[P].[C].[meI]}$PEPTIDE1,PEPTIDE1,1:R3-8:R3$$$","PEPTIDE1{[R].[F].[C].[T].[G].[H].[F].[Y].[P].[C]}$PEPTIDE1,PEPTIDE1,3:R3-10:R3$$$","PEPTIDE1{[C].[T].[G].[H].[F].[H].[P].[C]}$PEPTIDE1,PEPTIDE1,1:R3-8:R3$$$","PEPTIDE1{[R].[F].[D].[T].[G].[H].[F].[Y].[P].[NH2]}$PEPTIDE1,PEPTIDE1,10:R2-3:R3$$$"]}};for(const[t,e]of Object.entries(i))E(`${t}`,(async()=>{const t=await Lt(["rules_example.json"]);P(Ot(e.src,t),e.tgt)}));E("ui-col-wo-table",(async()=>{const n=Ht.name,s=t.Column.fromStrings("seq",i.cyclized.src),r=await e.functions.call(`${n}:polyToolConvert2`,{seqCol:s,generateHelm:!0,chiralityEngine:!0,rules:["rules_example.json"]});v(r.semType,t.SEMTYPE.MACROMOLECULE),v(r.meta.units,ot.HELM),v(r.dataFrame,null)})),E("ui-col",(async()=>{const n=Ht.name,s=t.Column.fromStrings("seq",i.cyclized.src),o=t.DataFrame.fromColumns([s]),a=e.shell.addTableView(o),l=await e.functions.call(`${n}:polyToolConvert2`,{seqCol:s,generateHelm:!0,chiralityEngine:!0,rules:["rules_example.json"]});v(l.semType,t.SEMTYPE.MACROMOLECULE),v(l.meta.units,ot.HELM),v(l.dataFrame.id,o.id),await function(t,e,n,s=0,i="timeout"){return r(this,void 0,void 0,(function*(){return new Promise(((r,o)=>{const a=t.subscribe((t=>{try{e(t),r("OK")}catch(t){o(t)}finally{a.unsubscribe(),clearTimeout(l)}})),l=setTimeout((()=>{a.unsubscribe(),o(i)}),s);n()}))}))}(a.grid.onAfterDrawContent,(()=>{}),(async()=>{a.grid.invalidate()}),15e3),v(l.getTag(t.TAGS.CELL_RENDERER),"helm")}))})),t.JsInputBase,_t.input.helmAsync=async function(t,e){return(await Rt()).createHelmInput(t,e)},function(t){t.Single="single",t.Matrix="matrix"}(St||(St={})),w("PolyTool: Enumerate",(()=>{let t,e,n;$((async()=>{t=await Rt(),e=await At(),n=await Nt(),await wt(),await e.loadMonomerLib(!0)})),O((async()=>{await Pt(n),await e.loadMonomerLib(!0)}));const s={single1:{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:St.Single,placeholders:{4:["K","P","F4COO"],6:["Y","T"]}},tgt:[["PEPTIDE1{[Ac(1)].F.W.G.K.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0","-P5K"],["PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0","-P5P"],["PEPTIDE1{[Ac(1)].F.W.G.[F4COO].L.[Tic].[C(1)].G.[NH2]}$$$$V2.0","-P5[F4COO]"],["PEPTIDE1{[Ac(1)].F.W.G.P.L.Y.[C(1)].G.[NH2]}$$$$V2.0","-[Tic]7Y"],["PEPTIDE1{[Ac(1)].F.W.G.P.L.T.[C(1)].G.[NH2]}$$$$V2.0","-[Tic]7T"]]},"single-with-original":{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:St.Single,placeholders:{4:["K","P","F4COO"],6:["Y","T"]},keepOriginal:!0},tgt:[["PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",""],["PEPTIDE1{[Ac(1)].F.W.G.K.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0","-P5K"],["PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0","-P5P"],["PEPTIDE1{[Ac(1)].F.W.G.[F4COO].L.[Tic].[C(1)].G.[NH2]}$$$$V2.0","-P5[F4COO]"],["PEPTIDE1{[Ac(1)].F.W.G.P.L.Y.[C(1)].G.[NH2]}$$$$V2.0","-[Tic]7Y"],["PEPTIDE1{[Ac(1)].F.W.G.P.L.T.[C(1)].G.[NH2]}$$$$V2.0","-[Tic]7T"]]},matrix1:{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:St.Matrix,placeholders:{1:["D","L"],4:["K","P","F4COO"],6:["Y","T"]}},tgt:[["PEPTIDE1{[Ac(1)].D.W.G.K.L.Y.[C(1)].G.[NH2]}$$$$V2.0","-F2D-P5K-[Tic]7Y"],["PEPTIDE1{[Ac(1)].D.W.G.K.L.T.[C(1)].G.[NH2]}$$$$V2.0","-F2D-P5K-[Tic]7T"],["PEPTIDE1{[Ac(1)].D.W.G.P.L.Y.[C(1)].G.[NH2]}$$$$V2.0","-F2D-P5P-[Tic]7Y"],["PEPTIDE1{[Ac(1)].D.W.G.P.L.T.[C(1)].G.[NH2]}$$$$V2.0","-F2D-P5P-[Tic]7T"],["PEPTIDE1{[Ac(1)].D.W.G.[F4COO].L.Y.[C(1)].G.[NH2]}$$$$V2.0","-F2D-P5[F4COO]-[Tic]7Y"],["PEPTIDE1{[Ac(1)].D.W.G.[F4COO].L.T.[C(1)].G.[NH2]}$$$$V2.0","-F2D-P5[F4COO]-[Tic]7T"],["PEPTIDE1{[Ac(1)].L.W.G.K.L.Y.[C(1)].G.[NH2]}$$$$V2.0","-F2L-P5K-[Tic]7Y"],["PEPTIDE1{[Ac(1)].L.W.G.K.L.T.[C(1)].G.[NH2]}$$$$V2.0","-F2L-P5K-[Tic]7T"],["PEPTIDE1{[Ac(1)].L.W.G.P.L.Y.[C(1)].G.[NH2]}$$$$V2.0","-F2L-P5P-[Tic]7Y"],["PEPTIDE1{[Ac(1)].L.W.G.P.L.T.[C(1)].G.[NH2]}$$$$V2.0","-F2L-P5P-[Tic]7T"],["PEPTIDE1{[Ac(1)].L.W.G.[F4COO].L.Y.[C(1)].G.[NH2]}$$$$V2.0","-F2L-P5[F4COO]-[Tic]7Y"],["PEPTIDE1{[Ac(1)].L.W.G.[F4COO].L.T.[C(1)].G.[NH2]}$$$$V2.0","-F2L-P5[F4COO]-[Tic]7T"]]}};for(const[t,e]of Object.entries(s))E(`${t}`,(async()=>{P(Dt(e.src,"",e.params),e.tgt)}))}));const Ht=new k;async function Ft(e,n,s){const i=await I({category:e,test:n,testContext:s,verbose:!0});return t.DataFrame.fromObjects(i)}})(),sequencetranslator_test=s})();
|
|
1
|
+
var sequencetranslator_test;(()=>{var t={982:function(t,e,n){var s;!function(){var e={};!function(t){"use strict";t.__esModule=!0,t.digestLength=32,t.blockSize=64;var e=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function n(t,n,s,o,r){for(var i,a,l,c,h,u,f,g,m,d,p,y,C;r>=64;){for(i=n[0],a=n[1],l=n[2],c=n[3],h=n[4],u=n[5],f=n[6],g=n[7],d=0;d<16;d++)p=o+4*d,t[d]=(255&s[p])<<24|(255&s[p+1])<<16|(255&s[p+2])<<8|255&s[p+3];for(d=16;d<64;d++)y=((m=t[d-2])>>>17|m<<15)^(m>>>19|m<<13)^m>>>10,C=((m=t[d-15])>>>7|m<<25)^(m>>>18|m<<14)^m>>>3,t[d]=(y+t[d-7]|0)+(C+t[d-16]|0);for(d=0;d<64;d++)y=(((h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&u^~h&f)|0)+(g+(e[d]+t[d]|0)|0)|0,C=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&a^i&l^a&l)|0,g=f,f=u,u=h,h=c+y|0,c=l,l=a,a=i,i=y+C|0;n[0]+=i,n[1]+=a,n[2]+=l,n[3]+=c,n[4]+=h,n[5]+=u,n[6]+=f,n[7]+=g,o+=64,r-=64}return o}var s=function(){function e(){this.digestLength=t.digestLength,this.blockSize=t.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return e.prototype.reset=function(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},e.prototype.clean=function(){for(var t=0;t<this.buffer.length;t++)this.buffer[t]=0;for(t=0;t<this.temp.length;t++)this.temp[t]=0;this.reset()},e.prototype.update=function(t,e){if(void 0===e&&(e=t.length),this.finished)throw new Error("SHA256: can't update because hash was finished.");var s=0;if(this.bytesHashed+=e,this.bufferLength>0){for(;this.bufferLength<64&&e>0;)this.buffer[this.bufferLength++]=t[s++],e--;64===this.bufferLength&&(n(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(e>=64&&(s=n(this.temp,this.state,t,s,e),e%=64);e>0;)this.buffer[this.bufferLength++]=t[s++],e--;return this},e.prototype.finish=function(t){if(!this.finished){var e=this.bytesHashed,s=this.bufferLength,o=e/536870912|0,r=e<<3,i=e%64<56?64:128;this.buffer[s]=128;for(var a=s+1;a<i-8;a++)this.buffer[a]=0;this.buffer[i-8]=o>>>24&255,this.buffer[i-7]=o>>>16&255,this.buffer[i-6]=o>>>8&255,this.buffer[i-5]=o>>>0&255,this.buffer[i-4]=r>>>24&255,this.buffer[i-3]=r>>>16&255,this.buffer[i-2]=r>>>8&255,this.buffer[i-1]=r>>>0&255,n(this.temp,this.state,this.buffer,0,i),this.finished=!0}for(a=0;a<8;a++)t[4*a+0]=this.state[a]>>>24&255,t[4*a+1]=this.state[a]>>>16&255,t[4*a+2]=this.state[a]>>>8&255,t[4*a+3]=this.state[a]>>>0&255;return this},e.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},e.prototype._saveState=function(t){for(var e=0;e<this.state.length;e++)t[e]=this.state[e]},e.prototype._restoreState=function(t,e){for(var n=0;n<this.state.length;n++)this.state[n]=t[n];this.bytesHashed=e,this.finished=!1,this.bufferLength=0},e}();t.Hash=s;var o=function(){function t(t){this.inner=new s,this.outer=new s,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var e=new Uint8Array(this.blockSize);if(t.length>this.blockSize)(new s).update(t).finish(e).clean();else for(var n=0;n<t.length;n++)e[n]=t[n];for(n=0;n<e.length;n++)e[n]^=54;for(this.inner.update(e),n=0;n<e.length;n++)e[n]^=106;for(this.outer.update(e),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate),n=0;n<e.length;n++)e[n]=0}return t.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},t.prototype.clean=function(){for(var t=0;t<this.istate.length;t++)this.ostate[t]=this.istate[t]=0;this.inner.clean(),this.outer.clean()},t.prototype.update=function(t){return this.inner.update(t),this},t.prototype.finish=function(t){return this.outer.finished?this.outer.finish(t):(this.inner.finish(t),this.outer.update(t,this.digestLength).finish(t)),this},t.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},t}();function r(t){var e=(new s).update(t),n=e.digest();return e.clean(),n}function i(t,e){var n=new o(t).update(e),s=n.digest();return n.clean(),s}function a(t,e,n,s){var o=s[0];if(0===o)throw new Error("hkdf: cannot expand more");e.reset(),o>1&&e.update(t),n&&e.update(n),e.update(s),e.finish(t),s[0]++}t.HMAC=o,t.hash=r,t.default=r,t.hmac=i;var l=new Uint8Array(t.digestLength);t.hkdf=function(t,e,n,s){void 0===e&&(e=l),void 0===s&&(s=32);for(var r=new Uint8Array([1]),c=i(e,t),h=new o(c),u=new Uint8Array(h.digestLength),f=u.length,g=new Uint8Array(s),m=0;m<s;m++)f===u.length&&(a(u,h,n,r),f=0),g[m]=u[f++];return h.clean(),u.fill(0),r.fill(0),g},t.pbkdf2=function(t,e,n,s){for(var r=new o(t),i=r.digestLength,a=new Uint8Array(4),l=new Uint8Array(i),c=new Uint8Array(i),h=new Uint8Array(s),u=0;u*i<s;u++){var f=u+1;a[0]=f>>>24&255,a[1]=f>>>16&255,a[2]=f>>>8&255,a[3]=f>>>0&255,r.reset(),r.update(e),r.update(a),r.finish(c);for(var g=0;g<i;g++)l[g]=c[g];for(g=2;g<=n;g++){r.reset(),r.update(c).finish(c);for(var m=0;m<i;m++)l[m]^=c[m]}for(g=0;g<i&&u*i+g<s;g++)h[u*i+g]=l[g]}for(u=0;u<i;u++)l[u]=c[u]=0;for(u=0;u<4;u++)a[u]=0;return r.clean(),h}}(e);var o=e.default;for(var r in e)o[r]=e[r];"object"==typeof t.exports?t.exports=o:void 0===(s=function(){return o}.call(e,n,e,t))||(t.exports=s)}()}},e={};function n(s){var o=e[s];if(void 0!==o)return o.exports;var r=e[s]={exports:{}};return t[s].call(r.exports,r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var s in e)n.o(e,s)&&!n.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var s={};(()=>{"use strict";n.r(s),n.d(s,{_package:()=>Ht,initAutoTests:()=>Ft,test:()=>St,tests:()=>f});const t=DG,e=grok;n(982);const o=t.DataFrame.fromCsv('countries,fasta,smiles,molregno,LON,Zip Code,Street Address Line 1,ImageUrl,user_id,error_message,xray,flag,magnitude,CS-id,pdb_id,accel_a,time_offset,chart,fit,Questions,empty_number,empty_string\nBelgium,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C(=O)OCCCc1cccnc1)c2cccc(c2)C(=O)c3ccccc3,1480014,36.276729583740234,995042300,14016 ROUTE 31W,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,1,1,1QBS,1,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.497360340644872, 1.7058694986686864, 5.278052678195135, 0.16000320889028383],""points"":[{""x"":0.10000000149011612,""y"":2.374499797821045},{""x"":0.6000000238418579,""y"":2.6242473125457764},{""x"":1.100000023841858,""y"":2.367267608642578},{""x"":1.600000023841858,""y"":2.6723148822784424},{""x"":2.0999999046325684,""y"":2.6537344455718994},{""x"":2.5999999046325684,""y"":2.3651671409606934},{""x"":3.0999999046325684,""y"":2.5654284954071045},{""x"":3.5999999046325684,""y"":2.4160959720611572},{""x"":4.099999904632568,""y"":2.286726713180542},{""x"":4.599999904632568,""y"":2.5100042819976807},{""x"":5.099999904632568,""y"":1.6676985025405884},{""x"":5.599999904632568,""y"":0.680136501789093},{""x"":6.099999904632568,""y"":0.3391543924808502},{""x"":6.599999904632568,""y"":0.09038983285427094},{""x"":7.099999904632568,""y"":0.19802775979042053}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[7.525235855508179, 1.3186911876809984, 5.335672608564294, 0.7860743343958098],""points"":[{""x"":0.10000000149011612,""y"":7.988070487976074},{""x"":0.6000000238418579,""y"":7.018453121185303},{""x"":1.100000023841858,""y"":8.115279197692871},{""x"":1.600000023841858,""y"":7.486658096313477},{""x"":2.0999999046325684,""y"":7.396438121795654},{""x"":2.5999999046325684,""y"":7.477052211761475},{""x"":3.0999999046325684,""y"":6.913095474243164},{""x"":3.5999999046325684,""y"":8.01385498046875},{""x"":4.099999904632568,""y"":6.985900402069092},{""x"":4.599999904632568,""y"":6.970335960388184},{""x"":5.099999904632568,""y"":5.448817253112793},{""x"":5.599999904632568,""y"":2.5534818172454834},{""x"":6.099999904632568,""y"":1.893947958946228},{""x"":6.599999904632568,""y"":0.6340042352676392},{""x"":7.099999904632568,""y"":0.8403874039649963}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,100,abc\nBurundi,MDYKETLLMPKTDFPMRGGLPNKEPQIQEKW,COc1ccc2cc(ccc2c1)C(C)C(=O)Oc3ccc(C)cc3OC,1480015,36.276729583740234,995073444,80 STATE HIGHWAY 310,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,2,2,1ZP8,2,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[4.431460753103398, 2.1691498799246745, 5.266445597102774, 0.7825762827017926],""points"":[{""x"":0.10000000149011612,""y"":4.751083850860596},{""x"":0.6000000238418579,""y"":4.203000068664551},{""x"":1.100000023841858,""y"":4.415858745574951},{""x"":1.600000023841858,""y"":4.68414306640625},{""x"":2.0999999046325684,""y"":4.198400974273682},{""x"":2.5999999046325684,""y"":4.179222106933594},{""x"":3.0999999046325684,""y"":4.638473987579346},{""x"":3.5999999046325684,""y"":4.708553314208984},{""x"":4.099999904632568,""y"":4.291589260101318},{""x"":4.599999904632568,""y"":4.038082599639893},{""x"":5.099999904632568,""y"":3.4349939823150635},{""x"":5.599999904632568,""y"":1.2194708585739136},{""x"":6.099999904632568,""y"":1.1920831203460693},{""x"":6.599999904632568,""y"":0.5352635979652405},{""x"":7.099999904632568,""y"":0.3346920311450958}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[2.339458017970126, -1.0734184310171178, 4.746332950550934, 0.2482416857595658],""points"":[{""x"":0.10000000149011612,""y"":0.2139337658882141},{""x"":0.6000000238418579,""y"":0.4269562065601349},{""x"":1.100000023841858,""y"":0.2441573292016983},{""x"":1.600000023841858,""y"":0.146635964512825},{""x"":2.0999999046325684,""y"":0.08818462491035461},{""x"":2.5999999046325684,""y"":0.2560656666755676},{""x"":3.0999999046325684,""y"":0.42434045672416687},{""x"":3.5999999046325684,""y"":0.37111231684684753},{""x"":4.099999904632568,""y"":0.5581737160682678},{""x"":4.599999904632568,""y"":1.183590054512024},{""x"":5.099999904632568,""y"":1.5629843473434448},{""x"":5.599999904632568,""y"":2.3211288452148438},{""x"":6.099999904632568,""y"":2.229961633682251},{""x"":6.599999904632568,""y"":2.2560226917266846},{""x"":7.099999904632568,""y"":2.2142398357391357}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCameroon,MIEVFLFGIVLGLIPITLAGLFVTAYLQYRRGDQLDL,COc1ccc2cc(ccc2c1)C(C)C(=O)OCCCc3cccnc3,1480016,36.26095962524414,995153596,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,3,3,2BDJ,3,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[4.6760652578642325, 0.9046956320756703, 5.651408971856738, 0.07738846012184185],""points"":[{""x"":0.10000000149011612,""y"":4.32425594329834},{""x"":0.6000000238418579,""y"":4.668442249298096},{""x"":1.100000023841858,""y"":4.379785060882568},{""x"":1.600000023841858,""y"":5.0345139503479},{""x"":2.0999999046325684,""y"":4.878653526306152},{""x"":2.5999999046325684,""y"":4.3451313972473145},{""x"":3.0999999046325684,""y"":4.336992263793945},{""x"":3.5999999046325684,""y"":5.037430286407471},{""x"":4.099999904632568,""y"":5.0092692375183105},{""x"":4.599999904632568,""y"":4.151902675628662},{""x"":5.099999904632568,""y"":3.4066951274871826},{""x"":5.599999904632568,""y"":2.3732759952545166},{""x"":6.099999904632568,""y"":1.673728108406067},{""x"":6.599999904632568,""y"":0.48574790358543396},{""x"":7.099999904632568,""y"":0.2783052325248718}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[2.938395863010111, -1.4658480661392117, 5.462702751996584, 0.3473139023615039],""points"":[{""x"":0.10000000149011612,""y"":0.4941710829734802},{""x"":0.6000000238418579,""y"":0.15323974192142487},{""x"":1.100000023841858,""y"":0.46373432874679565},{""x"":1.600000023841858,""y"":0.3370431363582611},{""x"":2.0999999046325684,""y"":0.5179030299186707},{""x"":2.5999999046325684,""y"":0.27899765968322754},{""x"":3.0999999046325684,""y"":0.22075064480304718},{""x"":3.5999999046325684,""y"":0.5789918899536133},{""x"":4.099999904632568,""y"":0.21169911324977875},{""x"":4.599999904632568,""y"":0.27857646346092224},{""x"":5.099999904632568,""y"":1.0906332731246948},{""x"":5.599999904632568,""y"":1.8520300388336182},{""x"":6.099999904632568,""y"":2.7177059650421143},{""x"":6.599999904632568,""y"":2.8680918216705322},{""x"":7.099999904632568,""y"":3.2413077354431152}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCanada,MMELVLKTIIGPIVVGVVLRIVDKWLNKDK,CC(C(=O)NCCS)c1cccc(c1)C(=O)c2ccccc2,1480017,36.26095962524414,99515,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,4,4,1IAN,4,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[0.8597390975430008, 1.0957625732481946, 5.260537067987958, 0.07974187998177736],""points"":[{""x"":0.10000000149011612,""y"":0.8190152645111084},{""x"":0.6000000238418579,""y"":0.8421689867973328},{""x"":1.100000023841858,""y"":0.8740922212600708},{""x"":1.600000023841858,""y"":0.8924275040626526},{""x"":2.0999999046325684,""y"":0.8249067664146423},{""x"":2.5999999046325684,""y"":0.9327669143676758},{""x"":3.0999999046325684,""y"":0.8522974252700806},{""x"":3.5999999046325684,""y"":0.8174492716789246},{""x"":4.099999904632568,""y"":0.8394647240638733},{""x"":4.599999904632568,""y"":0.7139387726783752},{""x"":5.099999904632568,""y"":0.5561167597770691},{""x"":5.599999904632568,""y"":0.3276226818561554},{""x"":6.099999904632568,""y"":0.12479474395513535},{""x"":6.599999904632568,""y"":0.13006797432899475},{""x"":7.099999904632568,""y"":0.059702079743146896}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.760930219582546, 1.6591793293833013, 4.667155929720851, 0.7858109544121652],""points"":[{""x"":0.10000000149011612,""y"":6.156993389129639},{""x"":0.6000000238418579,""y"":5.236701965332031},{""x"":1.100000023841858,""y"":6.010560512542725},{""x"":1.600000023841858,""y"":5.495512962341309},{""x"":2.0999999046325684,""y"":6.087770462036133},{""x"":2.5999999046325684,""y"":5.79986572265625},{""x"":3.0999999046325684,""y"":5.597546577453613},{""x"":3.5999999046325684,""y"":5.520902156829834},{""x"":4.099999904632568,""y"":5.360654354095459},{""x"":4.599999904632568,""y"":3.5539746284484863},{""x"":5.099999904632568,""y"":1.577236294746399},{""x"":5.599999904632568,""y"":1.0001264810562134},{""x"":6.099999904632568,""y"":0.9305797815322876},{""x"":6.599999904632568,""y"":0.6033638715744019},{""x"":7.099999904632568,""y"":0.4203685522079468}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nColombia,MDRTDEVSNHTHDKPTLTWFEEIFEEYHSPFHN,FC(F)(F)c1ccc(OC2CCNCC2)cc1,1480029,36.3309440612793,995152050,1 COURT HOUSE SQUARE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,5,5,4UJ1,5,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[6.4995088314153655, 2.4270351004539914, 5.178659535348579, 0.625653346241577],""points"":[{""x"":0.10000000149011612,""y"":6.496231555938721},{""x"":0.6000000238418579,""y"":6.42543363571167},{""x"":1.100000023841858,""y"":7.040063858032227},{""x"":1.600000023841858,""y"":6.1115403175354},{""x"":2.0999999046325684,""y"":6.680728435516357},{""x"":2.5999999046325684,""y"":6.406774520874023},{""x"":3.0999999046325684,""y"":6.611269474029541},{""x"":3.5999999046325684,""y"":5.889094352722168},{""x"":4.099999904632568,""y"":6.75344705581665},{""x"":4.599999904632568,""y"":6.361435890197754},{""x"":5.099999904632568,""y"":4.1666975021362305},{""x"":5.599999904632568,""y"":1.172118902206421},{""x"":6.099999904632568,""y"":0.801048994064331},{""x"":6.599999904632568,""y"":0.4640021026134491},{""x"":7.099999904632568,""y"":0.0010357667924836278}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[1.4734381347446401, 1.1649805188074196, 4.82958608866421, 0.09500545496710007],""points"":[{""x"":0.10000000149011612,""y"":1.5279096364974976},{""x"":0.6000000238418579,""y"":1.3559974431991577},{""x"":1.100000023841858,""y"":1.5246378183364868},{""x"":1.600000023841858,""y"":1.5567657947540283},{""x"":2.0999999046325684,""y"":1.4114240407943726},{""x"":2.5999999046325684,""y"":1.4045010805130005},{""x"":3.0999999046325684,""y"":1.4769829511642456},{""x"":3.5999999046325684,""y"":1.4875500202178955},{""x"":4.099999904632568,""y"":1.2991987466812134},{""x"":4.599999904632568,""y"":0.922961413860321},{""x"":5.099999904632568,""y"":0.6520044803619385},{""x"":5.599999904632568,""y"":0.15350978076457977},{""x"":6.099999904632568,""y"":0.1078903079032898},{""x"":6.599999904632568,""y"":0.17276449501514435},{""x"":7.099999904632568,""y"":0.14066608250141144}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCosta Rica,MKSTKEEIQTIKTLLKDSRTAKYHKRLQIVL,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCCc3ccccc3,1480018,36.3309440612793,995084218,4041 SOUTHWESTERN BLVD,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,6,6,2BPW,6,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.4833641843311227, -1.8945978742090062, 4.671127708092568, 0.24159861311815153],""points"":[{""x"":0.10000000149011612,""y"":0.0969524160027504},{""x"":0.6000000238418579,""y"":0.028483040630817413},{""x"":1.100000023841858,""y"":0.22087176144123077},{""x"":1.600000023841858,""y"":0.0068915546871721745},{""x"":2.0999999046325684,""y"":0.4305879771709442},{""x"":2.5999999046325684,""y"":0.44774115085601807},{""x"":3.0999999046325684,""y"":0.45346319675445557},{""x"":3.5999999046325684,""y"":0.2370593100786209},{""x"":4.099999904632568,""y"":0.4657953977584839},{""x"":4.599999904632568,""y"":1.155200719833374},{""x"":5.099999904632568,""y"":2.2294070720672607},{""x"":5.599999904632568,""y"":2.4311530590057373},{""x"":6.099999904632568,""y"":2.33846116065979},{""x"":6.599999904632568,""y"":2.608201026916504},{""x"":7.099999904632568,""y"":2.8136143684387207}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.224573521642033, 1.4454033924198528, 5.6014197746076535, 0.2823216054197577],""points"":[{""x"":0.10000000149011612,""y"":4.95027494430542},{""x"":0.6000000238418579,""y"":5.1754679679870605},{""x"":1.100000023841858,""y"":5.276752948760986},{""x"":1.600000023841858,""y"":5.589294910430908},{""x"":2.0999999046325684,""y"":5.616994857788086},{""x"":2.5999999046325684,""y"":5.120813846588135},{""x"":3.0999999046325684,""y"":5.340766906738281},{""x"":3.5999999046325684,""y"":4.876471042633057},{""x"":4.099999904632568,""y"":4.94999361038208},{""x"":4.599999904632568,""y"":5.162564754486084},{""x"":5.099999904632568,""y"":4.399557590484619},{""x"":5.599999904632568,""y"":2.7977969646453857},{""x"":6.099999904632568,""y"":1.0229872465133667},{""x"":6.599999904632568,""y"":0.48275601863861084},{""x"":7.099999904632568,""y"":0.10408931970596313}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCuba,MHAILRYFIRRLFYHIFYKIYSLISKKHQSLPSDVRQF,COc1ccc2c(c1)c(CC(=O)N3CCCC3C(=O)Oc4ccc(C)cc4OC)c(C)n2C(=O)c5ccc(Cl)cc5,1480019,36.33115768432617,995081928,1227 US HIGHWAY 11,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,7,7,1QBS,7,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[3.320838679713925, -1.2421619987316728, 4.831325425225256, 0.3236011098403072],""points"":[{""x"":0.10000000149011612,""y"":0.3727470338344574},{""x"":0.6000000238418579,""y"":0.12365014106035233},{""x"":1.100000023841858,""y"":0.48422467708587646},{""x"":1.600000023841858,""y"":0.2264465093612671},{""x"":2.0999999046325684,""y"":0.16821794211864471},{""x"":2.5999999046325684,""y"":0.3879014551639557},{""x"":3.0999999046325684,""y"":0.5470244884490967},{""x"":3.5999999046325684,""y"":0.3419053554534912},{""x"":4.099999904632568,""y"":0.7655120491981506},{""x"":4.599999904632568,""y"":1.2346516847610474},{""x"":5.099999904632568,""y"":2.453336715698242},{""x"":5.599999904632568,""y"":2.9565491676330566},{""x"":6.099999904632568,""y"":3.335299491882324},{""x"":6.599999904632568,""y"":3.240290880203247},{""x"":7.099999904632568,""y"":3.1107218265533447}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[3.6401853521511094, 1.26211588875013, 5.399028074402744, 0.5089580830068091],""points"":[{""x"":0.10000000149011612,""y"":3.8585598468780518},{""x"":0.6000000238418579,""y"":3.6077206134796143},{""x"":1.100000023841858,""y"":3.855252265930176},{""x"":1.600000023841858,""y"":3.619039297103882},{""x"":2.0999999046325684,""y"":3.839388370513916},{""x"":2.5999999046325684,""y"":3.335283041000366},{""x"":3.0999999046325684,""y"":3.571141481399536},{""x"":3.5999999046325684,""y"":3.4155046939849854},{""x"":4.099999904632568,""y"":3.7316646575927734},{""x"":4.599999904632568,""y"":3.0680155754089355},{""x"":5.099999904632568,""y"":2.891066551208496},{""x"":5.599999904632568,""y"":1.6022753715515137},{""x"":6.099999904632568,""y"":0.7652576565742493},{""x"":6.599999904632568,""y"":0.6875326037406921},{""x"":7.099999904632568,""y"":0.5828871726989746}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nItaly,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO[N+](=O)[O-],1480020,36.33115768432617,99502,"168-46 91ST AVE., 2ND FLR",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,8,8,1ZP8,8,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.293592105923809, 1.3781586549141835, 5.1025898038676605, 0.03493851245291291],""points"":[{""x"":0.10000000149011612,""y"":2.1287283897399902},{""x"":0.6000000238418579,""y"":2.267972230911255},{""x"":1.100000023841858,""y"":2.398442506790161},{""x"":1.600000023841858,""y"":2.5130622386932373},{""x"":2.0999999046325684,""y"":2.3255116939544678},{""x"":2.5999999046325684,""y"":2.127340793609619},{""x"":3.0999999046325684,""y"":2.47259783744812},{""x"":3.5999999046325684,""y"":2.131181478500366},{""x"":4.099999904632568,""y"":2.090421438217163},{""x"":4.599999904632568,""y"":2.02299165725708},{""x"":5.099999904632568,""y"":1.1105059385299683},{""x"":5.599999904632568,""y"":0.4494485855102539},{""x"":6.099999904632568,""y"":0.1375635862350464},{""x"":6.599999904632568,""y"":0.036351121962070465},{""x"":7.099999904632568,""y"":0.1619771122932434}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.953125499439879, 1.2528620255306528, 5.187637440149802, 0.3110348753260886],""points"":[{""x"":0.10000000149011612,""y"":5.6585283279418945},{""x"":0.6000000238418579,""y"":5.911152362823486},{""x"":1.100000023841858,""y"":5.924920082092285},{""x"":1.600000023841858,""y"":5.8469438552856445},{""x"":2.0999999046325684,""y"":5.929472923278809},{""x"":2.5999999046325684,""y"":6.190037727355957},{""x"":3.0999999046325684,""y"":6.236179828643799},{""x"":3.5999999046325684,""y"":6.141019344329834},{""x"":4.099999904632568,""y"":5.295210838317871},{""x"":4.599999904632568,""y"":5.265801906585693},{""x"":5.099999904632568,""y"":3.3722851276397705},{""x"":5.599999904632568,""y"":1.8299226760864258},{""x"":6.099999904632568,""y"":0.32690900564193726},{""x"":6.599999904632568,""y"":0.6274543404579163},{""x"":7.099999904632568,""y"":0.8441857099533081}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nRwanda,MPNSEPASLLELFNSIATQGELVRSLKAGNASK,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO,1480021,36.33137130737305,995037247,"168-46 91ST AVE., 2ND FLR",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,9,9,2BDJ,9,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[3.8209972202654474, 1.3779216716448506, 5.299882228439686, 0.06040645519069608],""points"":[{""x"":0.10000000149011612,""y"":3.7821109294891357},{""x"":0.6000000238418579,""y"":3.542433023452759},{""x"":1.100000023841858,""y"":3.7008674144744873},{""x"":1.600000023841858,""y"":3.717301607131958},{""x"":2.0999999046325684,""y"":4.024452209472656},{""x"":2.5999999046325684,""y"":4.013899326324463},{""x"":3.0999999046325684,""y"":3.945094347000122},{""x"":3.5999999046325684,""y"":3.866621971130371},{""x"":4.099999904632568,""y"":3.7461626529693604},{""x"":4.599999904632568,""y"":3.3454740047454834},{""x"":5.099999904632568,""y"":2.61944317817688},{""x"":5.599999904632568,""y"":0.999405026435852},{""x"":6.099999904632568,""y"":0.46259793639183044},{""x"":6.599999904632568,""y"":0.054134611040353775},{""x"":7.099999904632568,""y"":0.05711187422275543}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.6318079657726035, 1.8495493770000595, 5.391793312471116, 0.17060707587348442],""points"":[{""x"":0.10000000149011612,""y"":5.458079814910889},{""x"":0.6000000238418579,""y"":5.554427146911621},{""x"":1.100000023841858,""y"":5.799983024597168},{""x"":1.600000023841858,""y"":5.364140033721924},{""x"":2.0999999046325684,""y"":5.864485740661621},{""x"":2.5999999046325684,""y"":5.4509806632995605},{""x"":3.0999999046325684,""y"":5.702574729919434},{""x"":3.5999999046325684,""y"":5.7314534187316895},{""x"":4.099999904632568,""y"":5.5123443603515625},{""x"":4.599999904632568,""y"":5.724395751953125},{""x"":5.099999904632568,""y"":4.354506969451904},{""x"":5.599999904632568,""y"":1.7307666540145874},{""x"":6.099999904632568,""y"":0.6305936574935913},{""x"":6.599999904632568,""y"":0.035183437168598175},{""x"":7.099999904632568,""y"":0.7575169205665588}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nSwitzerland,IRVVGRYLIEVWKAAGMDMDKVLFLWSSDEI,CN1CCC(CC1)Oc2ccc(cc2)C(F)(F)F,1480028,36.33137130737305,99504,92-11 179TH PLACE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,9,10,1IAN,10,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[1.1190255865097471, 2.3163895161544437, 5.4968866182279195, 0.2035204047289052],""points"":[{""x"":0.10000000149011612,""y"":1.1057683229446411},{""x"":0.6000000238418579,""y"":1.1019697189331055},{""x"":1.100000023841858,""y"":1.0818607807159424},{""x"":1.600000023841858,""y"":1.062997817993164},{""x"":2.0999999046325684,""y"":1.046447515487671},{""x"":2.5999999046325684,""y"":1.1217249631881714},{""x"":3.0999999046325684,""y"":1.2166996002197266},{""x"":3.5999999046325684,""y"":1.215477705001831},{""x"":4.099999904632568,""y"":1.0581893920898438},{""x"":4.599999904632568,""y"":1.1747995615005493},{""x"":5.099999904632568,""y"":1.0181127786636353},{""x"":5.599999904632568,""y"":0.5344523191452026},{""x"":6.099999904632568,""y"":0.2569526433944702},{""x"":6.599999904632568,""y"":0.1912207305431366},{""x"":7.099999904632568,""y"":0.15060538053512573}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[3.1038581025805785, 2.0032224204185245, 5.087602825989163, 0.13277988512492753],""points"":[{""x"":0.10000000149011612,""y"":3.0498509407043457},{""x"":0.6000000238418579,""y"":2.805217742919922},{""x"":1.100000023841858,""y"":3.3415253162384033},{""x"":1.600000023841858,""y"":3.0549843311309814},{""x"":2.0999999046325684,""y"":3.250074863433838},{""x"":2.5999999046325684,""y"":3.0432586669921875},{""x"":3.0999999046325684,""y"":3.265852451324463},{""x"":3.5999999046325684,""y"":2.9475724697113037},{""x"":4.099999904632568,""y"":3.1929898262023926},{""x"":4.599999904632568,""y"":2.7460060119628906},{""x"":5.099999904632568,""y"":1.6175861358642578},{""x"":5.599999904632568,""y"":0.3006608486175537},{""x"":6.099999904632568,""y"":0.3444803059101105},{""x"":6.599999904632568,""y"":0.015537971630692482},{""x"":7.099999904632568,""y"":0.5527358055114746}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\n,,,,,,,,,,,,,,,,,,,,,');o.columns.add(t.Column.fromList(t.TYPE.BYTE_ARRAY,"BinaryImage",Array.from(new Uint8Array(11))));var r=function(t,e,n,s){return new(n||(n=Promise))((function(o,r){function i(t){try{l(s.next(t))}catch(t){r(t)}}function a(t){try{l(s.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,a)}l((s=s.apply(t,e||[])).next())}))};const i=3e4,a=108e5,l=console.log.bind(console),c=console.info.bind(console),h=console.warn.bind(console),u=console.error.bind(console),f={},g="Auto Tests",m="Demo",d="Detectors",p="Core",y={};let C;var x;!function(t){t.notNull=function(t,e){if(null==t)throw new Error(`${null==e?"Value":e} not defined`)}}(x||(x={}));class E{constructor(t,e){this.catchUnhandled=!0,this.report=!1,void 0!==t&&(this.catchUnhandled=t),void 0!==e&&(this.report=e)}}class b{constructor(t,e,n,s){var o;this.category=t,this.name=e,null!=s||(s={}),null!==(o=s.timeout)&&void 0!==o||(s.timeout=i),this.options=s,this.test=()=>r(this,void 0,void 0,(function*(){return new Promise(((t,e)=>r(this,void 0,void 0,(function*(){let s="";try{s=yield n()}catch(t){e(t)}t(s)}))))}))}}function A(t,e,n){null==f[C]&&(f[C]={}),null==f[C].tests&&(f[C].tests=[]),f[C].tests.push(new b(C,t,e,n))}function $(t,e=!0,n){if(n=n?`${n}, `:"",t!==e)throw new Error(`${n}Expected "${e}", got "${t}"`)}function P(t,e,n=.001,s){if(t===Number.POSITIVE_INFINITY&&e===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY&&e===Number.NEGATIVE_INFINITY||t===Number.NaN&&e===Number.NaN||isNaN(t)&&isNaN(e))return;const o=Math.abs(t-e)<n;if($(o,!0,`${null!=s?s:""} (tolerance = ${n})`),!o)throw new Error(`Expected ${e}, got ${t} (tolerance = ${n})`)}function T(t,e){for(const[n,s]of Object.entries(e)){if(!t.hasOwnProperty(n))throw new Error(`Expected property "${n}" not found`);const e=t[n];if(e instanceof Array&&s instanceof Array)N(e,s);else if(e instanceof Object&&s instanceof Object)T(e,s);else if(Number.isFinite(e)&&Number.isFinite(s))P(e,s);else if(e!=s)throw new Error(`Expected (${s}) for key '${n}', got (${e})`)}}function N(t,e){const n=t.length,s=e.length;if(n!=s)throw new Error(`Arrays are of different length: actual array length is ${n} and expected array length is ${s}`);for(let s=0;s<n;s++)if(t[s]instanceof Array&&e[s]instanceof Array)N(t[s],e[s]);else if(t[s]instanceof Object&&e[s]instanceof Object)T(t[s],e[s]);else if(t[s]!=e[s])throw new Error(`Expected ${e[s]} at position ${s}, got ${t[s]}`)}function v(t,e,n){var s;C=t,e(),f[C]&&(f[C].clear=null===(s=null==n?void 0:n.clear)||void 0===s||s,f[C].timeout=null==n?void 0:n.timeout,f[C].benchmarks=null==n?void 0:n.benchmarks,f[C].stressTests=null==n?void 0:n.stressTests)}function w(t){null==f[C]&&(f[C]={}),f[C].before=t}function O(t){null==f[C]&&(f[C]={}),f[C].after=t}function _(t,e){return t.replace(new RegExp(e.name,"gi"),e.nqName)}function L(n,s){var a,l,c,h;return r(this,void 0,void 0,(function*(){const u=n.id;if(y[u])return;const C=s?s.tests:f;if(void 0!==C[g]||void 0!==C[m]||Object.keys(C).find((t=>t.startsWith(g)||t.startsWith(p))))return void(y[u]=!0);if("DevTools"===n.name||s&&"DevTools"===s._package.name)for(const t of window.dartTests){const e=t.name.split(/\s*\|\s*!/g);let n=null!==(a=e.pop())&&void 0!==a?a:t.name,s=e.length?p+": "+e.join(": "):p,o=n.split(" | ");n=o[o.length-1],o.unshift(s),o.pop(),s=o.join(": "),void 0===C[s]&&(C[s]={tests:[],clear:!0}),C[s].tests.push(new b(s,n,t.test,{isAggregated:!1,timeout:null!==(c=null===(l=t.options)||void 0===l?void 0:l.timeout)&&void 0!==c?c:i,skipReason:null===(h=t.options)||void 0===h?void 0:h.skipReason}))}const x=[],E=[],A=[],P=yield e.dapi.functions.filter(`package.id = "${u}"`).list(),T=new RegExp(/skip:\s*([^,\s]+)|wait:\s*(\d+)|cat:\s*([^,\s]+)|timeout:\s*(\d+)/g);for(const s of P){const i=s.options.test,a=s.options.demoPath;if(i&&Array.isArray(i)&&i.length)for(let n=0;n<i.length;n++){const o=i[n].matchAll(T),a={};Array.from(o).forEach((t=>{t[0].startsWith("skip")?a.skip=t[1]:t[0].startsWith("wait")?a.wait=parseInt(t[2]):t[0].startsWith("cat")?a.cat=t[3]:t[0].startsWith("timeout")&&(a.timeout=parseInt(t[4]))}));const l=new b(g,1===i.length?s.name:`${s.name} ${n+1}`,(()=>r(this,void 0,void 0,(function*(){const t=yield e.functions.eval(_(i[n],s));if(a.wait&&(yield D(a.wait)),"boolean"==typeof t&&!t)throw`Failed: ${i[n]}, expected true, got ${t}`}))),{skipReason:a.skip,timeout:t.Test.isInBenchmark?a.benchmarkTimeout:a.timeout});if(a.cat){const t=g+": "+a.cat;l.category=t,void 0===C[t]&&(C[t]={tests:[],clear:!0}),C[t].tests.push(l)}else x.push(l)}if(a){const n=s.options.demoWait?parseInt(s.options.demoWait):void 0,o=new b(m,s.friendlyName,(()=>r(this,void 0,void 0,(function*(){e.shell.isInDemo=!0,void 0===e.shell.view(t.View.BROWSE)&&(e.shell.v=t.View.createByType(t.View.BROWSE)),yield D(300),e.shell.clearLastError(),yield s.apply(),yield D(n||2e3);const o=yield e.shell.lastError;if(o)throw new Error(o);e.shell.isInDemo=!1}))),{skipReason:s.options.demoSkip});E.push(o)}if(s.hasTag("semTypeDetector")){let t=o;s.options.testData&&(t=yield e.data.files.openTable(`System:AppData/${n.nqName}/${s.options.testData}`));const i=new b(d,s.friendlyName,(()=>r(this,void 0,void 0,(function*(){const e=[];console.log(`System:AppData/${n.nqName}/${s.options.testData}`);for(const n of t.clone().columns){const t=yield s.apply([n]);e.push(t||n.semType)}const o=e.filter((t=>t));$(o.length,1),s.options.testDataColumnName&&$(o[0],s.options.testDataColumnName)}))),{skipReason:s.options.skipTest});A.push(i)}}y[u]=!0,x.length&&(C[g]={tests:x,clear:!0}),E.length&&(C[m]={tests:E,clear:!0}),A.length&&(C[d]={tests:A,clear:!1})}))}function I(n){var s,o,i,a;return r(this,void 0,void 0,(function*(){const g=null===(o=null===(s=e.functions.getCurrentCall())||void 0===s?void 0:s.func)||void 0===o?void 0:o.package;yield L(g);const m=[];console.log("Running tests"),null!=n||(n={}),null!==(i=(a=n).testContext)&&void 0!==i||(a.testContext=new E),e.shell.clearLastError();const d=function(){const t=[];return console.log=(...e)=>{t.push(...e),l(...e)},console.info=(...e)=>{t.push(...e),c(...e)},console.warn=(...e)=>{t.push(...e),h(...e)},console.error=(...e)=>{t.push(...e),u(...e)},t}();(null==n?void 0:n.stressTest)?yield function(e){var n,s,o,i,a,l;return r(this,void 0,void 0,(function*(){let r=[];for(const[t,e]of Object.entries(f)){let t=null===(n=e.tests)||void 0===n?void 0:n.filter((t=>{var e;return null===(e=t.options)||void 0===e?void 0:e.stressTest}));e.stressTests&&(t=null===(s=e.tests)||void 0===s?void 0:s.filter((t=>{var e,n;return void 0===(null===(e=t.options)||void 0===e?void 0:e.stressTest)||!0===(null===(n=t.options)||void 0===n?void 0:n.stressTest)})));const a=null===(o=e.tests)||void 0===o?void 0:o.every((t=>{var e;return null===(e=t.options)||void 0===e?void 0:e.skipReason}));if(!a)for(let n of null!=t?t:[])null==(null===(i=n.options)||void 0===i?void 0:i.skipReason)&&r.push({test:n,value:e})}r=function(t){const e=t.slice();return e.sort((()=>Math.random()-.5)),e}(r);const c=[];for(let n of r){yield p(n.value.before,null!==(a=e.category)&&void 0!==a?a:"");let s=yield M(n.test,null==e?void 0:e.test,d,t.Test.isInBenchmark?n.value.benchmarkTimeout:n.value.timeout,g.name,e.verbose);s&&c.push(s),console.log(`Test: ${null==A?void 0:A.name}; result: ${s}`),yield p(n.value.after,null!==(l=e.category)&&void 0!==l?l:"")}m.push(...c)}))}(n):yield function(n,s){var o,i,a,f,y,C,x;return r(this,void 0,void 0,(function*(){try{for(const[r,c]of Object.entries(n)){if((null==s?void 0:s.category)&&!r.toLowerCase().startsWith(null==s?void 0:s.category.toLowerCase())||(null===(o=s.exclude)||void 0===o?void 0:o.some((t=>r.startsWith(t)))))continue;l(`Started ${r} category`);const n=null===(i=c.tests)||void 0===i?void 0:i.every((t=>{var e;return null===(e=t.options)||void 0===e?void 0:e.skipReason}));n||(c.beforeStatus=yield p(c.before,null!==(a=s.category)&&void 0!==a?a:""));const h=null!==(f=c.tests)&&void 0!==f?f:[],u=[];if(c.clear)for(let n=0;n<h.length;n++){h[n].options&&void 0===(null===(y=h[n].options)||void 0===y?void 0:y.benchmark)&&(h[n].options||(h[n].options={}),h[n].options.benchmark=null!==(C=c.benchmarks)&&void 0!==C&&C);let o=yield M(h[n],null==s?void 0:s.test,d,t.Test.isInBenchmark?c.benchmarkTimeout:c.timeout,g.name,s.verbose);o&&u.push(o),e.shell.closeAll(),t.Balloon.closeAll()}else for(let e=0;e<h.length;e++){let n=yield M(h[e],null==s?void 0:s.test,d,t.Test.isInBenchmark?c.benchmarkTimeout:c.timeout,g.name,s.verbose);n&&u.push(n)}const E=u.filter((t=>"skipped"!=t.result));n||(c.afterStatus=yield p(c.after,null!==(x=s.category)&&void 0!==x?x:"")),c.afterStatus&&E.push({date:(new Date).toISOString(),logs:"",category:r,name:"after",result:c.afterStatus,success:!1,ms:0,skipped:!1}),c.beforeStatus&&E.push({date:(new Date).toISOString(),logs:"",category:r,name:"before",result:c.beforeStatus,success:!1,ms:0,skipped:!1}),m.push(...E)}}finally{console.log=l,console.info=c,console.warn=h,console.error=u}if(s.testContext.catchUnhandled&&!t.Test.isInBenchmark){yield D(1e3);const t=yield e.shell.lastError,n={logs:"",date:(new Date).toISOString(),category:"Unhandled exceptions",name:"Exception",result:null!=t?t:"",success:!t,ms:0,skipped:!1};m.push(n),n.package=g.name,null!=e.shell.reportTest?yield e.shell.reportTest("package",n):yield fetch(`${e.dapi.root}/log/tests/package`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(n)})}}))}(f,n);for(let t of m)t.result=t.result.toString().replace(/"/g,"'"),null!=t.logs&&(t.logs=t.logs.toString().replace(/"/g,"'"));return m;function p(t,e){return r(this,void 0,void 0,(function*(){var n=void 0;try{void 0!==t&&(yield G((()=>r(this,void 0,void 0,(function*(){yield t()}))),1e5,`before ${e}: timeout error`))}catch(t){n=yield R(t)}return n}))}}))}function R(e){return r(this,void 0,void 0,(function*(){return`${e.toString()}\n${e.stack?yield t.Logger.translateStackTrace(e.stack):""}`}))}function M(n,s,o,c,h,f){var g,m,d,p,y,C,x,E;return r(this,void 0,void 0,(function*(){let r;o.length=0;let b="package";const A=null!=s&&n.name.toLowerCase()!==s.toLowerCase();let $=(null===(g=n.options)||void 0===g?void 0:g.skipReason)||A,P=A?"skipped":null===(m=n.options)||void 0===m?void 0:m.skipReason;if(t.Test.isInBenchmark&&!(null===(d=n.options)||void 0===d?void 0:d.benchmark))return void l(`SKIPPED: ${n.category} ${n.name} doesnt available in benchmark mode`);$||l(`Started ${n.category} ${n.name}`);const T=Date.now();try{if($)r={date:(new Date).toISOString(),success:!0,result:P,ms:0,skipped:!0};else{let e=(null===(p=n.options)||void 0===p?void 0:p.timeout)===i&&c?c:null===(y=n.options)||void 0===y?void 0:y.timeout;e=e===i&&t.Test.isInBenchmark?a:e,r={date:(new Date).toISOString(),success:!0,result:null!==(C=yield G(n.test,e))&&void 0!==C?C:"OK",ms:0,skipped:!1}}}catch(t){u(t),r={date:(new Date).toISOString(),success:!1,result:yield R(t),ms:0,skipped:!1}}if((null===(x=n.options)||void 0===x?void 0:x.isAggregated)&&r.result.constructor===t.DataFrame){const t=r.result.col("success");if(t&&(r.success=t.stats.sum===t.length),!f){const t=r.result;t.columns.remove("stack"),t.rows.removeWhere((t=>t.get("success"))),r.result=t}r.result=r.result.toCsv()}if(r.logs=o.join("\n"),r.ms=Date.now()-T,$||l(`Finished ${n.category} ${n.name} for ${r.ms} ms`),r.category=n.category,r.name=n.name,!A){let s={success:r.success,result:r.result,ms:r.ms,skipped:r.skipped,package:h,category:n.category,name:n.name,logs:r.logs};if(r.result.constructor==Object){const t=Object.keys(r.result).reduce(((t,e)=>Object.assign(Object.assign({},t),{["result."+e]:r.result[e]})),{});s=Object.assign(Object.assign({},s),t)}s.result instanceof t.DataFrame&&(s.result=JSON.stringify(null===(E=s.result)||void 0===E?void 0:E.toJson())||""),null!=e.shell.reportTest?yield e.shell.reportTest(b,s):yield fetch(`${e.dapi.root}/log/tests/${b}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(s)})}return r}))}function D(t){return r(this,void 0,void 0,(function*(){yield new Promise((e=>setTimeout(e,t)))}))}function G(t,e,n="EXECUTION TIMEOUT"){return r(this,void 0,void 0,(function*(){let s=null;const o=new Promise(((t,o)=>{s=setTimeout((()=>{o(n)}),e)}));try{return yield Promise.race([t(),o])}finally{s&&clearTimeout(s)}}))}t.DataFrame.fromColumns([t.Column.fromStrings("col",["val1","val2","val3"])]);const H=["A","G","C","U"];var S,F;(F=S||(S={})).HELM="HELM",F.AXOLABS="Axolabs";class k extends t.Package{async getTranslationHelper(){return await e.functions.call(`${this.name}:getTranslationHelper`)}}function V(t,e,n){return n.createFormatConverter(t,e).convertTo(S.HELM)}function K(t,e,n){return n.createFormatConverter(t,S.HELM).convertTo(e)}const B={Axolabs:{UfAfsCfsGfuacg:"RNA1{[fR](U)p.[fR](A)[sp].[fR](C)[sp].[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)}$$$$"},BioSpring:{"A*GC*123456789":"RNA1{r(A)[sp].r(G)p.r(C)[sp].[fR](U)p.[fR](A)p.[fR](C)p.[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)p.d([m5C])}$$$$"},Mermade12:{hefglijkLIJKHEFG:"RNA1{[25r](U)[sp].[25r](A)[sp].[25r](C)[sp].[25r](G)[sp].[fR](U)[sp].[fR](A)[sp].[fR](C)[sp].[fR](G)[sp].[fR](U)p.[fR](A)p.[fR](C)p.[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)}$$$$"}},W={"RNA1{[fR](U)p.[fR](A)[sp].[fR](C)[sp].[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)}$$$$":"UACGUACG","RNA1{r(A)[sp].r(G)p.r(C)[sp].[fR](U)p.[fR](A)p.[fR](C)p.[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)p}$$$$":"AGCUACGUACG","RNA1{[25r](U)[sp].[25r](A)[sp].[25r](C)[sp].[25r](G)[sp].[fR](U)[sp].[fR](A)[sp].[fR](C)[sp].[fR](G)[sp].[fR](U)p.[fR](A)p.[fR](C)p.[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)}$$$$":"UACGUACGUACGUACG"};v("Formats to HELM",(()=>{let t;w((async()=>{t=await Ht.getTranslationHelper()}));for(const e of Object.keys(B))for(const[n,s]of Object.entries(B[e]))A(`${e} to HELM`,(async()=>{const o=s;$(V(n,e,t),o)}))})),v("HELM to Formats",(()=>{let t;w((async()=>{t=await Ht.getTranslationHelper()}));for(const e of Object.keys(B))for(const[n,s]of Object.entries(B[e]))A(`${e} to HELM`,(async()=>{const o=n;$(K(s,e,t),o)}))}));const Y="<?>";function U(t,e){const n=new RegExp("\\([^()]*\\)","g"),s=t.match(n);return s?s.map((t=>{const n=t.replace(/[\[\]()]/g,"");return H.includes(n)?n:e.getNaturalAnalogBySymbol(n)})).map((t=>t||Y)).join(""):null}v("HELM to Nucleotides",(()=>{let t;w((async()=>{t=await Ht.getTranslationHelper()})),Object.entries(W).forEach((([e,n],s)=>{A(`Sequence ${s+1} to nucleotides`,(async()=>{const s=n;$(U(e,t.monomerLibWrapper),s)}))}))}));const q={[S.AXOLABS]:"Afcgacsu",[S.HELM]:"RNA1{[fR](A)p.[25r](C)p.[25r](G)p.[25r](A)p.[25r](C)[sp].[25r](U)}$$$$"};function j(t){return"string"==typeof t||t instanceof String?t:"StateError"===t.constructor.name?t.message:"StateError"===t.constructor.name&&"$thrownJsError"in t?j(t.$thrownJsError):t instanceof Error?t.message:t.toString()}function Q(t){return t instanceof Error?t.stack:"StateError"===t.constructor.name&&"$thrownJsError"in t?Q(t.$thrownJsError):void 0}function z(t){return[j(t),Q(t)]}v("Formats support",(()=>{let t;w((async()=>{t=await Ht.getTranslationHelper()})),Object.entries(q).forEach((([e,n])=>{A(`All formats for ${e}`,(async()=>{const s=function(t,e,n){return function(t,e,n,s){const o=Object.keys(s.jsonData.codesToHelmDict).concat([S.HELM]);if(!t||-1!==e&&n!==S.HELM)return{};if(!o.includes(n))throw new Error(`${n} format is not supported by SequenceTranslator`);const r=o.filter((t=>t!=n)).sort(((t,e)=>t.localeCompare(e))),i=s.createFormatConverter(t,n),a=Object.fromEntries(r.map((t=>{let e;try{e=i.convertTo(t)}catch{e=null}return[t,e]})).filter((([t,e])=>e))),l=U(n===S.HELM?t:a[S.HELM],s.monomerLibWrapper);return l&&(a.Nucleotides=l),a}(t,n.createSequenceValidator(t).getInvalidCodeIndex(e),e,n)}(n,e,t),o=Object.keys(s).length;$(!0,Object.keys(B).length+1<=o)}))}))})),v("files",(()=>{let e;w((async()=>{e=await Ht.getTranslationHelper()})),A("list",(async()=>{let n;const s=t.DataFrame.fromColumns([t.Column.string("subTest"),n=t.Column.bool("success"),t.Column.string("format"),t.Column.string("src"),t.Column.string("res"),t.Column.string("tgt"),t.Column.string("error"),t.Column.string("stack")]),o=await Ht.files.list("tests",!0,".csv");for(const n of o){const o=t.DataFrame.fromCsv(await n.readAsString()),r=o.columns.byIndex(0),i=r.name,a=o.columns.byIndex(1),l=o.rowCount;for(let t=0;t<l;++t){const o=s.rows.addNew();o.subTest=`${n.name}, row: ${t}`;try{const n=r.get(t),s=a.get(t);o.format=i,o.src=n,o.tgt=s,$(o.res=V(n,i,e),s),o.success=!0}catch(t){const[e,n]=z(t);o.error=e,o.stack=n,o.success=!1}}}0==s.rowCount&&s.rows.addNew(["empty",!0,"",""]);const r=n.toList().findIndex((t=>1!=t));if(-1!=r){const t=s.rows.get(r);throw new Error(`Subtest '${t.subTest}' failed: ${t.error}`)}return s}),{skipReason:"Can not create test in async manner based on files in Shares."})}));class J{constructor(t,e=!1){if(this._length=0,this._version=0,this._updateLevel=0,this._selectedCount=0,this._selectedCountVersion=-1,this._selectedIndexesVersion=-1,this._versionedName="",this._versionedNameVersion=-1,this.SHRINK_THRESHOLD=256,"number"==typeof t){const n=t,s=J._createBuffer(n);if(e)for(let t=0;t<s.length;t++)s[t]=-1;this._data=s,this._length=n}else{if(!(t instanceof Uint32Array))throw new Error("Invalid constructor");this._data=t,this._length=e}}getRawData(){return this._data}assureGoez(t,e){if(t<0)throw new Error(`${e} should be greater than zero`)}assureInRange(t,e,n,s){if(t<e||t>n)throw new Error(`Argument ${s} (${t}) out of range (${e}, ${n})`)}copy(t,e,n){for(let s=0;s<n;s++)e[s]=t[s]}copyFrom(t){if(this._length!=t._length)throw new Error(`Lengths differ (${this._length} != ${t._length})`);this.copy(t._data,this._data,this.lengthInInts),this._version++}get length(){return this._length}get buffer(){return this._data}set buffer(t){this._data=t,this._version++}get version(){return this._version}set version(t){this._version=t}incrementVersion(t=!0){this._version++}get lengthInInts(){return Math.floor((this._length+31)/32)}get versionedName(){return this._version==this._versionedNameVersion?this._versionedName:""}set versionedName(t){this._versionedName=t,this._versionedNameVersion=this._version}get self(){return this}setLength(t){if(t<0)throw new Error("should be >= 0");if(t==this._length)return;const e=Math.floor((t+31)/32);if(e>this._data.length||e+this.SHRINK_THRESHOLD<this._data.length){const t=new Uint32Array(e);this.copy(this._data,t,e>this._data.length?this._data.length:e),this._data=t}t>this._length&&(this._length%32>0&&(this._data[this.lengthInInts-1]&=(1<<(this._length%32&31))-1),this._data.fill(0,this.lengthInInts,e)),this._length=t,this._version++}static fromAnd(t,e){if(t._length!=e._length)throw new Error(`Lengths differ (${t._length} != ${e._length})`);const n=new J(t._length);n._length=t._length,n._data=J._createBuffer(n._length),n._version=0;const s=t.lengthInInts;for(let o=0;o<s;o++)n._data[o]=t._data[o]&e._data[o];return n}static _createBuffer(t){return new Uint32Array(Math.floor((t+31)/32))}static fromValues(t){const e=new J(t.length);e._version=0;for(let n=0;n<e._length;n++)t[n]&&(e._data[Math.floor(n/32)]|=1<<(n%32&31));return e}static fromSeq(t,e){const n=new J(t);for(let s=0;s<t;++s)n.setBit(s,e(s));return n._version=0,n}static fromString(t){return J.fromSeq(t.length,(e=>"1"==t.charAt(e)))}static fromUint32Array(t,e){const n=new J(t);return n._data=e,n}static fromBytes(t){const e=t.length,n=new J(8*e);n._data=new Uint32Array(Math.floor((e+3)/4)),n._length=8*e;let s=0,o=0;for(;e-o>=4;)n._data[s++]=255&t[o]|(255&t[o+1])<<8|(255&t[o+2])<<16|(255&t[o+3])<<24,o+=4;return e-o==3&&(n._data[s]=(255&t[o+2])<<16),e-o==2&&(n._data[s]|=(255&t[o+1])<<8),e-o==1&&(n._data[s]|=255&t[o]),n._version=0,n}toString(){return`${this._length} bits, ${this.countBits(!0)} set`}equals(t){if(this==t)return!0;if(null==t)return!1;if(this._length!=t._length)return!1;if(0==this._length)return!0;for(let e=0;e<this._data.length-1;e++)if(this._data[e]!=t._data[e])return!1;for(let e=8*(this._data.length-1);e<this._length;e++)if(this.getBit(e)!=t.getBit(e))return!1;return!0}clone(){const t=new J(0,!1);return t._data=Uint32Array.from(this._data),t._length=this._length,t._version=this._version,t}init(t,e){this.setAll(!1,!1);for(let e=0;e<this._length;e++)t(e)&&(this._data[Math.floor(e/32)]|=1<<(e%32&31));return this.incrementVersion(e),this}invert(t=!0){for(let t=0;t<this._data.length;t++)this._data[t]^=-1;this.incrementVersion(t)}setAll(t,e=!1){const n=t?-1:0,s=this.lengthInInts;for(let t=0;t<s;t++)this._data[t]=n;this.incrementVersion(e)}setIndexes(t,e=!0,n=!0,s=!0){n&&this.setAll(!e,!1);for(const n of t)this.setFast(n,e);this.incrementVersion(s)}everyIndex(t,e=!0){for(const n of t)if(this.getBit(n)!=e)return!1;return!0}anyIndex(t,e=!0){for(const n of t)if(this.getBit(n)==e)return!0;return!1}setWhere(t,e=!0,n=!0,s=!0,o=!0){if(n&&o&&this.setAll(!e,!1),o)for(let n=0;n<this._length;n++)t(n)&&this.setFast(n,e);else for(let n=0;n<this._length;n++)this.setFast(n,t(n)?e:!e);this.incrementVersion(s)}getRange(t,e){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length,"to");const n=[];for(let s=t;s<e;++s)n.push(this.getBit(s));return J.fromValues(n)}getRangeAsList(t,e){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length,"to");const n=[];for(let s=t;s<e;++s)n.push(this.getBit(s));return n}setRange(t,e,n,s=!0){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length-1,"to");const o=Math.min(t,e),r=Math.max(t,e);if(n)for(let t=o;t<=r;t++)this.setTrue(t);else for(let t=o;t<=r;t++)this.setFalse(t);return this.incrementVersion(s),this}setRandom(t,e,n=!0){if(t<0||t>this._length)throw new Error("n must be >= 0 && <= Count");t>this._length/2&&this.setRandom(this._length-t,!e),this.setAll(!e);for(let n=0;n<t;){const t=Math.floor(Math.random()*this._length);this.getBit(t)!=e&&(this.setFast(t,e),n++)}this.incrementVersion(n)}and(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]&=t._data[e];return this.incrementVersion(e),this}andNot(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");const n=this.lengthInInts;for(let e=0;e<n;e++)this._data[e]&=~t._data[e];return this.incrementVersion(e),this}notAnd(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]=~this._data[e]&t._data[e];return this.incrementVersion(e),this}not(t=!0){for(let t=0,e=this.lengthInInts;t<e;t++)this._data[t]=~this._data[t];return this.incrementVersion(t),this}or(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]|=t._data[e];return this.incrementVersion(e),this}xor(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]^=t._data[e];return this.incrementVersion(e),this}insertAt(t,e,n=!1){if(this.assureInRange(t,0,this._length,"pos"),0==e)return;const s=this._length;this.setLength(this._length+e);for(let n=s-1;n>=t;n--)this.setBit(n+e,this.getBit(n));for(let s=t;s<t+e;s++)this.setBit(s,n)}removeAt(t,e=1){if(e<0)throw new Error("n cannot be negative");if(this.assureInRange(t,0,this._length-e,"pos"),this.contains(!0))for(let n=t;n<this._length-e;n++)this.setBit(n,this.getBit(n+e));this.setLength(this._length-e)}removeByMask(t,e=!0){if(this._length!=t.length)throw new Error("length != mask.length");if(t==this)this.setLength(t.countBits(!e)),this.setAll(!e);else{let n=0;for(let s=-1;-1!=(s=t.findNext(s,!e));)this.setFast(n++,this.getBit(s));this._length=n,this._version++}return this}getBit(t){return!!(this._data[Math.floor(t/32)]&1<<(31&t))}setBit(t,e,n=!0){this.setFast(t,e),this._version++}setFast(t,e){e?this._data[Math.floor(t/32)]|=1<<(31&t):this._data[Math.floor(t/32)]&=~(1<<(31&t))}setTrue(t){this._data[Math.floor(t/32)]|=1<<(31&t)}setFalse(t){this._data[Math.floor(t/32)]&=~(1<<(31&t))}trueCount(){return this.countBits(!0)}falseCount(){return this.countBits(!1)}countBits(t){if(0==this._length)return 0;if(this._selectedCountVersion!=this._version){this._selectedCount=0;const t=this.lengthInInts;let e=0;for(;e<t-1;e++)for(let t=this._data[e];0!=t;t>>>=8)this._selectedCount+=J._onBitCount[255&t];let n=this._data[e];const s=31&this._length;for(0!=s&&(n&=~(4294967295<<s));0!=n;n>>>=8)this._selectedCount+=J._onBitCount[255&n];this._selectedCountVersion=this._version}return t?this._selectedCount:this._length-this._selectedCount}countWhere(t){let e=0;if(this.trueCount()==this._length)for(let n=0;n<this._length;n++)e+=t(n)?1:0;else for(let n=-1;-1!=(n=this.findNext(n,!0));)e+=t(n)?1:0;return e}andWithCountBits(t,e){if(0==this._length)return 0;let n=0;const s=this.lengthInInts;let o=0;for(;o<s-1;o++)for(let e=this._data[o]&t._data[o];0!=e;e>>>=8)n+=J._onBitCount[255&e];let r=this._data[o]&t._data[o];const i=31&this._length;for(0!=i&&(r&=~(4294967295<<i));0!=r;r>>>=8)n+=J._onBitCount[255&r];return e?n:this._length-n}clear(){this.setLength(0)}contains(t){return this.findNext(-1,t)>=0}get allTrue(){return this.countBits(!0)==this._length}get allFalse(){return this.countBits(!1)==this._length}get anyTrue(){return this.countBits(!0)>0}get anyFalse(){return this.countBits(!1)>0}findNext(t,e=!0){if(this.assureInRange(t,-1,this._length,"index"),t>=this._length-1)return-1;let n=31&(t=t<0?0:t+1);const s=this.lengthInInts;for(let o=Math.floor(t/32);o<s;o++){let s=e?this._data[o]:~this._data[o];if(0!=n)s&=4294967295<<n&4294967295,n=0;else if(!e&&-4294967296==s)continue;for(let e=0;0!=s;e+=8,s>>>=8){const n=J._firstOnBit[255&s];if(n>=0)return(t=n+32*o+e)>=this._length?-1:t}}return-1}findPrev(t,e=!0){if(0==t)return-1;this.assureInRange(t,-1,this._length,"index");let n=1+(t=t<0?this._length-1:t-1)&31;for(let s=Math.floor(t/32);s>=0;s--){let t=e?this._data[s]:~this._data[s];0!=n&&(t&=~(4294967295<<n),n=0);for(let e=24;0!=t;e-=8,t<<=8){const n=J._lastOnBit[t>>>24];if(n>=0)return n+32*s+e}}return-1}}var X,Z,tt,et,nt,st,ot;J._onBitCount=Int8Array.from([0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8]),J._firstOnBit=Int8Array.from([-1,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0]),J._lastOnBit=Int8Array.from([-1,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7]),function(t){t.Levenshtein="Levenshtein",t.JaroWinkler="Jaro-Winkler",t.Manhattan="Manhattan",t.Onehot="One-Hot"}(X||(X={})),function(t){t.Euclidean="Euclidean"}(Z||(Z={})),function(t){t.Tanimoto="Tanimoto",t.Dice="Dice",t.Asymmetric="Asymmetric",t.BraunBlanquet="Braun-Blanquet",t.Cosine="Cosine",t.Kulczynski="Kulczynski",t.McConnaughey="Mc-Connaughey",t.RogotGoldberg="Rogot-Goldberg",t.Russel="Russel",t.Sokal="Sokal",t.Hamming="Hamming",t.Euclidean="Euclidean"}(tt||(tt={})),function(t){t.TanimotoIntArray="TanimotoIntArray"}(et||(et={})),function(t){t.Vector="Vector",t.String="String",t.BitArray="BitArray",t.MacroMolecule="MacroMolecule",t.Number="Number",t.IntArray="IntArray",t.NumberArray="NumberArray"}(nt||(nt={})),function(t){t.Difference="Difference"}(st||(st={})),function(t){t.CommonItems="Common Items"}(ot||(ot={}));new Uint32Array(65536);var rt,it,at,lt,ct,ht,ut,ft;(it=rt||(rt={})).HAMMING="Hamming",it.LEVENSHTEIN="Levenshtein",it.NEEDLEMANN_WUNSCH="Needlemann-Wunsch",it.MONOMER_CHEMICAL_DISTANCE="Monomer chemical distance",rt.HAMMING,rt.LEVENSHTEIN,rt.NEEDLEMANN_WUNSCH,rt.MONOMER_CHEMICAL_DISTANCE,tt.Tanimoto,tt.Dice,tt.Asymmetric,tt.BraunBlanquet,tt.Cosine,tt.Kulczynski,tt.McConnaughey,tt.RogotGoldberg,tt.Russel,tt.Sokal,tt.Hamming,tt.Euclidean,tt.Tanimoto,tt.Dice,tt.Asymmetric,tt.BraunBlanquet,tt.Cosine,tt.Kulczynski,tt.McConnaughey,tt.RogotGoldberg,tt.Russel,tt.Sokal,tt.Hamming,tt.Euclidean,tt.Tanimoto,tt.Dice,tt.Cosine,tt.Tanimoto,tt.Asymmetric,tt.Cosine,tt.Sokal,rt.HAMMING,rt.LEVENSHTEIN,rt.MONOMER_CHEMICAL_DISTANCE,rt.NEEDLEMANN_WUNSCH,new RegExp("[rd]\\((\\w)\\)p?","g"),wu;class gt{constructor(t,e,n){this.name=t,this.alphabet=e,this.cutoff=n}}(ft=at||(at={})).FASTA="fasta",ft.SEPARATOR="separator",ft.HELM="helm",ft.CUSTOM="custom",(ut=lt||(lt={})).DNA="DNA",ut.RNA="RNA",ut.PT="PT",ut.UN="UN",(ht=ct||(ct={})).aligned="aligned",ht.alphabet="alphabet",ht.alphabetSize=".alphabetSize",ht.alphabetIsMultichar=".alphabetIsMultichar",ht.separator="separator",ht.isHelmCompatible=".isHelmCompatible",ht.positionNames=".positionNames",ht.positionLabels=".positionLabels",ht.regions=".regions";const mt=new class{constructor(){this.fasta={peptide:new Set(["G","L","Y","S","E","Q","D","N","F","A","K","R","H","C","V","P","W","I","M","T"]),dna:new Set(["A","C","G","T"]),rna:new Set(["A","C","G","U"])}}};new gt(lt.PT,mt.fasta.peptide,.5),new gt(lt.DNA,mt.fasta.dna,.55),new gt(lt.RNA,mt.fasta.rna,.55),at.FASTA,at.SEPARATOR,at.HELM;class dt{static makePalette(t,e=!1,n=dt){const s={};return t.forEach((t=>{const n=t[0],o=t[1];n.forEach(((t,n)=>{s[t]=this.colourPalette[o][e?0:n]}))})),new n(s)}constructor(t){this._palette=t}get(t,e){return this._palette[t]}}dt.undefinedColor="rgb(100,100,100)",dt.colourPalette={orange:["rgb(255,187,120)","rgb(245,167,100)","rgb(235,137,70)","rgb(205, 111, 71)"],all_green:["rgb(44,160,44)","rgb(74,160,74)","rgb(23,103,57)","rgb(30,110,96)","rgb(60,131,95)","rgb(24,110,79)","rgb(152,223,138)","rgb(182, 223, 138)","rgb(152, 193, 138)"],all_blue:["rgb(31,119,180)","rgb(23,190,207)","rgb(122, 102, 189)","rgb(158,218,229)","rgb(141, 124, 217)","rgb(31, 120, 150)"],magenta:["rgb(162,106,192)","rgb(197,165,224)","rgb(208,113,218)"],red:["rgb(214,39,40)","rgb(255,152,150)"],st_blue:["rgb(23,190,207)","rgb(158,218,229)","rgb(31,119,180)"],dark_blue:["rgb(31,119,180)","rgb(31, 120, 150)"],light_blue:["rgb(23,190,207)","rgb(158,218,229)","rgb(108, 218, 229)","rgb(23,190,227)"],lilac_blue:["rgb(124,102,211)","rgb(149,134,217)","rgb(97, 81, 150)"],dark_green:["rgb(23,103,57)","rgb(30,110,96)","rgb(60,131,95)","rgb(24,110,79)"],green:["rgb(44,160,44)","rgb(74,160,74)"],light_green:["rgb(152,223,138)","rgb(182, 223, 138)","rgb(152, 193, 138)"],st_green:["rgb(44,160,44)","rgb(152,223,138)","rgb(39, 174, 96)","rgb(74,160,74)"],pink:["rgb(247,182,210)"],brown:["rgb(140,86,75)","rgb(102, 62, 54)"],gray:["rgb(127,127,127)","rgb(199,199,199)","rgb(196,156,148)","rgb(222, 222, 180)"],yellow:["rgb(188,189,34)"],white:["rgb(230,230,230)"]};class pt extends dt{static get Lesk(){return void 0===this.lesk&&(this.lesk=this.makePalette([[["G","A","S","T"],"orange"],[["C","V","I","L","P","F","Y","M","W"],"all_green"],[["N","Q","H"],"magenta"],[["D","E"],"red"],[["K","R"],"all_blue"]],!1,pt)),this.lesk}static get GrokGroups(){return void 0===this.grokGroups&&(this.grokGroups=this.makePalette([[["C","U"],"yellow"],[["G","P"],"red"],[["A","V","I","L","M","F","Y","W"],"all_green"],[["R","H","K"],"light_blue"],[["D","E"],"dark_blue"],[["S","T","N","Q"],"orange"]],!1,pt)),this.grokGroups}static get RasMol(){return void 0===this.rasMol&&(this.rasMol=new pt({D:"#E60A0A",E:"#E60A0A",C:"#E6E600",M:"#E6E600",K:"#145AFF",R:"#145AFF",S:"#FA9600",T:"#FA9600",F:"#3232AA",Y:"#3232AA",N:"#00DCDC",Q:"#00DCDC",G:"#EBEBEB",L:"#0F820F",V:"#0F820F",I:"#0F820F",A:"#C8C8C8",W:"#B45AB4",H:"#8282D2",P:"#DC9682",others:"#BEA06E"})),this.rasMol}get(t){const e=t in pt.aaSynonyms?pt.aaSynonyms[t]:t;return super.get(e)}}pt.aaSynonyms={MeNle:"L",MeA:"A",MeG:"G",MeF:"F"};class yt{static getPalette(t="grok"){switch(t){case"grok":return pt.GrokGroups;case"lesk":return pt.Lesk;default:throw new Error(`ChemPalette: scheme \`${t}\` does not exist`)}}static getInnerOuter(t){let e=0,n="",s="";for(const o of t)"("==o?e++:")"==o?e--:e?n+=o:s+=o;return isNaN(parseInt(n))?[s,n]:[s,""]}static getColorAAPivot(t="",e="grok"){const n=this.getPalette(e);let[s,o]=this.getInnerOuter(t);if(s=s.length>6?`${s.slice(0,3)}...`:s,o=o.length>6?`${o.slice(0,3)}...`:o,1==t.length||"("==t[1]){const e=t[0]?.toUpperCase();return e in n?[n.get(e),e,o,1]:[this.undefinedColor,s,o,1]}if("d"==t[0]&&t[1]in n&&(2==t.length||"("==t[2])){const e=t[1]?.toUpperCase();return e in n?[n.get(e),e,o,2]:[this.undefinedColor,s,o,2]}if(t.substring(0,3)in this.AAFullNames&&(3==t.length||"("==t[3])){const e=this.AAFullNames[t.substring(0,3)];return e in n?[n.get(e),e,o,3]:[this.undefinedColor,s,o,3]}if(t[0]?.toLowerCase()==t[0]&&t.substring(1,3)in this.AAFullNames&&(4==t.length||"("==t[4])){const e=this.AAFullNames[t.substring(1,3)];return e in n?[n.get(e),e,o,4]:[this.undefinedColor,s,o,4]}return[this.undefinedColor,s,o,0]}}yt.SemType="Aminoacids",yt.SemTypeMultipleAlignment="AminoacidsMultipleAlignment",yt.undefinedColor="rgb(100,100,100)",yt.Names={G:"Glycine",L:"Leucine",Y:"Tyrosine",S:"Serine",E:"Glutamic acid",Q:"Glutamine",D:"Aspartic acid",N:"Asparagine",F:"Phenylalanine",A:"Alanine",K:"Lysine",R:"Arginine",H:"Histidine",C:"Cysteine",V:"Valine",P:"Proline",W:"Tryptophan",I:"Isoleucine",M:"Methionine",T:"Threonine"},yt.AASmiles={G:"NCC(=O)O",L:"N[C@H](CC(C)C)C(=O)O",Y:"NC(CC1=CC=C(O)C=C1)C(=O)O",S:"NC(CO)C(=O)O",E:"N[C@@H](CCC(O)=O)C(=O)O",Q:"N[C@@H](CCC(N)=O)C(=O)O",D:"N[C@@H](CC(O)=O)C(=O)O",N:"N[C@@H](CC(N)=O)C(=O)O",F:"NC(CC1=CC=CC=C1)C(=O)O",A:"N[C@H](C)C(=O)O",K:"NC(CCCCN)C(=O)O",R:"N[C@H](CCCNC(=N)C)C(=O)O",H:"NC(CC1=CN=C[N]1)C(=O)O",C:"N[C@@H](CS)C(=O)O",V:"NC(C(C)C)C(=O)O",P:"N(CCC1)C1C(=O)O",W:"N[C@@H](Cc1c2ccccc2n([H])c1)C(=O)O",I:"N[C@H]([C@H](C)CC)C(=O)O",M:"NC(CCSC)C(=O)O",T:"NC(C(O)C)C(=O)O"},yt.AASmilesTruncated={G:"*C*",L:"CC(C)C[C@H](*)*",Y:"C1=CC(=CC=C1CC(*)*)O",S:"OCC(*)C*",E:"*[C@@H](CCC(O)=O)*",Q:"*N[C@@H](CCC(N)=O)*",D:"*[C@@H](CC(O)=O)*",N:"*[C@@H](CC(N)=O)*",F:"C1=CC=C(C=C1)CC(*)*",A:"C[C@H](*)*",K:"C(CCN)CC(*)*",R:"*[C@H](CCCNC(=N)C)*",H:"C1=C(NC=N1)CC(*)*",C:"C([C@@H](*)*)S",V:"CC(C)C(*)*",P:"C1CCN(*)C1*",W:"*[C@@H](Cc1c2ccccc2n([H])c1)*",I:"CC[C@H](C)[C@H](*)*",M:"CSCCC(*)*",T:"CC(O)C(*)*"},yt.AAFullNames={Ala:"A",Arg:"R",Asn:"N",Asp:"D",Cys:"C",Gln:"Q",Glu:"E",Gly:"G",His:"H",Ile:"I",Leu:"L",Lys:"K",Met:"M",Phe:"F",Pro:"P",Ser:"S",Thr:"T",Trp:"W",Tyr:"Y",Val:"V"};class Ct{}function xt(e,n=!0){if(null==e)return"rgb(100,100,100)";const s=t.Color.fromHtml(e);if(n){const e=t.Color.g(s),n=t.Color.r(s),o=t.Color.b(s),r=Math.sqrt(Math.pow(0-n,2)+Math.pow(0-e,2)+Math.pow(0-o,2));if(r>210)return`rgb(${n/r*210},${e/r*210},${o/r*210})`}return t.Color.toRgb(s)}Ct.SemType="Nucleotides",Ct.SemTypeMultipleAlignment="NucleotidesMultipleAlignment",Ct.Names={A:"Adenine",C:"Cytosine",G:"Guanine",T:"Thymine",U:"Uracil"};class Et{static hashCode(t){let e=0;if(0===t.length)return e;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return e}}class bt{}class At extends bt{static buildPalette(){return $t().then((t=>{t.awaitLoaded().then((()=>{const e=t.getMonomerLib();e.onChanged.subscribe((()=>{At.customMonomerColors={},At.polymerTypes=e.getPolymerTypes();for(const t of this.polymerTypes){const n=e.getMonomerSymbolsByType(t);for(const s of n){const n=e.getMonomer(t,s);n?.meta?.colors?.default?.background&&(this.customMonomerColors[s]||(this.customMonomerColors[s]={}),this.customMonomerColors[s][t]=xt(n.meta.colors.default.background,!1))}}}))}))})),[].concat(...Object.values(dt.colourPalette))}get(t,e){const n=At.customMonomerColors[t],s=e??"PEPTIDE";if(n&&n[s])return n[s];const o=Et.hashCode(t)%At.palette.length;return xt(At.palette[o])}}async function $t(){const e=t.Func.find({package:"Bio",name:"getMonomerLibHelper"});if(0===e.length)throw new Error('Package "Bio" must be installed for MonomerLibHelper.');return(await e[0].prepare().call()).getOutputParamValue()}At.palette=At.buildPalette(),At.customMonomerColors={},At.polymerTypes=[],new class{constructor(){this.seqHandler="seq-handler",this.notationProvider="seq-handler.notation-provider"}};const Pt="Libraries";let Tt=Promise.resolve();async function Nt(){let t;return Tt=Tt.then((async()=>{const n=await e.dapi.userDataStorage.getValue(Pt,"Settings",!0);t=n?JSON.parse(n):{exclude:[],explicit:[],duplicateMonomerPreferences:{}},t.exclude=t.exclude instanceof Array?t.exclude:[],t.explicit=t.explicit instanceof Array?t.explicit:[],t.duplicateMonomerPreferences=t.duplicateMonomerPreferences instanceof Object?t.duplicateMonomerPreferences:{},console.debug(`Bio: getUserLibSettings()\n${JSON.stringify(t,void 0,2)}`)})),await Tt,t}async function vt(t){Tt=Tt.then((async()=>{console.debug(`Bio: setUserLibSettings()\n${JSON.stringify(t,void 0,2)}`),await e.dapi.userDataStorage.postValue(Pt,"Settings",JSON.stringify(t),!0)})),await Tt}class wt{constructor(t,e){this.linkages=e,this.monomers=t}static fromHelm(t){const e=t.split("$"),n=e[0].split("|"),s=e[1].split("|"),o=new Array(n.length),r=[];for(let t=0;t<n.length;t++){const e=n[t].indexOf("{"),s=n[t].indexOf("}");o[t]=n[t].slice(e+1,s).split(".")}for(let t=0;t<s.length;t++)if(""!==s[t]&&"V2.0"!==s[t]){const e=s[t].split(","),n=e[0].replace("PEPTIDE","")-1,o=e[1].replace("PEPTIDE","")-1,i=e[2].split("-"),a=i[0].split(":"),l=i[1].split(":");r.push({fChain:n,sChain:o,fMonomer:a[0],sMonomer:l[0],fR:a[1].replace("R",""),sR:l[1].replace("R","")})}return new wt(o,r)}static fromNotation(t,e){const n=e.heterodimerCode,s=e.homodimerCode,o=[],r=[],i=null!==n?t.split(`(${e.heterodimerCode})`):"";null!==n&&i.length>1?(r.push({fChain:0,sChain:1,fMonomer:1,sMonomer:1,fR:1,sR:1}),o.push(i[1].replaceAll("{","").replaceAll("}","")),o.push(i[2].replaceAll("{","").replaceAll("}",""))):o.push(t);for(let t=0;t<o.length;t++)if(null!==s&&o[t].includes(`(${s})`)){const e=o.length;r.push({fChain:t,sChain:e,fMonomer:1,sMonomer:1,fR:1,sR:1});const n=o[t].replace(`(${s})`,""),i=n.indexOf("{"),a=n.slice(0,i),l=n.replace(a,"").replaceAll("{","").replaceAll("}","");o[t]=a+l,o.push(l)}for(let t=0;t<o.length;t++)if(null!==s&&o[t].includes(`(${s})`)){const e=o.length;r.push({fChain:t,sChain:e,fMonomer:1,sMonomer:1,fR:1,sR:1});const n=o[t].replace(`(${s})`,""),i=n.indexOf("{"),a=n.slice(0,i),l=n.replace(a,"").replaceAll("{","").replaceAll("}","");o[t]=a+l,o.push(l)}const a=new Array(o.length);for(let t=0;t<o.length;t++){const n=o[t].split("-"),s=this.getLinkedPositions(n,e.linkRules),[i,l,c,h,u]=this.getAllCycles(e.linkRules,n,s);new Array(i.length);for(let e=0;e<l.length;e++)r.push({fChain:t,sChain:t,fMonomer:l[e],sMonomer:c[e],fR:h[e],sR:u[e]});a[t]=i}const l=[];for(let t=0;t<a.length;t++){const n=this.getLinkedPositions(a[t],e.reactionRules),[s,o,i,c]=this.getAllReactants(e.reactionRules,a[t],n);if(o.length>=1){const t=new Array(i[0]-1),n=new Array(s.length-i[0]);for(let e=0;e<i[0]-1;e++)t[e]=s[e];for(let t=i[0];t<s.length;t++)n[t-i[0]]=s[t];t[o[0]-1]=e.reactionRules[c[0]].name;for(let t=0;t<r.length;t++)r[t].fMonomer>i[0]&&(r[t].fMonomer-=i[0],r[t].fChain++),r[t].sMonomer>i[0]&&(r[t].sMonomer-=i[0],r[t].sChain++);r.push({fChain:0,sChain:0,fMonomer:o[0],sMonomer:i[0]-1,fR:3,sR:2}),r.push({fChain:0,sChain:1,fMonomer:o[0],sMonomer:1,fR:4,sR:1});const a=new Array(t.length);for(let e=0;e<t.length;e++)a[e]=`[${t[e]}]`;const h=new Array(n.length);for(let t=0;t<n.length;t++)h[t]=`[${n[t]}]`;l.push(t),l.push(n)}else l.push(a[t])}return new wt(l,r)}getHelmChanged(t,e){let n=0,s=0,o=0;t:for(let e=0;e<this.monomers.length;e++)for(let r=0;r<this.monomers[e].length;r++){if(n==t){s=e,o=r;break t}n++}const r=this.monomers[s][o];this.monomers[s][o]=`[${e}]`;const i=this.getHelm();return this.monomers[s][o]=r,i}getHelm(){let t="";for(let e=0;e<this.monomers.length;e++){e>0&&(t+="|"),t+=`PEPTIDE${e+1}{`;for(let n=0;n<this.monomers[e].length;n++){n>0&&(t+=".");const s=this.monomers[e][n];t+=s.length>1?`[${s}]`:s}t+="}"}t+="$";for(let e=0;e<this.linkages.length;e++)e>0&&(t+="|"),t+=`PEPTIDE${this.linkages[e].fChain+1},PEPTIDE${this.linkages[e].sChain+1},`,t+=`${this.linkages[e].fMonomer}:R${this.linkages[e].fR}-`,t+=`${this.linkages[e].sMonomer}:R${this.linkages[e].sR}`;return t+="$$$",t}getNotation(t){return"not implemented"}static getLinkedPositions(t,e){const n=new Array(e.length);for(let s=0;s<e.length;s++){let o=!1,r=!1,i=!1,a=-1,l=-1;const c=`(${e[s].code})`;for(let n=0;n<t.length;n++)if(t[n].includes(c)){if(o){if(i&&t[n]==e[s].secondMonomer+c){r=!0,l=n;break}if(i||t[n]!=e[s].firstMonomer+c)continue;r=!0,l=n;break}if(t[n]==e[s].firstMonomer+c)o=!0,i=!0,a=n;else{if(t[n]!=e[s].secondMonomer+c)continue;o=!0,i=!1,a=n}}n[s]=o&&r?i?[a,l,s]:[l,a,s]:[-1,-1,-1]}return n}static getAllCycles(t,e,n){const s=[],o=[],r=[],i=[],a=t.length;for(let l=0;l<a;l++){if(-1==n[l][0])continue;const a=e[n[l][0]],c=e[n[l][1]];e[n[l][0]]=e[n[l][0]].replace(a,t[l].firstSubstitution),e[n[l][1]]=e[n[l][1]].replace(c,t[l].secondSubstitution),s.push(n[l][0]+1),o.push(n[l][1]+1),r.push(t[l].firstLinkingGroup),i.push(t[l].secondLinkingGroup)}return[e,s,o,r,i]}static getAllReactants(t,e,n){const s=[],o=[],r=[],i=t.length;for(let a=0;a<i;a++){if(-1==n[a][0])continue;const i=e[n[a][0]],l=e[n[a][1]];e[n[a][0]]=e[n[a][0]].replace(i,t[a].firstMonomer),e[n[a][1]]=e[n[a][1]].replace(l,t[a].secondMonomer),s.push(n[a][0]+1),o.push(n[a][1]+1),r.push(n[a][2])}return[e,s,o,r]}}function Ot(t,e){const n=new Array(t.length);for(let s=0;s<t.length;s++)if(null==t[s])n[s]="";else{const o=wt.fromNotation(t[s],e);n[s]=o.getHelm()}return n}const _t=ui,Lt="System:AppData/SequenceTranslator/polytool-rules/";async function It(n){const s=new t.FileSource(Lt),o=[],r=[],i={homodimerCode:null,heterodimerCode:null,linkRules:o,reactionRules:r};for(let t=0;t<n.length;t++){const a=await s.readAsText(n[t].replace(Lt,"")),l=JSON.parse(a);for(let t=0;t<l.length;t++)if(void 0!==l[t].type&&void 0!==l[t].code)switch(l[t].type){case"link":{const e=l[t].monomericSubstitution;e.code=l[t].code,o.push(e);break}case"reaction":{const e=l[t].monomericSubstitution;e.code=l[t].code,r.push(e);break}case"fragmentDuplication":i.homodimerCode&&e.shell.warning("PolyTool: homodimer code is duplicated in rules."),i.homodimerCode=l[t].code;break;case"differentFragments":i.heterodimerCode&&e.shell.warning("PolyTool: heterodimer code is duplicated in rules."),i.heterodimerCode=l[t].code;break;default:e.shell.warning(`PolyTool: Unexpected type - '${l[t]}'.`)}else e.shell.warning("Polytool: rules contain invalid rule")}return i}async function Rt(){const e="Helm",n=t.Func.find({package:e,name:"getHelmHelper"});if(0===n.length)throw new Error(`Package '${e}' must be installed for HelmHelper.`);return(await n[0].prepare().call()).getOutputParamValue()}var Mt;function Dt(t,e,n,s){const o=new Array(s.length*(n-e+1));for(let r=0;r<s.length;++r){const i=n-e+1;for(let n=0;n<i;++n){const a=e+n,l=s[r],c=o[r*i+n]=t.clone(),h=c.atoms[a].elem;c.atoms[a].elem=l;const u=h?.length>1?`[${h}]`:h,f=l?.length>1?`[${l}]`:l;c.name=`${t.name}-${u}${a+1}${f}`}}return o}function Gt(t,e,n){const s=new JSDraw2.MolHandler,o=new org.helm.webeditor.Plugin(s);org.helm.webeditor.IO.parseHelm(o,t,new JSDraw2.Point(0,0),void 0);const r=s.m;r.name=e;let i=[];if(n.placeholders)switch(n.type){case Mt.Single:i=function(t,e){return e.map((e=>Dt(t,e.position,e.position,e.monomers))).reduce(((t,e)=>t.concat(e)),[])}(s.m,n.placeholders);break;case Mt.Matrix:i=function(t,e){let n=[t];for(const t of e){const e=n.map((e=>Dt(e,t.position,t.position,t.monomers)));n=e.reduce(((t,e)=>t.concat(e)),[])}return n}(s.m,n.placeholders)}let a=[];n.placeholdersBreadth&&(a=function(t,e){let n=[t];for(const t of e){const e=n.map((e=>Dt(e,t.start,t.end,t.monomers)));n=e.reduce(((t,e)=>t.concat(e)),[])}return n}(s.m,n.placeholdersBreadth)),i=i.concat(a),n.keepOriginal&&(i=[r,...i]);const l=i.map((t=>[org.helm.webeditor.IO.getHelm(t),t.name]));return l}v("PolyTool: Convert",(()=>{let n,s;w((async()=>{n=await $t(),s=await Nt(),await n.loadMonomerLibForTests()})),O((async()=>{await vt(s),await n.loadMonomerLib(!0)}));const o={cyclized:{src:["R-F-C(1)-T-G-H-F-Y-P-C(1)-meI","C(1)-T-G-H-F-Y-P-C(1)-meI","R-F-C(1)-T-G-H-F-Y-P-C(1)","C(1)-T-G-H-F-H-P-C(1)","R-F-D(2)-T-G-H-F-Y-P-NH2(2)"],tgt:["PEPTIDE1{R.F.C.T.G.H.F.Y.P.C.[meI]}$PEPTIDE1,PEPTIDE1,3:R3-10:R3$$$","PEPTIDE1{C.T.G.H.F.Y.P.C.[meI]}$PEPTIDE1,PEPTIDE1,1:R3-8:R3$$$","PEPTIDE1{R.F.C.T.G.H.F.Y.P.C}$PEPTIDE1,PEPTIDE1,3:R3-10:R3$$$","PEPTIDE1{C.T.G.H.F.H.P.C}$PEPTIDE1,PEPTIDE1,1:R3-8:R3$$$","PEPTIDE1{R.F.D.T.G.H.F.Y.P.[NH2]}$PEPTIDE1,PEPTIDE1,10:R2-3:R3$$$"]}};for(const[t,e]of Object.entries(o))A(`${t}`,(async()=>{const t=await It(["rules_example.json"]);N(Ot(e.src,t),e.tgt)}));A("ui-col-wo-table",(async()=>{const n=Ht.name,s=t.Column.fromStrings("seq",o.cyclized.src),r=await e.functions.call(`${n}:polyToolConvert2`,{seqCol:s,generateHelm:!0,chiralityEngine:!0,rules:["rules_example.json"]});$(r.semType,t.SEMTYPE.MACROMOLECULE),$(r.meta.units,at.HELM),$(r.dataFrame,null)})),A("ui-col",(async()=>{const n=Ht.name,s=t.Column.fromStrings("seq",o.cyclized.src),i=t.DataFrame.fromColumns([s]),a=e.shell.addTableView(i),l=await e.functions.call(`${n}:polyToolConvert2`,{seqCol:s,generateHelm:!0,chiralityEngine:!0,rules:["rules_example.json"]});$(l.semType,t.SEMTYPE.MACROMOLECULE),$(l.meta.units,at.HELM),$(l.dataFrame.id,i.id),await function(t,e,n,s=0,o="timeout"){return r(this,void 0,void 0,(function*(){return new Promise(((r,i)=>{const a=t.subscribe((t=>{try{e(t),r("OK")}catch(t){i(t)}finally{a.unsubscribe(),clearTimeout(l)}})),l=setTimeout((()=>{a.unsubscribe(),i(o)}),s);n()}))}))}(a.grid.onAfterDrawContent,(()=>{}),(async()=>{a.grid.invalidate()}),15e3),$(l.getTag(t.TAGS.CELL_RENDERER),"helm")}))})),t.JsInputBase,Error,_t.input.helmAsync=async function(t,e){return(await Rt()).createHelmInput(t,e)},function(t){t.Single="single",t.Matrix="matrix"}(Mt||(Mt={})),v("PolyTool: Enumerate",(()=>{let t,e,n;w((async()=>{t=await Rt(),e=await $t(),n=await Nt(),await e.loadMonomerLibForTests()})),O((async()=>{await vt(n),await e.loadMonomerLib(!0)}));const s={single1:{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:Mt.Single,placeholders:[{position:4,monomers:["K","P","F4COO"]},{position:6,monomers:["Y","T"]}]},tgt:[{seq:"PEPTIDE1{[Ac(1)].F.W.G.K.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5P"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.[F4COO].L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5[F4COO]"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-[Tic]7T"}]},"single-with-original":{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:Mt.Single,placeholders:[{position:4,monomers:["K","P","F4COO"]},{position:6,monomers:["Y","T"]}],keepOriginal:!0},tgt:[{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:""},{seq:"PEPTIDE1{[Ac(1)].F.W.G.K.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5P"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.[F4COO].L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5[F4COO]"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-[Tic]7T"}]},matrix1:{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:Mt.Matrix,placeholders:[{position:1,monomers:["D","L"]},{position:4,monomers:["K","P","F4COO"]},{position:6,monomers:["Y","T"]}]},tgt:[{seq:"PEPTIDE1{[Ac(1)].D.W.G.K.L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2D-P5K-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].D.W.G.K.L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2D-P5K-[Tic]7T"},{seq:"PEPTIDE1{[Ac(1)].D.W.G.P.L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2D-P5P-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].D.W.G.P.L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2D-P5P-[Tic]7T"},{seq:"PEPTIDE1{[Ac(1)].D.W.G.[F4COO].L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2D-P5[F4COO]-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].D.W.G.[F4COO].L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2D-P5[F4COO]-[Tic]7T"},{seq:"PEPTIDE1{[Ac(1)].L.W.G.K.L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2L-P5K-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].L.W.G.K.L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2L-P5K-[Tic]7T"},{seq:"PEPTIDE1{[Ac(1)].L.W.G.P.L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2L-P5P-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].L.W.G.P.L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2L-P5P-[Tic]7T"},{seq:"PEPTIDE1{[Ac(1)].L.W.G.[F4COO].L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2L-P5[F4COO]-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].L.W.G.[F4COO].L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2L-P5[F4COO]-[Tic]7T"}]}};for(const[t,e]of Object.entries(s))A(`${t}`,(async()=>{N(Gt(e.src,"",e.params),e.tgt.map((t=>[t.seq,t.name])))}))})),v("PolyTool: Enumerate",(()=>{let t,e,n;w((async()=>{t=await Rt(),e=await $t(),n=await Nt(),await e.loadMonomerLibForTests()})),O((async()=>{await vt(n),await e.loadMonomerLib(!0)}));const s={breadth1:{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:Mt.Single,placeholdersBreadth:[{start:2,end:4,monomers:["K"]}]},tgt:[{seq:"PEPTIDE1{[Ac(1)].F.K.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-W3K"},{seq:"PEPTIDE1{[Ac(1)].F.W.K.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-G4K"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.K.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K"}]},"breadth1-with-original":{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:Mt.Single,placeholdersBreadth:[{start:2,end:4,monomers:["K"]}],keepOriginal:!0},tgt:[{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:""},{seq:"PEPTIDE1{[Ac(1)].F.K.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-W3K"},{seq:"PEPTIDE1{[Ac(1)].F.W.K.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-G4K"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.K.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K"}]},breadth2:{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:Mt.Single,placeholdersBreadth:[{start:2,end:4,monomers:["K","Y"]}]},tgt:[{seq:"PEPTIDE1{[Ac(1)].F.K.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-W3K"},{seq:"PEPTIDE1{[Ac(1)].F.W.K.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-G4K"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.K.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K"},{seq:"PEPTIDE1{[Ac(1)].F.Y.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-W3Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.Y.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-G4Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.Y.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5Y"}]},"breadth-double":{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:Mt.Single,placeholdersBreadth:[{start:2,end:4,monomers:["K"]},{start:2,end:4,monomers:["Y"]}]},tgt:[{seq:"PEPTIDE1{[Ac(1)].F.Y.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-W3K-K3Y"},{seq:"PEPTIDE1{[Ac(1)].F.K.Y.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-W3K-G4Y"},{seq:"PEPTIDE1{[Ac(1)].F.K.G.Y.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-W3K-P5Y"},{seq:"PEPTIDE1{[Ac(1)].F.Y.K.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-G4K-W3Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.Y.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-G4K-K4Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.K.Y.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-G4K-P5Y"},{seq:"PEPTIDE1{[Ac(1)].F.Y.G.K.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K-W3Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.Y.K.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K-G4Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.Y.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K-K5Y"}]}};for(const[t,e]of Object.entries(s))A(`${t}`,(async()=>{N(Gt(e.src,"",e.params),e.tgt.map((t=>[t.seq,t.name])))}))})),v("toAtomicLevel",(()=>{let e,n,s;w((async()=>{n=await $t(),e=await Nt(),s=await async function(){const e=t.Func.find({package:"Chem",name:"getRdKitModule"});if(0===e.length)throw new Error('Package "Chem" must be installed for getRdKitModule.');return(await e[0].prepare().call()).getOutputParamValue()}(),await n.loadMonomerLibForTests()})),O((async()=>{await vt(e),await n.loadMonomerLib(!0)})),A("override",(async()=>{const e=n.getMonomerLib(),o=await Ht.files.readAsText("tests/polytool-reaction-lib.json"),r=JSON.parse(o).find((t=>"GGaz"===t.symbol));$(null!=r,!0,"Monomer 'GGaz' not found.");const i={PEPTIDE:{GGaz:r}},a=e.override(i),l=await async function(){const e=t.Func.find({package:"Bio",name:"getSeqHelper"});if(0===e.length)throw new Error("Package 'Bio' must be installed for SeqHelper.");return(await e[0].prepare().call()).getOutputParamValue()}(),c=t.Column.fromList(t.COLUMN_TYPE.STRING,"helm",["PEPTIDE1{F.P.Y.[GGaz].H.A.A.G.G.A.C}|PEPTIDE2{A.A.A}$PEPTIDE1,PEPTIDE2,4:R4-1:R1|PEPTIDE1,PEPTIDE1,11:R2-4:R3$$$V2.0"]);c.semType=t.SEMTYPE.MACROMOLECULE,c.meta.units=at.HELM;const h=await l.helmToAtomicLevel(c,!1,!1,a);$(null!=h.molCol,!0,"Result molCol is null");const u=h.molCol.get(0);$(!!u,!0,"Molfile is empty");const f=s.get_mol(u);try{const t=f.get_inchi(),e=s.get_inchikey_for_inchi(t);$(f.get_num_bonds(),103),$(f.get_num_atoms(),98),$(e,"XPQUTLNSNIMERR-WKBTUBAPSA-N")}finally{f.delete()}}))}));const Ht=new k;async function St(e,n,s){const o=await I({category:e,test:n,testContext:s,verbose:!0});return t.DataFrame.fromObjects(o)}async function Ft(){await L(Ht,Ht.getModule("package-test.js"))}})(),sequencetranslator_test=s})();
|
|
2
2
|
//# sourceMappingURL=package-test.js.map
|