icn3d 3.23.4 → 3.23.6
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 +300 -50
- package/icn3d.min.js +4 -2
- package/icn3d.module.js +300 -50
- package/package.json +1 -1
package/icn3d.module.js
CHANGED
|
@@ -7940,6 +7940,18 @@ class ClickMenu {
|
|
|
7940
7940
|
thisClass.setLogCmd('color confidence', true);
|
|
7941
7941
|
});
|
|
7942
7942
|
|
|
7943
|
+
me.myEventCls.onIds("#" + me.pre + "mn4_clrIgstrand", "click", function(e) { let ic = me.icn3d; //e.preventDefault();
|
|
7944
|
+
//ic.legendClick = 6;
|
|
7945
|
+
ic.setOptionCls.setOption('color', 'ig strand');
|
|
7946
|
+
thisClass.setLogCmd('color ig strand', true);
|
|
7947
|
+
});
|
|
7948
|
+
|
|
7949
|
+
me.myEventCls.onIds("#" + me.pre + "mn4_clrIgproto", "click", function(e) { let ic = me.icn3d; //e.preventDefault();
|
|
7950
|
+
//ic.legendClick = 6;
|
|
7951
|
+
ic.setOptionCls.setOption('color', 'ig protodomain');
|
|
7952
|
+
thisClass.setLogCmd('color ig protodomain', true);
|
|
7953
|
+
});
|
|
7954
|
+
|
|
7943
7955
|
|
|
7944
7956
|
me.myEventCls.onIds("#" + me.pre + "mn4_clrArea", "click", function(e) { me.icn3d; //e.preventDefault();
|
|
7945
7957
|
me.htmlCls.dialogCls.openDlg('dl_colorbyarea', "Color based on residue's solvent accessibility");
|
|
@@ -10255,6 +10267,10 @@ class SetMenu {
|
|
|
10255
10267
|
//if(!me.cfg.mmtfid && !me.cfg.pdbid && !me.cfg.opmid && !me.cfg.mmdbid && !me.cfg.gi && !me.cfg.uniprotid && !me.cfg.blast_rep_id && !me.cfg.cid && !me.cfg.mmcifid && !me.cfg.align && !me.cfg.chainalign) {
|
|
10256
10268
|
html += this.getRadio('mn4_clr', 'mn4_clrConfidence', 'AlphaFold<br><span style="padding-left:1.5em;">Confidence</span>', undefined, 1, 1);
|
|
10257
10269
|
//}
|
|
10270
|
+
|
|
10271
|
+
//!!!
|
|
10272
|
+
//html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
|
|
10273
|
+
//html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 2);
|
|
10258
10274
|
}
|
|
10259
10275
|
else {
|
|
10260
10276
|
//if(!me.cfg.hidelicense) html += this.getRadio('mn4_clr', 'mn1_delphi2', 'DelPhi<br><span style="padding-left:1.5em;">Potential ' + me.htmlCls.licenseStr + '</span>');
|
|
@@ -10473,6 +10489,7 @@ class SetMenu {
|
|
|
10473
10489
|
html += this.getMenuText('mn6_igrefwrap', 'Ref. Number', undefined, undefined, 1);
|
|
10474
10490
|
|
|
10475
10491
|
html += "<ul>";
|
|
10492
|
+
//!!!
|
|
10476
10493
|
/*
|
|
10477
10494
|
html += this.getLink('mn6_igrefYes', 'Show Ig Ref. Number', undefined, 2);
|
|
10478
10495
|
html += this.getLink('mn6_igrefNo', 'Hide Ig Ref. Number', undefined, 2);
|
|
@@ -11578,7 +11595,7 @@ class SetDialog {
|
|
|
11578
11595
|
html += me.htmlCls.divStr + "dl_mmdbafid' class='" + dialogClass + "' style='max-width:600px'>";
|
|
11579
11596
|
html += "List of PDB, MMDB, or AlphaFold UniProt structures: " + me.htmlCls.inputTextStr + "id='" + me.pre + "mmdbafid' placeholder='e.g., 1HHO,4N7N,P69905,P01942' size=30> <br><br>";
|
|
11580
11597
|
html += "<div style='display:inline-block; width:20px'></div>" + me.htmlCls.buttonStr + "reload_mmdbaf' style='width:150px'>Load Biological Unit</button>" + me.htmlCls.buttonStr + "reload_mmdbaf_asym' style='margin-left:30px; width:250px'>Load Asymmetric Unit (All Chains)</button>" + "<br/><br/>";
|
|
11581
|
-
html += "<div style='display:inline-block; width:20px'>or</div>" + me.htmlCls.buttonStr + "reload_mmdbaf_append' style='width:150px'>Append Biological Unit</button>" + me.htmlCls.buttonStr + "reload_mmdbaf_asym_append' style='margin-left:30px; width:250px'>Append Asymmetric
|
|
11598
|
+
html += "<div style='display:inline-block; width:20px'>or</div>" + me.htmlCls.buttonStr + "reload_mmdbaf_append' style='width:150px'>Append Biological Unit</button>" + me.htmlCls.buttonStr + "reload_mmdbaf_asym_append' style='margin-left:30px; width:250px'>Append Asymmetric Unit (All Chains)</button>" + "<br/><br/>";
|
|
11582
11599
|
|
|
11583
11600
|
html += '<b>Note</b>: The "<b>biological unit</b>" is the <b>biochemically active form of a biomolecule</b>, <div style="width:20px; margin:6px 0 0 20px; display:inline-block;"><span id="'
|
|
11584
11601
|
+ me.pre + 'asu_bu2_expand" class="ui-icon ui-icon-plus icn3d-expand icn3d-link" style="width:15px;" title="Expand"></span><span id="'
|
|
@@ -12712,9 +12729,16 @@ class Events {
|
|
|
12712
12729
|
else {
|
|
12713
12730
|
ic.loadCmd = 'load mmdbaf0 ' + me.cfg.mmdbafid;
|
|
12714
12731
|
}
|
|
12715
|
-
me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
|
|
12732
|
+
me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
|
|
12733
|
+
|
|
12734
|
+
let bStructures = (ic.structures && Object.keys(ic.structures).length > 0) ? true : false;
|
|
12716
12735
|
|
|
12717
12736
|
await ic.chainalignParserCls.downloadMmdbAf(me.cfg.mmdbafid);
|
|
12737
|
+
|
|
12738
|
+
if(bStructures) {
|
|
12739
|
+
if(ic.bSetChainsAdvancedMenu) ic.definedSetsCls.showSets();
|
|
12740
|
+
if(ic.bAnnoShown) await ic.showAnnoCls.showAnnotations();
|
|
12741
|
+
}
|
|
12718
12742
|
}
|
|
12719
12743
|
}
|
|
12720
12744
|
}
|
|
@@ -32738,6 +32762,8 @@ class Alternate {
|
|
|
32738
32762
|
|
|
32739
32763
|
ic.dAtoms = {};
|
|
32740
32764
|
|
|
32765
|
+
let bMutation = moleculeArray.length == 2 && moleculeArray[1].replace(moleculeArray[0], '') == '2';
|
|
32766
|
+
|
|
32741
32767
|
for(let i = 0, il = moleculeArray.length; i < il; ++i) {
|
|
32742
32768
|
let structure = moleculeArray[i];
|
|
32743
32769
|
//if(i > ic.ALTERNATE_STRUCTURE || (ic.ALTERNATE_STRUCTURE === il - 1 && i === 0) ) {
|
|
@@ -32770,7 +32796,17 @@ class Alternate {
|
|
|
32770
32796
|
|
|
32771
32797
|
if(ic.ALTERNATE_STRUCTURE < 0) ic.ALTERNATE_STRUCTURE += il;
|
|
32772
32798
|
|
|
32773
|
-
|
|
32799
|
+
let label = '';
|
|
32800
|
+
if(bMutation) {
|
|
32801
|
+
if(i == 0) {
|
|
32802
|
+
label = "Wild Type ";
|
|
32803
|
+
}
|
|
32804
|
+
else if(i == 1) {
|
|
32805
|
+
label = "Mutant ";
|
|
32806
|
+
}
|
|
32807
|
+
}
|
|
32808
|
+
|
|
32809
|
+
$("#" + ic.pre + "title").html(label + structure);
|
|
32774
32810
|
|
|
32775
32811
|
break;
|
|
32776
32812
|
}
|
|
@@ -35267,6 +35303,64 @@ class SetColor {
|
|
|
35267
35303
|
|
|
35268
35304
|
break;
|
|
35269
35305
|
|
|
35306
|
+
case 'ig strand':
|
|
35307
|
+
if(ic.bShowRefnum) {
|
|
35308
|
+
for(let resid in ic.resid2refnum) {
|
|
35309
|
+
let refnumLabel = ic.resid2refnum[resid];
|
|
35310
|
+
let color;
|
|
35311
|
+
if(!refnumLabel) {
|
|
35312
|
+
color = me.parasCls.thr(me.htmlCls.GREYB);
|
|
35313
|
+
}
|
|
35314
|
+
else {
|
|
35315
|
+
let refnumStr = refnumLabel.replace(/'/g, '').replace(/\*/g, '').replace(/\^/g, '').substr(1); // C', C''
|
|
35316
|
+
let currStrand = refnumLabel.replace(new RegExp(refnumStr,'g'), '');
|
|
35317
|
+
color = ic.showSeqCls.getRefnumColor(currStrand);
|
|
35318
|
+
|
|
35319
|
+
if(ic.residIgLoop.hasOwnProperty(resid)) {
|
|
35320
|
+
color = me.parasCls.thr(me.htmlCls.GREYB);
|
|
35321
|
+
}
|
|
35322
|
+
}
|
|
35323
|
+
|
|
35324
|
+
for (let i in ic.residues[resid]) {
|
|
35325
|
+
let atom = ic.atoms[i];
|
|
35326
|
+
atom.color = me.parasCls.thr(color);
|
|
35327
|
+
|
|
35328
|
+
ic.atomPrevColors[i] = atom.color;
|
|
35329
|
+
}
|
|
35330
|
+
}
|
|
35331
|
+
}
|
|
35332
|
+
|
|
35333
|
+
break;
|
|
35334
|
+
|
|
35335
|
+
case 'ig protodomain':
|
|
35336
|
+
if(ic.bShowRefnum) {
|
|
35337
|
+
for(let resid in ic.resid2refnum) {
|
|
35338
|
+
let refnumLabel = ic.resid2refnum[resid];
|
|
35339
|
+
let color;
|
|
35340
|
+
if(!refnumLabel) {
|
|
35341
|
+
color = me.parasCls.thr(me.htmlCls.GREYB);
|
|
35342
|
+
}
|
|
35343
|
+
else {
|
|
35344
|
+
let refnumStr = refnumLabel.replace(/'/g, '').replace(/\*/g, '').replace(/\^/g, '').substr(1); // C', C''
|
|
35345
|
+
let currStrand = refnumLabel.replace(new RegExp(refnumStr,'g'), '');
|
|
35346
|
+
color = ic.showSeqCls.getProtodomainColor(currStrand);
|
|
35347
|
+
|
|
35348
|
+
if(ic.residIgLoop.hasOwnProperty(resid)) {
|
|
35349
|
+
color = me.parasCls.thr(me.htmlCls.GREYB);
|
|
35350
|
+
}
|
|
35351
|
+
}
|
|
35352
|
+
|
|
35353
|
+
for (let i in ic.residues[resid]) {
|
|
35354
|
+
let atom = ic.atoms[i];
|
|
35355
|
+
atom.color = me.parasCls.thr(color);
|
|
35356
|
+
|
|
35357
|
+
ic.atomPrevColors[i] = atom.color;
|
|
35358
|
+
}
|
|
35359
|
+
}
|
|
35360
|
+
}
|
|
35361
|
+
|
|
35362
|
+
break;
|
|
35363
|
+
|
|
35270
35364
|
case 'residue custom':
|
|
35271
35365
|
for (let i in atoms) {
|
|
35272
35366
|
let atom = ic.atoms[i];
|
|
@@ -35928,6 +36022,12 @@ class SetOption {
|
|
|
35928
36022
|
else if(colorType == 'hydrophobic') {
|
|
35929
36023
|
colorLabel = 'Hydrophobicity';
|
|
35930
36024
|
}
|
|
36025
|
+
else if(colorType == 'ig strand') {
|
|
36026
|
+
colorLabel = 'Ig Strand';
|
|
36027
|
+
}
|
|
36028
|
+
else if(colorType == 'ig protodomain') {
|
|
36029
|
+
colorLabel = 'Ig Protodomain';
|
|
36030
|
+
}
|
|
35931
36031
|
|
|
35932
36032
|
let html = "Color by <b>" + colorLabel + "</b><br><br>";
|
|
35933
36033
|
|
|
@@ -35948,6 +36048,12 @@ class SetOption {
|
|
|
35948
36048
|
else if (colorType == 'charge'){
|
|
35949
36049
|
html += this.getColorLegendForCharge(ic.hAtoms);
|
|
35950
36050
|
}
|
|
36051
|
+
else if (colorType == 'ig strand'){
|
|
36052
|
+
html += this.getColorLegendForIgstrand(ic.hAtoms);
|
|
36053
|
+
}
|
|
36054
|
+
else if (colorType == 'ig protodomain'){
|
|
36055
|
+
html += this.getColorLegendForIgproto(ic.hAtoms);
|
|
36056
|
+
}
|
|
35951
36057
|
//else if (ic.legendClick == 4){
|
|
35952
36058
|
else if (colorType == 'normalized hydrophobic' || colorType == 'hydrophobic') {
|
|
35953
36059
|
let bOriResn = true;
|
|
@@ -36171,6 +36277,70 @@ class SetOption {
|
|
|
36171
36277
|
|
|
36172
36278
|
return html;
|
|
36173
36279
|
}
|
|
36280
|
+
|
|
36281
|
+
getColorLegendForIgstrand(atomHash) { let ic = this.icn3d; ic.icn3dui;
|
|
36282
|
+
let html = '';
|
|
36283
|
+
|
|
36284
|
+
const name2color = {
|
|
36285
|
+
"A^ Strand": "FF00FF",
|
|
36286
|
+
"A Strand": "663399",
|
|
36287
|
+
"A* Strand": "FFC0CB",
|
|
36288
|
+
"A' Strand": "663399", //"9370db",
|
|
36289
|
+
"B Strand": "ba55d3",
|
|
36290
|
+
"C Strand": "0000FF",
|
|
36291
|
+
"C' Strand": "6495ED",
|
|
36292
|
+
"C'' Strand": "006400",
|
|
36293
|
+
"D Strand": "00FF00",
|
|
36294
|
+
"E Strand": "F7DC6F", //"F0E68C",
|
|
36295
|
+
"F Strand": "FFA500",
|
|
36296
|
+
"G Strand": "FF0000",
|
|
36297
|
+
"G* Strand": "8B0000",
|
|
36298
|
+
"Loop": "CCCCCC"
|
|
36299
|
+
};
|
|
36300
|
+
|
|
36301
|
+
html += "<div>";
|
|
36302
|
+
for (let name in name2color) {
|
|
36303
|
+
let color = name2color[name];
|
|
36304
|
+
html += "<span>";
|
|
36305
|
+
html += "<div style='width: 10px; height: 10px; background-color:#" + color + "; border: 0px;display:inline-block;' ></div> ";
|
|
36306
|
+
html += name;
|
|
36307
|
+
html += "</span><br>";
|
|
36308
|
+
}
|
|
36309
|
+
|
|
36310
|
+
html += "</div>";
|
|
36311
|
+
|
|
36312
|
+
return html;
|
|
36313
|
+
}
|
|
36314
|
+
|
|
36315
|
+
getColorLegendForIgproto(atomHash) { let ic = this.icn3d; ic.icn3dui;
|
|
36316
|
+
let html = '';
|
|
36317
|
+
|
|
36318
|
+
const name2color = {
|
|
36319
|
+
"A Strand": "0000FF",
|
|
36320
|
+
"B Strand": "006400",
|
|
36321
|
+
"C Strand": "F7DC6F", //"F0E68C",
|
|
36322
|
+
"C' Strand": "FFA500",
|
|
36323
|
+
"C'' Strand": "FF0000",
|
|
36324
|
+
"D Strand": "0000FF",
|
|
36325
|
+
"E Strand": "006400",
|
|
36326
|
+
"F Strand": "F7DC6F", //"F0E68C",
|
|
36327
|
+
"G Strand": "FFA500",
|
|
36328
|
+
"Loop": "CCCCCC"
|
|
36329
|
+
};
|
|
36330
|
+
|
|
36331
|
+
html += "<div>";
|
|
36332
|
+
for (let name in name2color) {
|
|
36333
|
+
let color = name2color[name];
|
|
36334
|
+
html += "<span>";
|
|
36335
|
+
html += "<div style='width: 10px; height: 10px; background-color:#" + color + "; border: 0px;display:inline-block;' ></div> ";
|
|
36336
|
+
html += name;
|
|
36337
|
+
html += "</span><br>";
|
|
36338
|
+
}
|
|
36339
|
+
|
|
36340
|
+
html += "</div>";
|
|
36341
|
+
|
|
36342
|
+
return html;
|
|
36343
|
+
}
|
|
36174
36344
|
}
|
|
36175
36345
|
|
|
36176
36346
|
/**
|
|
@@ -41289,6 +41459,14 @@ class ShowAnno {
|
|
|
41289
41459
|
} // align seq to structure
|
|
41290
41460
|
}
|
|
41291
41461
|
ic.bAnnoShown = true;
|
|
41462
|
+
|
|
41463
|
+
if(ic.bShowRefnum) {
|
|
41464
|
+
ic.opts.color = 'ig strand';
|
|
41465
|
+
ic.setColorCls.setColorByOptions(ic.opts, ic.atoms);
|
|
41466
|
+
|
|
41467
|
+
ic.selectionCls.selectAll_base();
|
|
41468
|
+
ic.hlUpdateCls.updateHlAll();
|
|
41469
|
+
}
|
|
41292
41470
|
}
|
|
41293
41471
|
|
|
41294
41472
|
async showAnnoSeqData(nucleotide_chainid, chemical_chainid, chemical_set) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -42288,6 +42466,8 @@ class ShowSeq {
|
|
|
42288
42466
|
let html = '', html3 = '';
|
|
42289
42467
|
|
|
42290
42468
|
let chainList = '';
|
|
42469
|
+
if(!ic.chainid2index[chnid]) return {html: html, html3: html3};
|
|
42470
|
+
|
|
42291
42471
|
for(let i = 0, il = ic.chainid2index[chnid].length; i < il; ++i) {
|
|
42292
42472
|
chainList += ic.refpdbArray[ic.chainid2index[chnid][i]] + " ";
|
|
42293
42473
|
}
|
|
@@ -42579,6 +42759,7 @@ class ShowSeq {
|
|
|
42579
42759
|
else {
|
|
42580
42760
|
if(bShowRefnum && currStrand != ' ') {
|
|
42581
42761
|
html += this.getRefnumHtml(residueid, refnumStr, refnumStr_ori, refnumLabel, currStrand, bLoop, bHidelabel);
|
|
42762
|
+
if(bLoop) ic.residIgLoop[residueid] = 1;
|
|
42582
42763
|
}
|
|
42583
42764
|
else {
|
|
42584
42765
|
html += '<span></span>';
|
|
@@ -42626,6 +42807,7 @@ class ShowSeq {
|
|
|
42626
42807
|
|
|
42627
42808
|
if(bShowRefnum && currStrand != ' ') {
|
|
42628
42809
|
html += this.getRefnumHtml(residueid, refnumStr, refnumStr_ori, refnumLabel, currStrand, bLoop, bHidelabel);
|
|
42810
|
+
if(bLoop) ic.residIgLoop[residueid] = 1;
|
|
42629
42811
|
}
|
|
42630
42812
|
else {
|
|
42631
42813
|
html += '<span></span>';
|
|
@@ -42758,48 +42940,69 @@ class ShowSeq {
|
|
|
42758
42940
|
return html;
|
|
42759
42941
|
}
|
|
42760
42942
|
|
|
42761
|
-
getRefnumColor(currStrand) { let ic = this.icn3d
|
|
42762
|
-
if(currStrand == "A^") { // deep sky blue
|
|
42763
|
-
return '#9900ff'; //'#00BFFF';
|
|
42943
|
+
getRefnumColor(currStrand) { let ic = this.icn3d, me = ic.icn3dui;
|
|
42944
|
+
if(currStrand == "A^") { //magenta // deep sky blue
|
|
42945
|
+
return '#FF00FF'; //'#9900ff'; //'#00BFFF';
|
|
42946
|
+
}
|
|
42947
|
+
else if(currStrand == "A") { //rebecca purple // blue
|
|
42948
|
+
return '#663399'; //'#9900ff'; //'#0000FF';
|
|
42949
|
+
}
|
|
42950
|
+
else if(currStrand == "A*") { //pink // sky blue
|
|
42951
|
+
return '#FFC0CB'; //'#9900ff'; //'#87CEEB';
|
|
42952
|
+
}
|
|
42953
|
+
else if(currStrand == "A'") { //medium purple // steel blue
|
|
42954
|
+
return '#663399'; //'#9370db'; //'#9900ff'; //'#4682B4';
|
|
42955
|
+
}
|
|
42956
|
+
else if(currStrand == "B") { //medium orchid // cyan
|
|
42957
|
+
return '#ba55d3'; //'#0000FF'; //'#4a86e8'; //'#00FFFF';
|
|
42958
|
+
}
|
|
42959
|
+
else if(currStrand == "C") { //blue // green
|
|
42960
|
+
return '#0000FF'; //'#76d6ff'; //'#00FF00';
|
|
42961
|
+
}
|
|
42962
|
+
else if(currStrand == "C'") { //corn blue // yellow
|
|
42963
|
+
return '#6495ED'; //'#006400'; //'#00b050'; //'#FFFF00';
|
|
42764
42964
|
}
|
|
42765
|
-
else if(currStrand == "
|
|
42766
|
-
return '#
|
|
42965
|
+
else if(currStrand == "C''") { //dark green // orange
|
|
42966
|
+
return '#006400'; //'#00ff00'; //'#FFA500';
|
|
42767
42967
|
}
|
|
42768
|
-
else if(currStrand == "
|
|
42769
|
-
return '#
|
|
42968
|
+
else if(currStrand == "D") { //green // brown
|
|
42969
|
+
return '#00FF00'; //'#fffb00'; //'#A52A2A';
|
|
42770
42970
|
}
|
|
42771
|
-
else if(currStrand == "
|
|
42772
|
-
return '#
|
|
42971
|
+
else if(currStrand == "E") { //yellow // pink
|
|
42972
|
+
return "#F7DC6F"; //'#F0E68C'; //'#ff9900'; //'#ffd966'; //'#FFC0CB';
|
|
42773
42973
|
}
|
|
42774
|
-
else if(currStrand == "
|
|
42775
|
-
return '#
|
|
42974
|
+
else if(currStrand == "F") { //orange // magenta
|
|
42975
|
+
return '#FFA500'; //'#FF00FF'; //'#ff9900'; //'#FF00FF';
|
|
42776
42976
|
}
|
|
42777
|
-
else if(currStrand == "
|
|
42778
|
-
return '#
|
|
42977
|
+
else if(currStrand == "G") { //red // red
|
|
42978
|
+
return '#FF0000'; //'#ff2600'; //'#FF0000';
|
|
42779
42979
|
}
|
|
42780
|
-
else if(currStrand == "
|
|
42781
|
-
return '#
|
|
42980
|
+
else if(currStrand == "G*") { //dark red // salmon
|
|
42981
|
+
return '#8B0000'; //'#ff2600'; //'#FA8072';
|
|
42782
42982
|
}
|
|
42783
|
-
else
|
|
42784
|
-
return
|
|
42983
|
+
else {
|
|
42984
|
+
return me.htmlCls.GREYB;
|
|
42785
42985
|
}
|
|
42786
|
-
|
|
42787
|
-
|
|
42986
|
+
}
|
|
42987
|
+
|
|
42988
|
+
getProtodomainColor(currStrand) { let ic = this.icn3d, me = ic.icn3dui;
|
|
42989
|
+
if((currStrand && currStrand.substr(0,1) == "A") || currStrand == "D") {
|
|
42990
|
+
return '#0000FF';
|
|
42788
42991
|
}
|
|
42789
|
-
else if(currStrand == "E") {
|
|
42790
|
-
return '#
|
|
42992
|
+
else if(currStrand == "B" || currStrand == "E") {
|
|
42993
|
+
return '#006400';
|
|
42791
42994
|
}
|
|
42792
|
-
else if(currStrand == "F") {
|
|
42793
|
-
return
|
|
42995
|
+
else if(currStrand == "C" || currStrand == "F") {
|
|
42996
|
+
return "#F7DC6F"; //'#F0E68C';
|
|
42794
42997
|
}
|
|
42795
|
-
else if(currStrand == "G") {
|
|
42796
|
-
return '#
|
|
42998
|
+
else if(currStrand == "C'" || (currStrand && currStrand.substr(0, 1) == "G")) {
|
|
42999
|
+
return '#FFA500';
|
|
42797
43000
|
}
|
|
42798
|
-
else if(currStrand == "
|
|
42799
|
-
return '#
|
|
43001
|
+
else if(currStrand == "C''") { //linker
|
|
43002
|
+
return '#FF0000';
|
|
42800
43003
|
}
|
|
42801
43004
|
else {
|
|
42802
|
-
return
|
|
43005
|
+
return me.htmlCls.GREYB;
|
|
42803
43006
|
}
|
|
42804
43007
|
}
|
|
42805
43008
|
|
|
@@ -43865,7 +44068,7 @@ class LineGraph {
|
|
|
43865
44068
|
// Node for common interaction: {id : "Q24.A.2AJF|Q24", r : "1_1_2AJF_A_24", s: "a", ...}
|
|
43866
44069
|
let nodeArray1SplitCommon = [], nodeArray2SplitCommon = [], linkArraySplitCommon = [], nameHashSplitCommon = [];
|
|
43867
44070
|
let nodeArray1SplitDiff = [], nodeArray2SplitDiff = [], linkArraySplitDiff = [], nameHashSplitDiff = [];
|
|
43868
|
-
let linkedNodeCnt = {};
|
|
44071
|
+
let linkedNodeCnt = {}, linkedNodeInterDiff = {};
|
|
43869
44072
|
|
|
43870
44073
|
for(let i = 0, il = structureArray.length; i < il; ++i) {
|
|
43871
44074
|
nodeArray1Split[i] = [];
|
|
@@ -43885,7 +44088,7 @@ class LineGraph {
|
|
|
43885
44088
|
|
|
43886
44089
|
struc2index[structureArray[i]] = i;
|
|
43887
44090
|
}
|
|
43888
|
-
|
|
44091
|
+
|
|
43889
44092
|
for(let i = 0, il = linkArray.length; i < il; ++i) {
|
|
43890
44093
|
let link = linkArray[i];
|
|
43891
44094
|
let nodeA = name2node[link.source];
|
|
@@ -43921,9 +44124,11 @@ class LineGraph {
|
|
|
43921
44124
|
|
|
43922
44125
|
if(!linkedNodeCnt.hasOwnProperty(mappingid)) {
|
|
43923
44126
|
linkedNodeCnt[mappingid] = 1;
|
|
44127
|
+
linkedNodeInterDiff[mappingid] = link.n;
|
|
43924
44128
|
}
|
|
43925
44129
|
else {
|
|
43926
44130
|
++linkedNodeCnt[mappingid];
|
|
44131
|
+
linkedNodeInterDiff[mappingid] -= link.n; // show difference
|
|
43927
44132
|
}
|
|
43928
44133
|
}
|
|
43929
44134
|
}
|
|
@@ -43974,7 +44179,7 @@ class LineGraph {
|
|
|
43974
44179
|
linkDiff.source += separatorDiff + ic.chainsMapping[chainid1][resid1];
|
|
43975
44180
|
linkDiff.target += separatorDiff + ic.chainsMapping[chainid2][resid2];
|
|
43976
44181
|
|
|
43977
|
-
if(linkedNodeCnt[mappingid] == structureArray.length) {
|
|
44182
|
+
if(linkedNodeCnt[mappingid] == structureArray.length && linkedNodeInterDiff[mappingid] == 0) {
|
|
43978
44183
|
linkArraySplitCommon[index].push(linkCommon);
|
|
43979
44184
|
}
|
|
43980
44185
|
else {
|
|
@@ -44763,7 +44968,10 @@ class GetGraph {
|
|
|
44763
44968
|
ic.hBondCls.calculateChemicalHbonds(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge, 'graph', true );
|
|
44764
44969
|
resid2ResidhashHbond = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
44765
44970
|
}
|
|
44766
|
-
|
|
44971
|
+
|
|
44972
|
+
//let hbondStr = this.getGraphLinks(resid2ResidhashHbond, resid2ResidhashHbond, me.htmlCls.hbondInsideColor, labelType, me.htmlCls.hbondValuehbondInsideValue);
|
|
44973
|
+
let hbondStr = this.getGraphLinks(resid2ResidhashHbond, resid2ResidhashHbond, me.htmlCls.hbondInsideColor, labelType, me.htmlCls.hbondInsideValue);
|
|
44974
|
+
|
|
44767
44975
|
return hbondStr;
|
|
44768
44976
|
}
|
|
44769
44977
|
getIonicLinksForSet(atoms, labelType) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -44863,9 +45071,10 @@ class GetGraph {
|
|
|
44863
45071
|
getGraphLinks(hash1, hash2, color, labelType, value, bCartoon2d) {var ic = this.icn3d, me = ic.icn3dui;
|
|
44864
45072
|
let hbondStr = '';
|
|
44865
45073
|
value =(value === undefined) ? 1 : value;
|
|
44866
|
-
let prevLinkStr = '';
|
|
44867
|
-
let sourceTargetHash = {};
|
|
45074
|
+
//let prevLinkStr = '';
|
|
45075
|
+
//let sourceTargetHash = {};
|
|
44868
45076
|
|
|
45077
|
+
let linkstr2cnt = {};
|
|
44869
45078
|
for(let resid1 in hash1) {
|
|
44870
45079
|
//ASN $1KQ2.A:6@ND2
|
|
44871
45080
|
//or ASN $1KQ2.A:6
|
|
@@ -44896,7 +45105,7 @@ class GetGraph {
|
|
|
44896
45105
|
resName1 = ic.resi2resirange[resName1];
|
|
44897
45106
|
resName2 = ic.resi2resirange[resName2];
|
|
44898
45107
|
}
|
|
44899
|
-
|
|
45108
|
+
/*
|
|
44900
45109
|
if(!sourceTargetHash.hasOwnProperty(resName1 + '_' + resName2) && resName1 !== undefined && resName2 !== undefined ) {
|
|
44901
45110
|
let linkStr = ', {"source": "' + resName1 + '", "target": "' + resName2 + '", "v": ' + value + ', "c": "' + color + '"}';
|
|
44902
45111
|
if(linkStr != prevLinkStr) hbondStr += linkStr;
|
|
@@ -44905,8 +45114,29 @@ class GetGraph {
|
|
|
44905
45114
|
sourceTargetHash[resName1 + '_' + resName2] = 1;
|
|
44906
45115
|
sourceTargetHash[resName2 + '_' + resName1] = 1;
|
|
44907
45116
|
}
|
|
45117
|
+
*/
|
|
45118
|
+
|
|
45119
|
+
if(resName1 !== undefined && resName2 !== undefined ) {
|
|
45120
|
+
let linkStr = '"source": "' + resName1 + '", "target": "' + resName2 + '", "v": ' + value + ', "c": "' + color + '"';
|
|
45121
|
+
|
|
45122
|
+
//prevLinkStr = linkStr;
|
|
45123
|
+
|
|
45124
|
+
if(!linkstr2cnt.hasOwnProperty(linkStr)) {
|
|
45125
|
+
linkstr2cnt[linkStr] = 1;
|
|
45126
|
+
linkstr2cnt[linkStr] = 1;
|
|
45127
|
+
}
|
|
45128
|
+
else {
|
|
45129
|
+
linkstr2cnt[linkStr] += 1;
|
|
45130
|
+
linkstr2cnt[linkStr] += 1;
|
|
45131
|
+
}
|
|
45132
|
+
}
|
|
44908
45133
|
}
|
|
44909
45134
|
}
|
|
45135
|
+
|
|
45136
|
+
for(let linkStr in linkstr2cnt) {
|
|
45137
|
+
hbondStr += ', {' + linkStr + ', "n": ' + linkstr2cnt[linkStr] + '}';
|
|
45138
|
+
}
|
|
45139
|
+
|
|
44910
45140
|
return hbondStr;
|
|
44911
45141
|
}
|
|
44912
45142
|
convertLabel2Resid(residLabel) {var ic = this.icn3d; ic.icn3dui;
|
|
@@ -45342,12 +45572,14 @@ class ViewInterPairs {
|
|
|
45342
45572
|
let bondCnt;
|
|
45343
45573
|
|
|
45344
45574
|
// reset
|
|
45345
|
-
|
|
45346
|
-
|
|
45347
|
-
|
|
45348
|
-
|
|
45349
|
-
|
|
45350
|
-
|
|
45575
|
+
if(!bHbondCalc) {
|
|
45576
|
+
ic.hbondpnts = [];
|
|
45577
|
+
ic.saltbridgepnts = [];
|
|
45578
|
+
ic.contactpnts = [];
|
|
45579
|
+
ic.halogenpnts = [];
|
|
45580
|
+
ic.picationpnts = [];
|
|
45581
|
+
ic.pistackingpnts = [];
|
|
45582
|
+
}
|
|
45351
45583
|
|
|
45352
45584
|
// type: view, save, forcegraph
|
|
45353
45585
|
ic.bRender = false;
|
|
@@ -48041,7 +48273,18 @@ class ChainalignParser {
|
|
|
48041
48273
|
}
|
|
48042
48274
|
|
|
48043
48275
|
// ic.deferredMmdbaf = $.Deferred(function() {
|
|
48044
|
-
let
|
|
48276
|
+
let structArrayTmp = idlist.split(',');
|
|
48277
|
+
|
|
48278
|
+
let structArray = [];
|
|
48279
|
+
// remove redundant structures
|
|
48280
|
+
for(let i = 0, il = structArrayTmp.length; i < il; ++i) {
|
|
48281
|
+
if(!ic.structures.hasOwnProperty(structArrayTmp[i].toUpperCase())) {
|
|
48282
|
+
structArray.push(structArrayTmp[i]);
|
|
48283
|
+
}
|
|
48284
|
+
}
|
|
48285
|
+
|
|
48286
|
+
if(structArray.length == 0) return;
|
|
48287
|
+
|
|
48045
48288
|
ic.structArray = ic.structArray.concat(structArray);
|
|
48046
48289
|
|
|
48047
48290
|
let ajaxArray = [];
|
|
@@ -48498,7 +48741,7 @@ class MmcifParser {
|
|
|
48498
48741
|
}
|
|
48499
48742
|
|
|
48500
48743
|
async downloadMmcifSymmetry(mmcifid, type) { let ic = this.icn3d, me = ic.icn3dui;
|
|
48501
|
-
// https://files.rcsb.org/header/
|
|
48744
|
+
// https://files.rcsb.org/header/ is not accessible in Node.js
|
|
48502
48745
|
let url = (me.bNode) ? "https://files.rcsb.org/view/" + mmcifid + ".cif" : "https://files.rcsb.org/header/" + mmcifid + ".cif";
|
|
48503
48746
|
|
|
48504
48747
|
//ic.bCid = undefined;
|
|
@@ -49797,7 +50040,8 @@ class PdbParser {
|
|
|
49797
50040
|
}
|
|
49798
50041
|
else {
|
|
49799
50042
|
url = "https://files.rcsb.org/view/" + pdbid + ".pdb";
|
|
49800
|
-
|
|
50043
|
+
pdbid = pdbid.toUpperCase();
|
|
50044
|
+
ic.ParserUtilsCls.setYourNote(pdbid + '(PDB) in iCn3D');
|
|
49801
50045
|
}
|
|
49802
50046
|
|
|
49803
50047
|
//ic.bCid = undefined;
|
|
@@ -55106,6 +55350,7 @@ class LoadPDB {
|
|
|
55106
55350
|
//let chainMissingResidueArray = {}
|
|
55107
55351
|
|
|
55108
55352
|
let id = (pdbid) ? pdbid : ic.defaultPdbId;
|
|
55353
|
+
|
|
55109
55354
|
let structure = id;
|
|
55110
55355
|
|
|
55111
55356
|
let prevMissingChain = '';
|
|
@@ -59528,6 +59773,10 @@ class LoadScript {
|
|
|
59528
59773
|
|
|
59529
59774
|
// load pdb, mmcif, mmdb, cid
|
|
59530
59775
|
let id = loadStr.substr(loadStr.lastIndexOf(' ') + 1);
|
|
59776
|
+
|
|
59777
|
+
// skip loading the structure if it was loaded before
|
|
59778
|
+
if(ic.structures.hasOwnProperty(id)) return;
|
|
59779
|
+
|
|
59531
59780
|
ic.inputid = id;
|
|
59532
59781
|
if(command.indexOf('load mmtf') !== -1) {
|
|
59533
59782
|
me.cfg.mmtfid = id;
|
|
@@ -59602,7 +59851,7 @@ class LoadScript {
|
|
|
59602
59851
|
else if(command.indexOf('load alignment') !== -1) {
|
|
59603
59852
|
me.cfg.align = id;
|
|
59604
59853
|
|
|
59605
|
-
if(me.cfg.inpara.indexOf('atype=2') == -1) {
|
|
59854
|
+
if(me.cfg.inpara || me.cfg.inpara.indexOf('atype=2') == -1) {
|
|
59606
59855
|
await ic.alignParserCls.downloadAlignment(me.cfg.align);
|
|
59607
59856
|
}
|
|
59608
59857
|
else {
|
|
@@ -70158,7 +70407,7 @@ class iCn3D {
|
|
|
70158
70407
|
this.optsOri = {};
|
|
70159
70408
|
this.optsOri['camera'] = 'perspective'; //perspective, orthographic
|
|
70160
70409
|
this.optsOri['background'] = 'black'; //transparent, black, grey, white
|
|
70161
|
-
this.optsOri['color'] = 'chain'; //spectrum, secondary structure, charge, hydrophobic, conserved, chain, residue, atom, b factor, red, green, blue, magenta, yellow, cyan, white, grey, custom
|
|
70410
|
+
this.optsOri['color'] = 'chain'; //spectrum, secondary structure, charge, hydrophobic, conserved, chain, residue, atom, b factor, red, green, blue, magenta, yellow, cyan, white, grey, custom, ig strand
|
|
70162
70411
|
this.optsOri['proteins'] = 'ribbon'; //ribbon, strand, cylinder and plate, schematic, c alpha trace, backbone, b factor tube, lines, stick, ball and stick, sphere, nothing
|
|
70163
70412
|
this.optsOri['sidec'] = 'nothing'; //lines2, stick2, ball and stick2, sphere2, nothing
|
|
70164
70413
|
this.optsOri['nucleotides'] = 'nucleotide cartoon'; //nucleotide cartoon, o3 trace, backbone, schematic, lines, stick,
|
|
@@ -70425,6 +70674,7 @@ iCn3D.prototype.init_base = function (bKeepCmd) {
|
|
|
70425
70674
|
|
|
70426
70675
|
this.chainsMapping = {}; // structure_chain name -> residue id hash such as {'structure_chain_resi1': 'reference residue such as K10', ...}
|
|
70427
70676
|
this.resid2refnum = {}; // residue id -> reference number, e.g., {'1WIO_A_16': '2150', ...}
|
|
70677
|
+
this.residIgLoop = {}; // residue ids in the loop regions of ig domain
|
|
70428
70678
|
this.refnum2residArray = {}; // reference number -> array of residue id, e.g., {'2150': ['1WIO_A_16', ...], ...}
|
|
70429
70679
|
this.bShowRefnum = false;
|
|
70430
70680
|
|
|
@@ -70597,7 +70847,7 @@ class iCn3DUI {
|
|
|
70597
70847
|
//even when multiple iCn3D viewers are shown together.
|
|
70598
70848
|
this.pre = this.cfg.divid + "_";
|
|
70599
70849
|
|
|
70600
|
-
this.REVISION = '3.23.
|
|
70850
|
+
this.REVISION = '3.23.2';
|
|
70601
70851
|
|
|
70602
70852
|
// In nodejs, iCn3D defines "window = {navigator: {}}"
|
|
70603
70853
|
this.bNode = (Object.keys(window).length < 2) ? true : false;
|