icn3d 3.29.17 → 3.30.0
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/icn3d.js +87 -25
- package/icn3d.min.js +4 -6
- package/icn3d.module.js +87 -25
- package/package.json +1 -1
package/icn3d.module.js
CHANGED
|
@@ -6711,6 +6711,26 @@ class ClickMenu {
|
|
|
6711
6711
|
$("#" + me.pre + "menulist").html(html);
|
|
6712
6712
|
}
|
|
6713
6713
|
|
|
6714
|
+
async setIgTemplate(template) { let me = this.icn3dui, ic = me.icn3d;
|
|
6715
|
+
ic.bRunRefnumAgain = true;
|
|
6716
|
+
|
|
6717
|
+
// reset for the selection
|
|
6718
|
+
let residueArray = ic.resid2specCls.atoms2residues(Object.keys(ic.hAtoms));
|
|
6719
|
+
for(let i = 0, il = residueArray.length; i < il; ++i) {
|
|
6720
|
+
let resid = residueArray[i];
|
|
6721
|
+
|
|
6722
|
+
if(ic.resid2refnum) delete ic.resid2refnum[resid];
|
|
6723
|
+
if(ic.resid2refnum_ori) delete ic.resid2refnum_ori[resid];
|
|
6724
|
+
if(ic.resid2domainid) delete ic.resid2domainid[resid];
|
|
6725
|
+
}
|
|
6726
|
+
|
|
6727
|
+
let bSelection = true;
|
|
6728
|
+
// await ic.refnumCls.showIgRefNum(template);
|
|
6729
|
+
if(!ic.bAnnoShown) await ic.showAnnoCls.showAnnotations();
|
|
6730
|
+
await ic.annotationCls.setAnnoTabIg(bSelection, template);
|
|
6731
|
+
|
|
6732
|
+
// ic.bRunRefnumAgain = false;
|
|
6733
|
+
}
|
|
6714
6734
|
|
|
6715
6735
|
clickMenu1() { let me = this.icn3dui; me.icn3d;
|
|
6716
6736
|
if(me.bNode) return;
|
|
@@ -8276,6 +8296,8 @@ class ClickMenu {
|
|
|
8276
8296
|
});
|
|
8277
8297
|
|
|
8278
8298
|
me.myEventCls.onIds("#" + me.pre + "mn6_igrefYes", "click", async function(e) { let ic = me.icn3d; //e.preventDefault();
|
|
8299
|
+
ic.bRunRefnumAgain = true;
|
|
8300
|
+
|
|
8279
8301
|
thisClass.setLogCmd('ig refnum on', true);
|
|
8280
8302
|
// await ic.refnumCls.showIgRefNum();
|
|
8281
8303
|
// thisClass.setLogCmd('set annotation ig', true);
|
|
@@ -8292,21 +8314,22 @@ class ClickMenu {
|
|
|
8292
8314
|
// ic.hlUpdateCls.updateHlAll();
|
|
8293
8315
|
// ic.drawCls.draw();
|
|
8294
8316
|
// }
|
|
8317
|
+
|
|
8318
|
+
// ic.bRunRefnumAgain = false;
|
|
8295
8319
|
});
|
|
8296
8320
|
|
|
8297
8321
|
me.myEventCls.onIds("#" + me.pre + "mn6_igrefTpl", "click", async function(e) { me.icn3d; //e.preventDefault();
|
|
8298
8322
|
me.htmlCls.dialogCls.openDlg('dl_igrefTpl', 'Choose an Ig template');
|
|
8299
8323
|
});
|
|
8300
8324
|
|
|
8301
|
-
me.myEventCls.onIds("#" + me.pre + "mn6_igrefTpl_apply", "click", async function(e) {
|
|
8325
|
+
me.myEventCls.onIds("#" + me.pre + "mn6_igrefTpl_apply", "click", async function(e) { me.icn3d; //e.preventDefault();
|
|
8302
8326
|
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
8303
|
-
|
|
8327
|
+
|
|
8304
8328
|
let template = $("#" + me.pre + "refTpl").val();
|
|
8329
|
+
|
|
8330
|
+
await thisClass.setIgTemplate(template);
|
|
8331
|
+
|
|
8305
8332
|
thisClass.setLogCmd('ig template ' + template, true);
|
|
8306
|
-
let bSelection = true;
|
|
8307
|
-
// await ic.refnumCls.showIgRefNum(template);
|
|
8308
|
-
if(!ic.bAnnoShown) await ic.showAnnoCls.showAnnotations();
|
|
8309
|
-
await ic.annotationCls.setAnnoTabIg(bSelection, template);
|
|
8310
8333
|
});
|
|
8311
8334
|
|
|
8312
8335
|
me.myEventCls.onIds("#" + me.pre + "mn6_alignrefTpl", "click", async function(e) { me.icn3d; //e.preventDefault();
|
|
@@ -8315,18 +8338,26 @@ class ClickMenu {
|
|
|
8315
8338
|
|
|
8316
8339
|
me.myEventCls.onIds("#" + me.pre + "mn6_alignrefTpl_apply", "click", async function(e) { let ic = me.icn3d; //e.preventDefault();
|
|
8317
8340
|
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
8318
|
-
|
|
8341
|
+
|
|
8319
8342
|
let template = $("#" + me.pre + "refTpl2").val();
|
|
8320
8343
|
|
|
8344
|
+
let selAtoms = me.hashUtilsCls.cloneHash(ic.hAtoms);
|
|
8345
|
+
|
|
8321
8346
|
// load the template
|
|
8322
8347
|
let url = me.htmlCls.baseUrl + "icn3d/refpdb/" + template + ".pdb";
|
|
8323
8348
|
await ic.pdbParserCls.downloadUrl(url, 'pdb', undefined, template);
|
|
8324
8349
|
thisClass.setLogCmd('load url ' + url + ' | type pdb', true);
|
|
8350
|
+
|
|
8351
|
+
let structure = template.replace(/_/g, '').substr(0,4);
|
|
8352
|
+
|
|
8353
|
+
let chainid = ic.structures[structure][0];
|
|
8354
|
+
|
|
8355
|
+
ic.hAtoms = me.hashUtilsCls.unionHash(selAtoms, ic.chains[chainid]);
|
|
8325
8356
|
|
|
8326
8357
|
// align the template with the selection
|
|
8327
8358
|
me.cfg.aligntool = 'tmalign';
|
|
8328
8359
|
await ic.realignParserCls.realignOnStructAlign();
|
|
8329
|
-
thisClass.setLogCmd('realign on tmalign', true);
|
|
8360
|
+
thisClass.setLogCmd('realign on tmalign', true);
|
|
8330
8361
|
});
|
|
8331
8362
|
|
|
8332
8363
|
me.myEventCls.onIds("#" + me.pre + "mn6_igrefNo", "click", async function(e) { let ic = me.icn3d; //e.preventDefault();
|
|
@@ -38510,9 +38541,10 @@ class AnnoIg {
|
|
|
38510
38541
|
|
|
38511
38542
|
//Show the annotations of CDD domains and binding sites.
|
|
38512
38543
|
async showIg(chnid, template) { let ic = this.icn3d; ic.icn3dui;
|
|
38513
|
-
if(!ic.bRunRefnum || Object.keys(ic.atoms).length > Object.keys(ic.hAtoms).length) {
|
|
38544
|
+
// if(!ic.bRunRefnum || Object.keys(ic.atoms).length > Object.keys(ic.hAtoms).length) {
|
|
38545
|
+
if(ic.bRunRefnumAgain) {
|
|
38514
38546
|
await ic.refnumCls.showIgRefNum(template);
|
|
38515
|
-
ic.bRunRefnum = true;
|
|
38547
|
+
// ic.bRunRefnum = true;
|
|
38516
38548
|
}
|
|
38517
38549
|
|
|
38518
38550
|
let type = 'ig';
|
|
@@ -38530,6 +38562,8 @@ class AnnoIg {
|
|
|
38530
38562
|
$("#" + ic.pre + "dt_" + type + "_" + chnid).html(html);
|
|
38531
38563
|
$("#" + ic.pre + "ov_" + type + "_" + chnid).html(html2);
|
|
38532
38564
|
$("#" + ic.pre + "tt_" + type + "_" + chnid).html(html3);
|
|
38565
|
+
|
|
38566
|
+
ic.bRunRefnumAgain = false;
|
|
38533
38567
|
}
|
|
38534
38568
|
|
|
38535
38569
|
showAllRefNum(giSeq, chnid) { let ic = this.icn3d; ic.icn3dui;
|
|
@@ -39032,6 +39066,7 @@ class AnnoDomain {
|
|
|
39032
39066
|
let pdbid = pdbArray[index];
|
|
39033
39067
|
//let url = me.htmlCls.baseUrl + "mmdb/mmdb_strview.cgi?v=2&program=icn3d&domain&molinfor&uid=" + pdbid;
|
|
39034
39068
|
|
|
39069
|
+
/*
|
|
39035
39070
|
if(!ic.bResetAnno && index == 0 && ic.mmdb_data !== undefined) {
|
|
39036
39071
|
for(let chnid in ic.protein_chainid) {
|
|
39037
39072
|
if(chnid.indexOf(pdbid) !== -1) {
|
|
@@ -39047,6 +39082,7 @@ class AnnoDomain {
|
|
|
39047
39082
|
}
|
|
39048
39083
|
}
|
|
39049
39084
|
else {
|
|
39085
|
+
*/
|
|
39050
39086
|
// calculate 3D domains on-the-fly
|
|
39051
39087
|
//ic.protein_chainid[chainArray[i]]
|
|
39052
39088
|
let data = {};
|
|
@@ -39088,7 +39124,7 @@ class AnnoDomain {
|
|
|
39088
39124
|
|
|
39089
39125
|
ic.bAjax3ddomain = true;
|
|
39090
39126
|
ic.bAjaxDoneArray[index] = true;
|
|
39091
|
-
}
|
|
39127
|
+
// }
|
|
39092
39128
|
}
|
|
39093
39129
|
|
|
39094
39130
|
//Show the annotations of 3D domains.
|
|
@@ -40123,6 +40159,10 @@ class Domain3d {
|
|
|
40123
40159
|
constructor(icn3d) {
|
|
40124
40160
|
this.icn3d = icn3d;
|
|
40125
40161
|
|
|
40162
|
+
this.init3ddomain();
|
|
40163
|
+
}
|
|
40164
|
+
|
|
40165
|
+
init3ddomain() { let ic = this.icn3d; ic.icn3dui;
|
|
40126
40166
|
//this.dcut = 8; // threshold for C-alpha interactions
|
|
40127
40167
|
|
|
40128
40168
|
// It seemed the threshold 7 angstrom works better
|
|
@@ -40130,7 +40170,8 @@ class Domain3d {
|
|
|
40130
40170
|
this.dcut = 8; // threshold for C-alpha interactions
|
|
40131
40171
|
|
|
40132
40172
|
// added by Jiyao
|
|
40133
|
-
|
|
40173
|
+
// pdbid 1CD8 requires a min contact 4, not 5
|
|
40174
|
+
this.min_contacts = 4; //5; //3; // minimum number of contacts to be considered as neighbors
|
|
40134
40175
|
|
|
40135
40176
|
this.MAX_SSE = 512;
|
|
40136
40177
|
|
|
@@ -40142,6 +40183,7 @@ class Domain3d {
|
|
|
40142
40183
|
|
|
40143
40184
|
//let this.elt_size[this.MAX_SSE]; // element sizes in residues
|
|
40144
40185
|
this.elt_size = [];
|
|
40186
|
+
|
|
40145
40187
|
this.elt_size.length = this.MAX_SSE;
|
|
40146
40188
|
|
|
40147
40189
|
//let this.group_num[this.MAX_SSE]; // indicates required element groupings
|
|
@@ -40751,6 +40793,8 @@ class Domain3d {
|
|
|
40751
40793
|
// x0, y0, z0: array of x,y,z coordinates of C-alpha atoms
|
|
40752
40794
|
//c2b_NewSplitChain(chnid, dcut) { let ic = this.icn3d, me = ic.icn3dui;
|
|
40753
40795
|
c2b_NewSplitChain(atoms, dcut) { let ic = this.icn3d; ic.icn3dui;
|
|
40796
|
+
this.init3ddomain();
|
|
40797
|
+
|
|
40754
40798
|
let x0 = [], y0 = [], z0 = [], resiArray = [];
|
|
40755
40799
|
|
|
40756
40800
|
//substruct: array of secondary structures, each of which has the keys: From (1-based), To (1-based), Sheet (0 or 1), also add these paras: x1, y1, z1, x2, y2, z2
|
|
@@ -43284,7 +43328,11 @@ class Annotation {
|
|
|
43284
43328
|
this.updateSsbond();
|
|
43285
43329
|
this.updateCrosslink();
|
|
43286
43330
|
await this.updateTransmem();
|
|
43331
|
+
|
|
43332
|
+
ic.bRunRefnumAgain = true;
|
|
43287
43333
|
await this.updateIg();
|
|
43334
|
+
// ic.bRunRefnumAgain = false;
|
|
43335
|
+
|
|
43288
43336
|
this.updateInteraction();
|
|
43289
43337
|
}
|
|
43290
43338
|
hideAnnoTabAll() { let ic = this.icn3d; ic.icn3dui;
|
|
@@ -43366,10 +43414,13 @@ class Annotation {
|
|
|
43366
43414
|
$("[id^=" + ic.pre + "transmem]").show();
|
|
43367
43415
|
}
|
|
43368
43416
|
if($("#" + ic.pre + "anno_ig").length && $("#" + ic.pre + "anno_ig")[0].checked) {
|
|
43369
|
-
ic.
|
|
43417
|
+
// ic.bRunRefnumAgain = true;
|
|
43418
|
+
|
|
43370
43419
|
await this.updateIg();
|
|
43371
43420
|
|
|
43372
43421
|
$("[id^=" + ic.pre + "ig]").show();
|
|
43422
|
+
|
|
43423
|
+
// ic.bRunRefnumAgain = false;
|
|
43373
43424
|
}
|
|
43374
43425
|
}
|
|
43375
43426
|
setAnnoTabCustom() { let ic = this.icn3d; ic.icn3dui;
|
|
@@ -43630,12 +43681,15 @@ class Annotation {
|
|
|
43630
43681
|
|
|
43631
43682
|
me.myEventCls.onIds("#" + ic.pre + "anno_ig", "click", async function(e) {
|
|
43632
43683
|
if($("#" + ic.pre + "anno_ig").length && $("#" + ic.pre + "anno_ig")[0].checked) {
|
|
43633
|
-
if(Object.keys(ic.atoms).length > Object.keys(ic.hAtoms).length) {
|
|
43634
|
-
|
|
43635
|
-
}
|
|
43684
|
+
// if(Object.keys(ic.atoms).length > Object.keys(ic.hAtoms).length) {
|
|
43685
|
+
// ic.bRunRefnum = false;
|
|
43686
|
+
// }
|
|
43636
43687
|
|
|
43688
|
+
ic.bRunRefnumAgain = true;
|
|
43637
43689
|
await thisClass.setAnnoTabIg();
|
|
43638
43690
|
me.htmlCls.clickMenuCls.setLogCmd("set annotation ig", true);
|
|
43691
|
+
|
|
43692
|
+
// ic.bRunRefnumAgain = false;
|
|
43639
43693
|
}
|
|
43640
43694
|
else {
|
|
43641
43695
|
thisClass.hideAnnoTabIg();
|
|
@@ -60860,11 +60914,17 @@ class ApplyCommand {
|
|
|
60860
60914
|
await ic.annotationCls.setAnnoTabTransmem();
|
|
60861
60915
|
}
|
|
60862
60916
|
else if(command == 'set annotation ig') {
|
|
60917
|
+
ic.bRunRefnumAgain = true;
|
|
60863
60918
|
await ic.annotationCls.setAnnoTabIg();
|
|
60919
|
+
// ic.bRunRefnumAgain = false;
|
|
60864
60920
|
}
|
|
60865
60921
|
else if(command == 'ig refnum on') {
|
|
60922
|
+
ic.bRunRefnumAgain = true;
|
|
60923
|
+
|
|
60866
60924
|
if(!ic.bAnnoShown) await ic.showAnnoCls.showAnnotations();
|
|
60867
60925
|
await ic.annotationCls.setAnnoTabIg(true);
|
|
60926
|
+
|
|
60927
|
+
// ic.bRunRefnumAgain = false;
|
|
60868
60928
|
}
|
|
60869
60929
|
else if(command == 'highlight level up') {
|
|
60870
60930
|
ic.resid2specCls.switchHighlightLevelUp();
|
|
@@ -63352,9 +63412,7 @@ class LoadScript {
|
|
|
63352
63412
|
// }
|
|
63353
63413
|
else if(command.indexOf('ig template') == 0 ) {
|
|
63354
63414
|
let template = command.substr(command.lastIndexOf(' ') + 1);
|
|
63355
|
-
|
|
63356
|
-
if(!ic.bAnnoShown) await ic.showAnnoCls.showAnnotations();
|
|
63357
|
-
await ic.annotationCls.setAnnoTabIg(true, template);
|
|
63415
|
+
await me.htmlCls.clickMenuCls.setIgTemplate(template);
|
|
63358
63416
|
}
|
|
63359
63417
|
else if(command.indexOf('set annotation 3ddomain') == 0) { // the command may have "|||{"factor"...
|
|
63360
63418
|
if(Object.keys(ic.proteins).length > 0) {
|
|
@@ -63557,8 +63615,12 @@ class LoadScript {
|
|
|
63557
63615
|
}
|
|
63558
63616
|
else if(lastCommand.indexOf('ig refnum on') == 0) {
|
|
63559
63617
|
// await ic.refnumCls.showIgRefNum();
|
|
63618
|
+
ic.bRunRefnumAgain = true;
|
|
63619
|
+
|
|
63560
63620
|
if(!ic.bAnnoShown) await ic.showAnnoCls.showAnnotations();
|
|
63561
63621
|
await ic.annotationCls.setAnnoTabIg(true);
|
|
63622
|
+
|
|
63623
|
+
// ic.bRunRefnumAgain = false;
|
|
63562
63624
|
}
|
|
63563
63625
|
else if(lastCommand.indexOf('set annotation 3ddomain') == 0) {
|
|
63564
63626
|
thisClass.applyCommand3ddomain(lastCommand);
|
|
@@ -66555,7 +66617,7 @@ class Dssp {
|
|
|
66555
66617
|
|
|
66556
66618
|
async hideIgRefNum() { let ic = this.icn3d; ic.icn3dui;
|
|
66557
66619
|
ic.bShowRefnum = false;
|
|
66558
|
-
ic.bRunRefnum = false;
|
|
66620
|
+
// ic.bRunRefnum = false;
|
|
66559
66621
|
|
|
66560
66622
|
// redo all ref numbers
|
|
66561
66623
|
ic.resid2refnum = {};
|
|
@@ -67158,7 +67220,7 @@ class Dssp {
|
|
|
67158
67220
|
strandHash[strand] = 1;
|
|
67159
67221
|
}
|
|
67160
67222
|
let score = parseFloat(queryData[0].score);
|
|
67161
|
-
|
|
67223
|
+
|
|
67162
67224
|
// if the TM score difference is within 0.1 and more strands are found, use the template with more strands
|
|
67163
67225
|
// if(!domainid2segs.hasOwnProperty(domainid) ||
|
|
67164
67226
|
// (score >= parseFloat(ic.domainid2score[domainid].split('_')[0]) + tmAdjust)
|
|
@@ -67200,7 +67262,7 @@ class Dssp {
|
|
|
67200
67262
|
refpdbnameList.sort(function(a, b) {
|
|
67201
67263
|
return refpdbname2score[b] - refpdbname2score[a]
|
|
67202
67264
|
});
|
|
67203
|
-
// top
|
|
67265
|
+
// top 4 templates
|
|
67204
67266
|
ic.domainid2refpdbname[domainid] = refpdbnameList.slice(0,4);
|
|
67205
67267
|
}
|
|
67206
67268
|
}
|
|
@@ -67214,7 +67276,7 @@ class Dssp {
|
|
|
67214
67276
|
|
|
67215
67277
|
let domainid2segs = this.parseAlignData_part1(dataArray, domainidpairArray, bRound1);
|
|
67216
67278
|
|
|
67217
|
-
//
|
|
67279
|
+
// no more Igs to detect
|
|
67218
67280
|
if(Object.keys(domainid2segs).length == 0) {
|
|
67219
67281
|
bNoMoreIg = true;
|
|
67220
67282
|
return bNoMoreIg;
|
|
@@ -67963,7 +68025,7 @@ class Dssp {
|
|
|
67963
68025
|
}
|
|
67964
68026
|
|
|
67965
68027
|
// in case A1550 is not found, but A1551 is found
|
|
67966
|
-
if(!bFoundAnchor && (lastTwo
|
|
68028
|
+
if(!bFoundAnchor && (lastTwo >= 46 && lastTwo <= 54) ) {
|
|
67967
68029
|
let offset = lastTwo - 50;
|
|
67968
68030
|
strandArray[strandCnt].anchorRefnum = refnum - offset;
|
|
67969
68031
|
strandArray[strandCnt].resCntBfAnchor = resCntBfAnchor - offset;
|
|
@@ -76494,7 +76556,7 @@ class iCn3DUI {
|
|
|
76494
76556
|
//even when multiple iCn3D viewers are shown together.
|
|
76495
76557
|
this.pre = this.cfg.divid + "_";
|
|
76496
76558
|
|
|
76497
|
-
this.REVISION = '3.
|
|
76559
|
+
this.REVISION = '3.30.0';
|
|
76498
76560
|
|
|
76499
76561
|
// In nodejs, iCn3D defines "window = {navigator: {}}"
|
|
76500
76562
|
this.bNode = (Object.keys(window).length < 2) ? true : false;
|