icn3d 3.48.0 → 3.49.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 +319 -66
- package/icn3d.min.js +3 -3
- package/icn3d.module.js +319 -66
- package/package.json +1 -1
package/icn3d.module.js
CHANGED
|
@@ -59472,6 +59472,34 @@ class ClickMenu {
|
|
|
59472
59472
|
thisClass.setLogCmd('symmetry ' + title, true);
|
|
59473
59473
|
});
|
|
59474
59474
|
|
|
59475
|
+
me.myEventCls.onIds("#" + me.pre + "2ddgm_r2dt", "click", function(e) { let ic = me.icn3d; //e.preventDefault();
|
|
59476
|
+
thisClass.SetChainsAdvancedMenu();
|
|
59477
|
+
|
|
59478
|
+
let definedAtomsHtml = ic.definedSetsCls.setAtomMenu(['protein'], true);
|
|
59479
|
+
if($("#" + me.pre + "atomsCustomNucleotide").length && definedAtomsHtml) {
|
|
59480
|
+
$("#" + me.pre + "atomsCustomNucleotide").html(definedAtomsHtml);
|
|
59481
|
+
me.htmlCls.dialogCls.openDlg('dl_2ddgm_r2dt', 'Show R2DT Diagram for Nucleotides');
|
|
59482
|
+
$("#" + me.pre + "atomsCustomNucleotide").resizable();
|
|
59483
|
+
}
|
|
59484
|
+
else {
|
|
59485
|
+
var aaa = 1; //alert("No nucleotide chain is found.");
|
|
59486
|
+
}
|
|
59487
|
+
});
|
|
59488
|
+
|
|
59489
|
+
me.myEventCls.onIds("#" + me.pre + "2ddgm_igdgm", "click", function(e) { let ic = me.icn3d; //e.preventDefault();
|
|
59490
|
+
thisClass.SetChainsAdvancedMenu();
|
|
59491
|
+
|
|
59492
|
+
let definedAtomsHtml = ic.definedSetsCls.setAtomMenu(['protein'], false, true);
|
|
59493
|
+
if($("#" + me.pre + "atomsCustomProtein").length && definedAtomsHtml) {
|
|
59494
|
+
$("#" + me.pre + "atomsCustomProtein").html(definedAtomsHtml);
|
|
59495
|
+
me.htmlCls.dialogCls.openDlg('dl_2ddgm_igdgm', 'Show Ig Diagram for Proteins');
|
|
59496
|
+
$("#" + me.pre + "atomsCustomProtein").resizable();
|
|
59497
|
+
}
|
|
59498
|
+
else {
|
|
59499
|
+
var aaa = 1; //alert("No protein chain is found.");
|
|
59500
|
+
}
|
|
59501
|
+
});
|
|
59502
|
+
|
|
59475
59503
|
me.myEventCls.onIds(["#" + me.pre + "mn6_hbondsYes", "#" + me.pre + "hbondsYes"], "click", function(e) { let ic = me.icn3d; //e.preventDefault();
|
|
59476
59504
|
thisClass.SetChainsAdvancedMenu();
|
|
59477
59505
|
|
|
@@ -61377,9 +61405,15 @@ class SetMenu {
|
|
|
61377
61405
|
html += this.getLink('mn2_alignment', 'Aligned Seq. ' + me.htmlCls.wifiStr, 1, 1);
|
|
61378
61406
|
//}
|
|
61379
61407
|
|
|
61408
|
+
html += this.getMenuText('2ddgmwrap', '2D Diagram', undefined, 1, 1);
|
|
61409
|
+
html += "<ul>";
|
|
61410
|
+
html += this.getLink('2ddgm_r2dt', 'for Nucleotides (R2DT)' + me.htmlCls.wifiStr, 1, 2);
|
|
61411
|
+
html += this.getLink('2ddgm_igdgm', 'for Ig Domains' + me.htmlCls.wifiStr, 1, 2);
|
|
61380
61412
|
if(me.cfg.mmdbid !== undefined || me.cfg.gi !== undefined || me.cfg.blast_rep_id !== undefined || me.cfg.align !== undefined || me.cfg.chainalign !== undefined) {
|
|
61381
|
-
html += this.getLink('mn2_2ddgm', '
|
|
61413
|
+
html += this.getLink('mn2_2ddgm', 'for Chains ' + me.htmlCls.wifiStr, 1, 2);
|
|
61382
61414
|
}
|
|
61415
|
+
html += "</ul>";
|
|
61416
|
+
html += "</li>";
|
|
61383
61417
|
|
|
61384
61418
|
html += this.getMenuText('2dctnwrap', '2D Cartoon', undefined, undefined, 1);
|
|
61385
61419
|
html += "<ul>";
|
|
@@ -61825,6 +61859,7 @@ class Dialog {
|
|
|
61825
61859
|
let bHbondplot = $('#' + me.pre + 'dl_hbondplot').hasClass('ui-dialog-content'); // initialized
|
|
61826
61860
|
let bLigplot = $('#' + me.pre + 'dl_ligplot').hasClass('ui-dialog-content'); // initialized
|
|
61827
61861
|
let bContactmap = $('#' + me.pre + 'dl_contactmap').hasClass('ui-dialog-content'); // initialized
|
|
61862
|
+
let b2ddiagram = $('#' + me.pre + 'dl_2ddiagram').hasClass('ui-dialog-content'); // initialized
|
|
61828
61863
|
let bAlignerrormap = $('#' + me.pre + 'dl_alignerrormap').hasClass('ui-dialog-content'); // initialized
|
|
61829
61864
|
let bTable = $('#' + me.pre + 'dl_interactionsorted').hasClass('ui-dialog-content'); // initialized
|
|
61830
61865
|
let bAlignmentInit = $('#' + me.pre + 'dl_alignment').hasClass('ui-dialog-content'); // initialized
|
|
@@ -61844,6 +61879,7 @@ class Dialog {
|
|
|
61844
61879
|
id2flag.dl_hbondplot = 'bHbondplot2';
|
|
61845
61880
|
id2flag.dl_ligplot = 'bLigplot2';
|
|
61846
61881
|
id2flag.dl_contactmap = 'bContactmap2';
|
|
61882
|
+
id2flag.dl_2ddiagram = 'b2ddiagram2';
|
|
61847
61883
|
id2flag.dl_alignerrormap = 'bAlignerrormap2';
|
|
61848
61884
|
id2flag.dl_interactionsorted = 'bTable2';
|
|
61849
61885
|
id2flag.dl_alignment = 'bAlignmentInit2';
|
|
@@ -61859,6 +61895,7 @@ class Dialog {
|
|
|
61859
61895
|
if(bHbondplot) status.bHbondplot2 = $('#' + me.pre + 'dl_hbondplot').dialog( 'isOpen' );
|
|
61860
61896
|
if(bLigplot) status.bLigplot2 = $('#' + me.pre + 'dl_ligplot').dialog( 'isOpen' );
|
|
61861
61897
|
if(bContactmap) status.bContactmap2 = $('#' + me.pre + 'dl_contactmap').dialog( 'isOpen' );
|
|
61898
|
+
if(b2ddiagram) status.b2ddiagram2 = $('#' + me.pre + 'dl_2ddiagram').dialog( 'isOpen' );
|
|
61862
61899
|
if(bAlignerrormap) status.bAlignerror2 = $('#' + me.pre + 'dl_alignerrormap').dialog( 'isOpen' );
|
|
61863
61900
|
if(bTable) status.bTable2 = $('#' + me.pre + 'dl_interactionsorted').dialog( 'isOpen' );
|
|
61864
61901
|
if(bAlignmentInit) status.bAlignmentInit2 = $('#' + me.pre + 'dl_alignment').dialog( 'isOpen' );
|
|
@@ -61944,7 +61981,7 @@ class Dialog {
|
|
|
61944
61981
|
|
|
61945
61982
|
d3.select("#" + me.svgid).attr("width", width).attr("height", height);
|
|
61946
61983
|
}
|
|
61947
|
-
else if(id == me.pre + 'dl_linegraph' || id == me.pre + 'dl_scatterplot' || id == me.pre + 'dl_ligplot' || id == me.pre + 'dl_contactmap' || id == me.pre + 'dl_alignerrormap') {
|
|
61984
|
+
else if(id == me.pre + 'dl_linegraph' || id == me.pre + 'dl_scatterplot' || id == me.pre + 'dl_ligplot' || id == me.pre + 'dl_contactmap' || id == me.pre + 'dl_2ddiagram' || id == me.pre + 'dl_alignerrormap') {
|
|
61948
61985
|
let oriWidth =(status.bTwoddgmInit2 || status.bSetsInit2) ?(me.htmlCls.WIDTH - twoddgmWidth)/2 : me.htmlCls.WIDTH / 2;
|
|
61949
61986
|
let ratio = $("#" + id).width() / oriWidth;
|
|
61950
61987
|
|
|
@@ -61968,6 +62005,10 @@ class Dialog {
|
|
|
61968
62005
|
let width = ic.contactmapWidth * ratio;
|
|
61969
62006
|
$("#" + me.contactmapid).attr("width", width);
|
|
61970
62007
|
}
|
|
62008
|
+
// else if(id == me.pre + 'dl_2ddiagram') {
|
|
62009
|
+
// let width = ic.twoddiagramWidth * ratio;
|
|
62010
|
+
// $("#" + me.twoddiagramid).attr("width", width);
|
|
62011
|
+
// }
|
|
61971
62012
|
else if(id == me.pre + 'dl_alignerrormap') {
|
|
61972
62013
|
let width = ic.alignerrormapWidth * ratio;
|
|
61973
62014
|
$("#" + me.alignerrormapid).attr("width", width);
|
|
@@ -62046,7 +62087,7 @@ class Dialog {
|
|
|
62046
62087
|
|
|
62047
62088
|
let status = this.getDialogStatus().status;
|
|
62048
62089
|
|
|
62049
|
-
if(id === me.pre + 'dl_selectannotations' || id === me.pre + 'dl_graph' || id === me.pre + 'dl_linegraph' || id === me.pre + 'dl_scatterplot' || id === me.pre + 'dl_rmsdplot' || id === me.pre + 'dl_hbondplot' || id === me.pre + 'dl_ligplot' || id === me.pre + 'dl_contactmap' || id === me.pre + 'dl_alignerrormap' || id === me.pre + 'dl_interactionsorted' || id === me.pre + 'dl_alignment') {
|
|
62090
|
+
if(id === me.pre + 'dl_selectannotations' || id === me.pre + 'dl_graph' || id === me.pre + 'dl_linegraph' || id === me.pre + 'dl_scatterplot' || id === me.pre + 'dl_rmsdplot' || id === me.pre + 'dl_hbondplot' || id === me.pre + 'dl_ligplot' || id === me.pre + 'dl_contactmap' || id === me.pre + 'dl_2ddiagram' || id === me.pre + 'dl_alignerrormap' || id === me.pre + 'dl_interactionsorted' || id === me.pre + 'dl_alignment') {
|
|
62050
62091
|
//var dialogWidth = 0.5 *(me.htmlCls.WIDTH - me.htmlCls.LESSWIDTH) - twoddgmWidth * 0.5;
|
|
62051
62092
|
let dialogWidth = 0.5 *(me.htmlCls.WIDTH) - twoddgmWidth * 0.5;
|
|
62052
62093
|
|
|
@@ -62082,16 +62123,17 @@ class Dialog {
|
|
|
62082
62123
|
modal: false,
|
|
62083
62124
|
position: position,
|
|
62084
62125
|
close: function(e) {
|
|
62085
|
-
if((id === me.pre + 'dl_selectannotations' &&(!status.bAlignmentInit2) &&(!status.bGraph2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
|
|
62086
|
-
||(id === me.pre + 'dl_graph' &&(!status.bSelectannotationsInit2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
|
|
62087
|
-
||(id === me.pre + 'dl_alignment' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
|
|
62088
|
-
||(id === me.pre + 'dl_interactionsorted' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
|
|
62089
|
-
||(id === me.pre + 'dl_linegraph' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
|
|
62090
|
-
||(id === me.pre + 'dl_scatterplot' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
|
|
62091
|
-
||(id === me.pre + 'dl_ligplot' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
|
|
62092
|
-
||(id === me.pre + 'dl_contactmap' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
|
|
62093
|
-
||(id === me.pre + 'dl_alignerrormap' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bHbondplot2))
|
|
62094
|
-
||(id === me.pre + 'dl_hbondplot' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2))
|
|
62126
|
+
if((id === me.pre + 'dl_selectannotations' &&(!status.bAlignmentInit2) &&(!status.bGraph2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2) &&(!status.b2ddiagram2))
|
|
62127
|
+
||(id === me.pre + 'dl_graph' &&(!status.bSelectannotationsInit2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2) &&(!status.b2ddiagram2))
|
|
62128
|
+
||(id === me.pre + 'dl_alignment' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2) &&(!status.b2ddiagram2))
|
|
62129
|
+
||(id === me.pre + 'dl_interactionsorted' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2) &&(!status.b2ddiagram2))
|
|
62130
|
+
||(id === me.pre + 'dl_linegraph' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2) &&(!status.b2ddiagram2))
|
|
62131
|
+
||(id === me.pre + 'dl_scatterplot' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2) &&(!status.b2ddiagram2))
|
|
62132
|
+
||(id === me.pre + 'dl_ligplot' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2) &&(!status.b2ddiagram2))
|
|
62133
|
+
||(id === me.pre + 'dl_contactmap' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2) &&(!status.b2ddiagram2))
|
|
62134
|
+
||(id === me.pre + 'dl_alignerrormap' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bHbondplot2) &&(!status.b2ddiagram2))
|
|
62135
|
+
||(id === me.pre + 'dl_hbondplot' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.b2ddiagram2))
|
|
62136
|
+
||(id === me.pre + 'dl_2ddiagram' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
|
|
62095
62137
|
) {
|
|
62096
62138
|
if(status.bTwoddgmInit2 || status.bTwodctnInit2 || status.bSetsInit2) {
|
|
62097
62139
|
let canvasWidth = me.utilsCls.isMobile() ? me.htmlCls.WIDTH : me.htmlCls.WIDTH - twoddgmWidth;
|
|
@@ -62117,7 +62159,7 @@ class Dialog {
|
|
|
62117
62159
|
|
|
62118
62160
|
d3.select("#" + me.svgid).attr("width", width).attr("height", height);
|
|
62119
62161
|
}
|
|
62120
|
-
else if(id == me.pre + 'dl_linegraph' || id == me.pre + 'dl_scatterplot' || id == me.pre + 'dl_ligplot' || id == me.pre + 'dl_contactmap' || id == me.pre + 'dl_alignerrormap') {
|
|
62162
|
+
else if(id == me.pre + 'dl_linegraph' || id == me.pre + 'dl_scatterplot' || id == me.pre + 'dl_ligplot' || id == me.pre + 'dl_contactmap' || id == me.pre + 'dl_2ddiagram' || id == me.pre + 'dl_alignerrormap') {
|
|
62121
62163
|
let oriWidth =(status.bTwoddgmInit2 || status.bSetsInit2) ?(me.htmlCls.WIDTH - twoddgmWidth)/2 : me.htmlCls.WIDTH / 2;
|
|
62122
62164
|
let ratio = $("#" + id).width() / oriWidth;
|
|
62123
62165
|
|
|
@@ -62137,6 +62179,10 @@ class Dialog {
|
|
|
62137
62179
|
let width = ic.contactmapWidth * ratio;
|
|
62138
62180
|
$("#" + me.contactmapid).attr("width", width);
|
|
62139
62181
|
}
|
|
62182
|
+
// else if(id == me.pre + 'dl_2ddiagram') {
|
|
62183
|
+
// let width = ic.twoddiagramWidth * ratio;
|
|
62184
|
+
// $("#" + me.twoddiagramid).attr("width", width);
|
|
62185
|
+
// }
|
|
62140
62186
|
else if(id == me.pre + 'dl_alignerrormap') {
|
|
62141
62187
|
let width = ic.alignerrormapWidth * ratio;
|
|
62142
62188
|
$("#" + me.alignerrormapid).attr("width", width);
|
|
@@ -62273,7 +62319,7 @@ class Dialog {
|
|
|
62273
62319
|
let width = 400, height = 150;
|
|
62274
62320
|
let twoddgmWidth = me.htmlCls.width2d + 20;
|
|
62275
62321
|
|
|
62276
|
-
if(id === me.pre + 'dl_selectannotations' || id === me.pre + 'dl_graph' || id === me.pre + 'dl_linegraph' || id === me.pre + 'dl_scatterplot' || id === me.pre + 'dl_rmsdplot' || id === me.pre + 'dl_hbondplot' || id === me.pre + 'dl_ligplot' || id === me.pre + 'dl_contactmap'
|
|
62322
|
+
if(id === me.pre + 'dl_selectannotations' || id === me.pre + 'dl_graph' || id === me.pre + 'dl_linegraph' || id === me.pre + 'dl_scatterplot' || id === me.pre + 'dl_rmsdplot' || id === me.pre + 'dl_hbondplot' || id === me.pre + 'dl_ligplot' || id === me.pre + 'dl_contactmap' || id === me.pre + 'dl_2ddiagram' || id === me.pre + 'dl_alignerrormap' || id === me.pre + 'dl_interactionsorted' || id === me.pre + 'dl_alignment') {
|
|
62277
62323
|
$( "#" + id ).show();
|
|
62278
62324
|
$( "#" + id + "_nb").show();
|
|
62279
62325
|
$( "#" + id + "_title").html(title);
|
|
@@ -62318,6 +62364,11 @@ class Dialog {
|
|
|
62318
62364
|
|
|
62319
62365
|
$("#" + me.contactmapid).attr("width", width);
|
|
62320
62366
|
}
|
|
62367
|
+
// else if(id == me.pre + 'dl_2ddiagram') {
|
|
62368
|
+
// let width = ic.twoddiagramWidth * ratio;
|
|
62369
|
+
|
|
62370
|
+
// $("#" + me.twoddiagramid).attr("width", width);
|
|
62371
|
+
// }
|
|
62321
62372
|
else if(id == me.pre + 'dl_alignerrormap') {
|
|
62322
62373
|
let width = ic.alignerrormapWidth * ratio;
|
|
62323
62374
|
|
|
@@ -63009,6 +63060,22 @@ class SetDialog {
|
|
|
63009
63060
|
html += "<span style='white-space:nowrap;'>" + me.htmlCls.buttonStr + "applycontactmap'>Display</button></span><br>";
|
|
63010
63061
|
html += "</div>";
|
|
63011
63062
|
|
|
63063
|
+
html += me.htmlCls.divStr + "dl_2ddgm_r2dt' class='" + dialogClass + "'>";
|
|
63064
|
+
html += this.addNotebookTitle('dl_2ddgm_r2dt', '2D Diagram for Nucleotides (R2DT)');
|
|
63065
|
+
html += "1. Select a nucleotide chain to show R2DT diagram:<br>";
|
|
63066
|
+
html += "<select style='max-width:200px' id='" + me.pre + "atomsCustomNucleotide' size='5' style='min-width:130px;'>";
|
|
63067
|
+
html += "</select><br>";
|
|
63068
|
+
html += me.htmlCls.buttonStr + "applyr2dt'>Show R2DT Diagram</button><br>";
|
|
63069
|
+
html += "</div>";
|
|
63070
|
+
|
|
63071
|
+
html += me.htmlCls.divStr + "dl_2ddgm_igdgm' class='" + dialogClass + "'>";
|
|
63072
|
+
html += this.addNotebookTitle('dl_2ddgm_igdgm', '2D Diagram for Ig Domains (R2DT)');
|
|
63073
|
+
html += "1. Select a protein chain to show Ig diagram. An Excel file containing <br>the Ig diagram will be saved to your computer.<br>";
|
|
63074
|
+
html += "<select style='max-width:200px' id='" + me.pre + "atomsCustomProtein' size='5' style='min-width:130px;'>";
|
|
63075
|
+
html += "</select><br>";
|
|
63076
|
+
html += me.htmlCls.buttonStr + "applyigdgm'>Show Ig Diagram</button><br>";
|
|
63077
|
+
html += "</div>";
|
|
63078
|
+
|
|
63012
63079
|
html += me.htmlCls.divStr + "dl_hbonds' class='" + dialogClass + "'>";
|
|
63013
63080
|
html += this.addNotebookTitle('dl_hbonds', 'Interaction Analysis');
|
|
63014
63081
|
html += "1. Choose interaction types and their thresholds:<br>";
|
|
@@ -63336,6 +63403,11 @@ class SetDialog {
|
|
|
63336
63403
|
|
|
63337
63404
|
html += "</div>";
|
|
63338
63405
|
|
|
63406
|
+
html += me.htmlCls.divStr + "dl_2ddiagram' style='background-color:white' class='" + dialogClass + "'>";
|
|
63407
|
+
html += this.addNotebookTitle('dl_2ddiagram', '2D Diagram');
|
|
63408
|
+
html += '<div id="' + me.pre + '2ddiagramDiv"></div>';
|
|
63409
|
+
html += "</div>";
|
|
63410
|
+
|
|
63339
63411
|
html += me.htmlCls.divStr + "dl_alignerrormap' style='background-color:white' class='" + dialogClass + "'>";
|
|
63340
63412
|
html += this.addNotebookTitle('dl_alignerrormap', 'PAE Map');
|
|
63341
63413
|
|
|
@@ -66587,6 +66659,24 @@ class Events {
|
|
|
66587
66659
|
await ic.contactMapCls.contactMap(contactdist, contacttype);
|
|
66588
66660
|
thisClass.setLogCmd('contact map | dist ' + contactdist + ' | type ' + contacttype, true);
|
|
66589
66661
|
});
|
|
66662
|
+
me.myEventCls.onIds("#" + me.pre + "applyr2dt", "click", async function(e) { let ic = me.icn3d;
|
|
66663
|
+
e.preventDefault();
|
|
66664
|
+
//if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
66665
|
+
|
|
66666
|
+
let chainid = $("#" + ic.pre + "atomsCustomNucleotide").val();
|
|
66667
|
+
|
|
66668
|
+
await ic.diagram2dCls.drawR2dt(chainid);
|
|
66669
|
+
thisClass.setLogCmd('diagram 2d nucleotide | ' + chainid, true);
|
|
66670
|
+
});
|
|
66671
|
+
me.myEventCls.onIds("#" + me.pre + "applyigdgm", "click", async function(e) { let ic = me.icn3d;
|
|
66672
|
+
e.preventDefault();
|
|
66673
|
+
//if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
66674
|
+
|
|
66675
|
+
let chainid = $("#" + ic.pre + "atomsCustomProtein").val();
|
|
66676
|
+
|
|
66677
|
+
await ic.diagram2dCls.drawIgdgm(chainid);
|
|
66678
|
+
thisClass.setLogCmd('diagram 2d ig | ' + chainid, true);
|
|
66679
|
+
});
|
|
66590
66680
|
me.myEventCls.onIds("#" + me.pre + "hbondWindow", "click", async function(e) { let ic = me.icn3d;
|
|
66591
66681
|
e.preventDefault();
|
|
66592
66682
|
|
|
@@ -68938,13 +69028,15 @@ class SetHtml {
|
|
|
68938
69028
|
|
|
68939
69029
|
this.setCookieForThickness();
|
|
68940
69030
|
|
|
68941
|
-
if(postfix = bReset) {
|
|
69031
|
+
// if(postfix = '3dprint' && bReset) {
|
|
69032
|
+
if(bReset) {
|
|
68942
69033
|
let select = "reset thickness";
|
|
68943
69034
|
me.htmlCls.clickMenuCls.setLogCmd(select, true);
|
|
68944
69035
|
ic.bSetThickness = false;
|
|
68945
69036
|
ic.threeDPrintCls.resetAfter3Dprint();
|
|
68946
69037
|
}
|
|
68947
69038
|
else {
|
|
69039
|
+
me.htmlCls.clickMenuCls.setLogCmd('set background ' + ic.bkgdcolor, true);
|
|
68948
69040
|
me.htmlCls.clickMenuCls.setLogCmd('set thickness | linerad ' + ic.lineRadius + ' | coilrad ' + ic.coilWidth + ' | stickrad ' + ic.cylinderRadius + ' | crosslinkrad ' + ic.crosslinkRadius + ' | tracerad ' + ic.traceRadius + ' | ribbonthick ' + ic.ribbonthickness + ' | proteinwidth ' + ic.helixSheetWidth + ' | nucleotidewidth ' + ic.nucleicAcidWidth + ' | ballscale ' + ic.dotSphereScale, true);
|
|
68949
69041
|
|
|
68950
69042
|
me.htmlCls.clickMenuCls.setLogCmd('set glycan ' + ic.bGlycansCartoon, true);
|
|
@@ -75494,7 +75586,8 @@ class Scene {
|
|
|
75494
75586
|
if(me.htmlCls.setHtmlCls.getCookie('bkgdcolor') != '') {
|
|
75495
75587
|
let bkgdcolor = me.htmlCls.setHtmlCls.getCookie('bkgdcolor');
|
|
75496
75588
|
|
|
75497
|
-
if(ic.bkgdcolor != bkgdcolor) {
|
|
75589
|
+
// if(ic.bkgdcolor != bkgdcolor) {
|
|
75590
|
+
if(bkgdcolor != 'black') {
|
|
75498
75591
|
me.htmlCls.clickMenuCls.setLogCmd('set background ' + bkgdcolor, true);
|
|
75499
75592
|
}
|
|
75500
75593
|
|
|
@@ -80411,7 +80504,7 @@ class Strand {
|
|
|
80411
80504
|
let bShowArray = [];
|
|
80412
80505
|
let calphaIdArray = []; // used to store one of the final positions drawn in 3D
|
|
80413
80506
|
let colors = [];
|
|
80414
|
-
let currentChain, currentCA = null, currentO = null, currentColor = null, prevCoorCA = null, prevCoorO = null, prevColor = null;
|
|
80507
|
+
let currentChain, currentStyle, currentCA = null, currentO = null, currentColor = null, prevCoorCA = null, prevCoorO = null, prevColor = null;
|
|
80415
80508
|
let prevCO = null, ss = null, ssend = false, atomid = null, prevAtomid = null, prevResi = null, calphaid = null, prevCalphaid = null;
|
|
80416
80509
|
let strandWidth, bSheetSegment = false, bHelixSegment = false;
|
|
80417
80510
|
let atom, tubeAtoms = {};
|
|
@@ -80464,15 +80557,15 @@ class Strand {
|
|
|
80464
80557
|
}
|
|
80465
80558
|
// smoothen each coil, helix and sheet separately. The joint residue has to be included both in the previous and next segment
|
|
80466
80559
|
let bSameChain = true;
|
|
80467
|
-
|
|
80560
|
+
|
|
80468
80561
|
if (currentChain !== atom.chain) {
|
|
80469
80562
|
bSameChain = false;
|
|
80470
80563
|
}
|
|
80471
80564
|
|
|
80472
|
-
if(atom.ssend && atom.ss === 'sheet') {
|
|
80565
|
+
if((atom.ssend || currentStyle != atom.style)&& atom.ss === 'sheet') {
|
|
80473
80566
|
bSheetSegment = true;
|
|
80474
80567
|
}
|
|
80475
|
-
else if(atom.ssend && atom.ss === 'helix') {
|
|
80568
|
+
else if((atom.ssend || currentStyle != atom.style) && atom.ss === 'helix') {
|
|
80476
80569
|
bHelixSegment = true;
|
|
80477
80570
|
}
|
|
80478
80571
|
|
|
@@ -80565,7 +80658,7 @@ class Strand {
|
|
|
80565
80658
|
// bHelixSegment = true;
|
|
80566
80659
|
// }
|
|
80567
80660
|
|
|
80568
|
-
if ((atom.ssbegin || atom.ssend || (drawnResidueCount === totalResidueCount - 1) || bBrokenSs) && pnts[0].length > 0 && bSameChain) {
|
|
80661
|
+
if ((atom.ssbegin || atom.ssend || (drawnResidueCount === totalResidueCount - 1) || bBrokenSs || currentStyle != atom.style) && pnts[0].length > 0 && bSameChain) {
|
|
80569
80662
|
let atomName = 'CA';
|
|
80570
80663
|
|
|
80571
80664
|
let prevone = [], nexttwo = [];
|
|
@@ -80708,9 +80801,7 @@ class Strand {
|
|
|
80708
80801
|
} // end if (atom.ssbegin || atom.ssend)
|
|
80709
80802
|
|
|
80710
80803
|
// end of a chain
|
|
80711
|
-
|
|
80712
|
-
if ((currentChain !== atom.chain) && pnts[0].length > 0) {
|
|
80713
|
-
|
|
80804
|
+
if ((currentChain !== atom.chain || currentStyle != atom.style) && pnts[0].length > 0) {
|
|
80714
80805
|
let atomName = 'CA';
|
|
80715
80806
|
|
|
80716
80807
|
let prevone = [], nexttwo = [];
|
|
@@ -80762,7 +80853,7 @@ class Strand {
|
|
|
80762
80853
|
}
|
|
80763
80854
|
|
|
80764
80855
|
currentChain = atom.chain;
|
|
80765
|
-
atom.
|
|
80856
|
+
currentStyle = atom.style;
|
|
80766
80857
|
ss = atom.ss;
|
|
80767
80858
|
ssend = atom.ssend;
|
|
80768
80859
|
prevAtomid = atom.serial;
|
|
@@ -89729,6 +89820,9 @@ class SetStyle {
|
|
|
89729
89820
|
setBackground(color) {var ic = this.icn3d, me = ic.icn3dui;
|
|
89730
89821
|
|
|
89731
89822
|
ic.setOptionCls.setOption('background', color);
|
|
89823
|
+
let exdays = 3650;
|
|
89824
|
+
me.htmlCls.setHtmlCls.setCookie('bkgdcolor', color, exdays);
|
|
89825
|
+
|
|
89732
89826
|
me.htmlCls.clickMenuCls.setLogCmd('set background ' + color, true);
|
|
89733
89827
|
//let titleColor =(color == 'black' || color == 'transparent') ? me.htmlCls.GREYD : 'black';
|
|
89734
89828
|
let titleColor = (color == 'black') ? me.htmlCls.GREYD : 'black';
|
|
@@ -119176,16 +119270,18 @@ class ApplyCommand {
|
|
|
119176
119270
|
}
|
|
119177
119271
|
else if(command.indexOf('set background') == 0) {
|
|
119178
119272
|
let value = command.substr(command.lastIndexOf(' ') + 1);
|
|
119179
|
-
ic.
|
|
119273
|
+
ic.setStyleCls.setBackground(value);
|
|
119180
119274
|
|
|
119181
|
-
|
|
119182
|
-
|
|
119183
|
-
|
|
119184
|
-
|
|
119185
|
-
|
|
119186
|
-
|
|
119187
|
-
|
|
119188
|
-
|
|
119275
|
+
// ic.opts['background'] = value;
|
|
119276
|
+
|
|
119277
|
+
// if(value == 'black') {
|
|
119278
|
+
// $("#" + ic.pre + "title").css("color", me.htmlCls.GREYD);
|
|
119279
|
+
// $("#" + ic.pre + "titlelink").css("color", me.htmlCls.GREYD);
|
|
119280
|
+
// }
|
|
119281
|
+
// else {
|
|
119282
|
+
// $("#" + ic.pre + "title").css("color", "black");
|
|
119283
|
+
// $("#" + ic.pre + "titlelink").css("color", "black");
|
|
119284
|
+
// }
|
|
119189
119285
|
}
|
|
119190
119286
|
else if(command.indexOf('set label color') == 0) {
|
|
119191
119287
|
ic.labelcolor = command.substr(command.lastIndexOf(' ') + 1);
|
|
@@ -120455,30 +120551,19 @@ class DefinedSets {
|
|
|
120455
120551
|
}
|
|
120456
120552
|
|
|
120457
120553
|
//Set the menu of defined sets with an array of defined names "commandnameArray".
|
|
120458
|
-
setAtomMenu(commandnameArray) { let ic = this.icn3d; ic.icn3dui;
|
|
120554
|
+
setAtomMenu(commandnameArray, bNucleotide, bProtein) { let ic = this.icn3d; ic.icn3dui;
|
|
120459
120555
|
let html = "";
|
|
120460
120556
|
let nameArray1 =(ic.defNames2Residues !== undefined) ? Object.keys(ic.defNames2Residues) : [];
|
|
120461
120557
|
let nameArray2 =(ic.defNames2Atoms !== undefined) ? Object.keys(ic.defNames2Atoms) : [];
|
|
120462
120558
|
|
|
120463
120559
|
let nameArrayTmp = nameArray1.concat(nameArray2).sort();
|
|
120464
120560
|
let nameArray = [];
|
|
120465
|
-
|
|
120466
|
-
// if($.inArray(el, nameArray) === -1) nameArray.push(el);
|
|
120467
|
-
// });
|
|
120561
|
+
|
|
120468
120562
|
nameArrayTmp.forEach(elem => {
|
|
120469
120563
|
if($.inArray(elem, nameArray) === -1) nameArray.push(elem);
|
|
120470
120564
|
});
|
|
120471
120565
|
|
|
120472
|
-
|
|
120473
|
-
|
|
120474
|
-
// nameArrayTmp.forEach((elem) => {
|
|
120475
|
-
// structureArray.forEach((structure) => {
|
|
120476
|
-
// if (ic.defNames2Residues[elem] && ic.defNames2Residues[elem][0] && ic.defNames2Residues[elem][0].split("_")[0].includes(structure.split("_")[0])){
|
|
120477
|
-
// if ($.inArray(elem, nameArray) === -1) nameArray.push(elem);
|
|
120478
|
-
// }
|
|
120479
|
-
// });
|
|
120480
|
-
// });
|
|
120481
|
-
//for(let i in ic.defNames2Atoms) {
|
|
120566
|
+
let bFoundNucleotide = false, bFoundProtein = false;
|
|
120482
120567
|
for(let i = 0, il = nameArray.length; i < il; ++i) {
|
|
120483
120568
|
let name = nameArray[i];
|
|
120484
120569
|
|
|
@@ -120501,13 +120586,38 @@ class DefinedSets {
|
|
|
120501
120586
|
let colorStr =(atom === undefined || atom.color === undefined || atom.color.getHexString().toUpperCase() === 'FFFFFF') ? 'DDDDDD' : atom.color.getHexString();
|
|
120502
120587
|
let color =(atom !== undefined && atom.color !== undefined) ? colorStr : '000000';
|
|
120503
120588
|
|
|
120504
|
-
if(
|
|
120505
|
-
|
|
120589
|
+
if(bNucleotide) {
|
|
120590
|
+
// Handle nucleotide-specific logic
|
|
120591
|
+
if(ic.nucleotides.hasOwnProperty(atom.serial) && name != 'nucleotides' && !ic.structures.hasOwnProperty(name)) {
|
|
120592
|
+
html += "<option value='" + name + "' style='color:#" + color + "'>" + name + "</option>";
|
|
120593
|
+
bFoundNucleotide = true;
|
|
120594
|
+
}
|
|
120595
|
+
}
|
|
120596
|
+
else if(bProtein) {
|
|
120597
|
+
// Handle protein-specific logic
|
|
120598
|
+
if(ic.proteins.hasOwnProperty(atom.serial) && name != 'proteins' && !ic.structures.hasOwnProperty(name)) {
|
|
120599
|
+
html += "<option value='" + name + "' style='color:#" + color + "'>" + name + "</option>";
|
|
120600
|
+
bFoundProtein = true;
|
|
120601
|
+
}
|
|
120506
120602
|
}
|
|
120507
120603
|
else {
|
|
120508
|
-
|
|
120604
|
+
if(commandnameArray.indexOf(name) != -1) {
|
|
120605
|
+
html += "<option value='" + name + "' style='color:#" + color + "' selected='selected'>" + name + "</option>";
|
|
120606
|
+
}
|
|
120607
|
+
else {
|
|
120608
|
+
html += "<option value='" + name + "' style='color:#" + color + "'>" + name + "</option>";
|
|
120609
|
+
}
|
|
120509
120610
|
}
|
|
120510
120611
|
}
|
|
120612
|
+
|
|
120613
|
+
if(bNucleotide && !bFoundNucleotide) {
|
|
120614
|
+
html = "";
|
|
120615
|
+
}
|
|
120616
|
+
|
|
120617
|
+
if(bProtein && !bFoundProtein) {
|
|
120618
|
+
html = "";
|
|
120619
|
+
}
|
|
120620
|
+
|
|
120511
120621
|
return html;
|
|
120512
120622
|
}
|
|
120513
120623
|
|
|
@@ -120652,24 +120762,34 @@ class DefinedSets {
|
|
|
120652
120762
|
ic.hlUpdateCls.updateHlMenus();
|
|
120653
120763
|
}
|
|
120654
120764
|
|
|
120765
|
+
selectSets(nameArray) { let ic = this.icn3d, me = ic.icn3dui;
|
|
120766
|
+
ic.nameArray = nameArray;
|
|
120767
|
+
|
|
120768
|
+
if(nameArray !== null) {
|
|
120769
|
+
// log the selection
|
|
120770
|
+
//me.htmlCls.clickMenuCls.setLogCmd('select saved atoms ' + nameArray.toString(), true);
|
|
120771
|
+
|
|
120772
|
+
let bUpdateHlMenus = false;
|
|
120773
|
+
this.changeCustomAtoms(nameArray, bUpdateHlMenus);
|
|
120774
|
+
//me.htmlCls.clickMenuCls.setLogCmd('select saved atoms ' + nameArray.join(' ' + ic.setOperation + ' '), true);
|
|
120775
|
+
me.htmlCls.clickMenuCls.setLogCmd('select sets ' + nameArray.join(' ' + ic.setOperation + ' '), true);
|
|
120776
|
+
|
|
120777
|
+
ic.bSelectResidue = false;
|
|
120778
|
+
}
|
|
120779
|
+
}
|
|
120780
|
+
|
|
120655
120781
|
clickCustomAtoms() { let ic = this.icn3d, me = ic.icn3dui;
|
|
120656
120782
|
let thisClass = this;
|
|
120657
120783
|
//me.myEventCls.onIds("#" + ic.pre + "atomsCustom", "change", function(e) { let ic = thisClass.icn3d;
|
|
120658
|
-
$("#" + ic.pre + "atomsCustom").change(function(e) {
|
|
120784
|
+
$("#" + ic.pre + "atomsCustom").change(function(e) { thisClass.icn3d;
|
|
120659
120785
|
let nameArray = $(this).val();
|
|
120660
|
-
|
|
120661
|
-
|
|
120662
|
-
if(nameArray !== null) {
|
|
120663
|
-
// log the selection
|
|
120664
|
-
//me.htmlCls.clickMenuCls.setLogCmd('select saved atoms ' + nameArray.toString(), true);
|
|
120665
|
-
|
|
120666
|
-
let bUpdateHlMenus = false;
|
|
120667
|
-
thisClass.changeCustomAtoms(nameArray, bUpdateHlMenus);
|
|
120668
|
-
//me.htmlCls.clickMenuCls.setLogCmd('select saved atoms ' + nameArray.join(' ' + ic.setOperation + ' '), true);
|
|
120669
|
-
me.htmlCls.clickMenuCls.setLogCmd('select sets ' + nameArray.join(' ' + ic.setOperation + ' '), true);
|
|
120786
|
+
thisClass.selectSets(nameArray);
|
|
120787
|
+
});
|
|
120670
120788
|
|
|
120671
|
-
|
|
120672
|
-
|
|
120789
|
+
me.myEventCls.onIds(["#" + ic.pre + "atomsCustomNucleotide", "#" + ic.pre + "atomsCustomProtein"], "change", function(e) { thisClass.icn3d;
|
|
120790
|
+
//$("#" + ic.pre + "atomsCustomNucleotide").change(function(e) { let ic = thisClass.icn3d;
|
|
120791
|
+
let chainid = $(this).val();
|
|
120792
|
+
thisClass.selectSets([chainid]);
|
|
120673
120793
|
});
|
|
120674
120794
|
|
|
120675
120795
|
me.myEventCls.onIds("#" + ic.pre + "atomsCustom", "focus", function(e) { let ic = thisClass.icn3d;
|
|
@@ -121630,6 +121750,22 @@ class LoadScript {
|
|
|
121630
121750
|
await ic.cartoon2dCls.draw2Dcartoon(type);
|
|
121631
121751
|
ic.bRender = false;
|
|
121632
121752
|
}
|
|
121753
|
+
else if(command.indexOf('diagram 2d nucleotide') == 0) {
|
|
121754
|
+
let paraArray = command.split(' | ');
|
|
121755
|
+
let chainid = paraArray[1];
|
|
121756
|
+
|
|
121757
|
+
ic.bRender = true;
|
|
121758
|
+
await ic.diagram2dCls.drawR2dt(chainid);
|
|
121759
|
+
ic.bRender = false;
|
|
121760
|
+
}
|
|
121761
|
+
else if(command.indexOf('diagram 2d ig') == 0) {
|
|
121762
|
+
let paraArray = command.split(' | ');
|
|
121763
|
+
let chainid = paraArray[1];
|
|
121764
|
+
|
|
121765
|
+
ic.bRender = true;
|
|
121766
|
+
await ic.diagram2dCls.drawIgdgm(chainid);
|
|
121767
|
+
ic.bRender = false;
|
|
121768
|
+
}
|
|
121633
121769
|
else if(command.indexOf('add msa track') == 0) {
|
|
121634
121770
|
//add msa track | chainid " + chainid + " | startpos " + startpos + " | type " + type + " | fastaList " + fastaList
|
|
121635
121771
|
let paraArray = command.split(' | ');
|
|
@@ -129163,6 +129299,118 @@ class Diagram2d {
|
|
|
129163
129299
|
|
|
129164
129300
|
return html;
|
|
129165
129301
|
}
|
|
129302
|
+
|
|
129303
|
+
async drawR2dt(chainid) { let ic = this.icn3d, me = ic.icn3dui;
|
|
129304
|
+
let url = me.htmlCls.baseUrl + "vastdyn/vastdyn.cgi?chainid2rnaid=" + chainid;
|
|
129305
|
+
|
|
129306
|
+
let data = await me.getAjaxPromise(url, 'jsonp');
|
|
129307
|
+
|
|
129308
|
+
let html = '';
|
|
129309
|
+
if(data && data.rnaid) {
|
|
129310
|
+
html += '<r2dt-web search=\'{"urs": "' + data.rnaid + '"}\' />';
|
|
129311
|
+
html += '<script type="text/javascript" src="https://rnacentral.github.io/r2dt-web/dist/r2dt-web.js"></script>';
|
|
129312
|
+
$("#" + me.pre + "2ddiagramDiv").html(html);
|
|
129313
|
+
me.htmlCls.dialogCls.openDlg('dl_2ddiagram', 'Show R2DT Diagram for chain ' + chainid);
|
|
129314
|
+
}
|
|
129315
|
+
else {
|
|
129316
|
+
var aaa = 1; //alert("No R2DT diagram can be found for chain " + chainid);
|
|
129317
|
+
}
|
|
129318
|
+
}
|
|
129319
|
+
|
|
129320
|
+
async drawIgdgm(chainid) { let ic = this.icn3d, me = ic.icn3dui;
|
|
129321
|
+
// select the current chain
|
|
129322
|
+
//ic.hAtoms = me.hashUtilsCls.cloneHash(ic.chains[chainid]);
|
|
129323
|
+
|
|
129324
|
+
// run ig detection
|
|
129325
|
+
ic.bRunRefnumAgain = true;
|
|
129326
|
+
if(!ic.bAnnoShown) await ic.showAnnoCls.showAnnotations();
|
|
129327
|
+
await ic.annotationCls.setAnnoTabIg(true);
|
|
129328
|
+
ic.bRunRefnumAgain = false;
|
|
129329
|
+
|
|
129330
|
+
if(!ic.chain2igArray) {
|
|
129331
|
+
var aaa = 1; //alert("No Ig domain was found for chain " + chainid);
|
|
129332
|
+
return;
|
|
129333
|
+
}
|
|
129334
|
+
|
|
129335
|
+
let igArray = ic.chain2igArray[chainid];
|
|
129336
|
+
|
|
129337
|
+
let igType = '', bFound = false;
|
|
129338
|
+
for(let i = 0, il = igArray.length; i < il; ++i) {
|
|
129339
|
+
let domainid = igArray[i].domainid;
|
|
129340
|
+
if(!ic.domainid2info) continue;
|
|
129341
|
+
|
|
129342
|
+
let info = ic.domainid2info[domainid];
|
|
129343
|
+
if(!info) continue;
|
|
129344
|
+
|
|
129345
|
+
igType = ic.ref2igtype[info.refpdbname];
|
|
129346
|
+
|
|
129347
|
+
if(igType == 'IgV' || igType == 'IgC1' || igType == 'IgC2' || igType == 'IgI') {
|
|
129348
|
+
bFound = true;
|
|
129349
|
+
break;
|
|
129350
|
+
}
|
|
129351
|
+
}
|
|
129352
|
+
|
|
129353
|
+
if(!bFound) {
|
|
129354
|
+
var aaa = 1; //alert("The Ig type for chain " + chainid + " is " + igType + ". Currently only IgV, IgC1, IgC2 and IgI types are supported for drawing Ig diagrams.");
|
|
129355
|
+
return;
|
|
129356
|
+
}
|
|
129357
|
+
|
|
129358
|
+
// get the hash of refnum to resn
|
|
129359
|
+
let refnum2resn = {};
|
|
129360
|
+
for(let resid in ic.resid2refnum) {
|
|
129361
|
+
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
129362
|
+
if(!atom) continue;
|
|
129363
|
+
|
|
129364
|
+
// let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
|
|
129365
|
+
let resn = me.utilsCls.residueName2Abbr(atom.resn);
|
|
129366
|
+
|
|
129367
|
+
let refnumStr, refnumLabel = ic.resid2refnum[resid];
|
|
129368
|
+
|
|
129369
|
+
if(refnumLabel) {
|
|
129370
|
+
refnumStr = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
|
|
129371
|
+
refnum2resn[refnumStr] = resn;
|
|
129372
|
+
}
|
|
129373
|
+
}
|
|
129374
|
+
|
|
129375
|
+
if(ic.bXlsx === undefined) {
|
|
129376
|
+
let urlScript = "/Structure/icn3d/script/exceljs.min.js";
|
|
129377
|
+
await me.getAjaxPromise(urlScript, 'script');
|
|
129378
|
+
|
|
129379
|
+
ic.bXlsx = true;
|
|
129380
|
+
}
|
|
129381
|
+
|
|
129382
|
+
let url = "/Structure/icn3d/template/igstrand_template_" + igType + ".xlsx";
|
|
129383
|
+
let arrayBuffer = await me.getXMLHttpRqstPromise(url, 'GET', 'arraybuffer', 'xlsx');
|
|
129384
|
+
|
|
129385
|
+
const workbook = new ExcelJS.Workbook();
|
|
129386
|
+
// Load the workbook from the buffer
|
|
129387
|
+
await workbook.xlsx.load(arrayBuffer);
|
|
129388
|
+
const worksheet = workbook.getWorksheet(1);
|
|
129389
|
+
|
|
129390
|
+
// Iterate over all rows that have values
|
|
129391
|
+
worksheet.eachRow({ includeEmpty: true }, (row, rowNumber) => {
|
|
129392
|
+
// Iterate over all cells in the row
|
|
129393
|
+
row.eachCell({ includeEmpty: true }, (cell, colNumber) => {
|
|
129394
|
+
//console.log(`Cell [${rowNumber}, ${colNumber}] = ${cell.value}`);
|
|
129395
|
+
if (cell.value && !isNaN(cell.value) && cell.value > 1000 && cell.value < 10000) {
|
|
129396
|
+
if(refnum2resn.hasOwnProperty(cell.value)) {
|
|
129397
|
+
cell.value = refnum2resn[cell.value];
|
|
129398
|
+
}
|
|
129399
|
+
else {
|
|
129400
|
+
cell.value = '';
|
|
129401
|
+
}
|
|
129402
|
+
}
|
|
129403
|
+
});
|
|
129404
|
+
});
|
|
129405
|
+
|
|
129406
|
+
// Generate the workbook as a Buffer
|
|
129407
|
+
const data = await workbook.xlsx.writeBuffer();
|
|
129408
|
+
|
|
129409
|
+
// Access the underlying ArrayBuffer
|
|
129410
|
+
ic.saveFileCls.saveFile(ic.inputid + '_ig_diagram.xlsx', 'xlsx', data);
|
|
129411
|
+
|
|
129412
|
+
ic.drawCls.draw();
|
|
129413
|
+
}
|
|
129166
129414
|
}
|
|
129167
129415
|
|
|
129168
129416
|
/**
|
|
@@ -131122,7 +131370,12 @@ class SaveFile {
|
|
|
131122
131370
|
//blob = new Blob([data],{ type: "application/octet-stream"});
|
|
131123
131371
|
blob = new Blob(data,{ type: "application/octet-stream"});
|
|
131124
131372
|
}
|
|
131373
|
+
else if(type === 'xlsx') {
|
|
131374
|
+
let data = text; // here text is an array of blobs
|
|
131125
131375
|
|
|
131376
|
+
//blob = new Blob([data],{ type: "application/octet-stream"});
|
|
131377
|
+
blob = new Blob([data], {type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"} );
|
|
131378
|
+
}
|
|
131126
131379
|
if(type !== 'png') {
|
|
131127
131380
|
//https://github.com/eligrey/FileSaver.js/
|
|
131128
131381
|
if(!bReturnBlobOnly) saveAs(blob, filename);
|
|
@@ -135425,7 +135678,7 @@ class iCn3DUI {
|
|
|
135425
135678
|
//even when multiple iCn3D viewers are shown together.
|
|
135426
135679
|
this.pre = this.cfg.divid + "_";
|
|
135427
135680
|
|
|
135428
|
-
this.REVISION = '3.
|
|
135681
|
+
this.REVISION = '3.49.0';
|
|
135429
135682
|
|
|
135430
135683
|
// In nodejs, iCn3D defines "window = {navigator: {}}", and added window = {navigator: {}, "__THREE__":"177"}
|
|
135431
135684
|
this.bNode = (Object.keys(window).length < 3) ? true : false;
|