icn3d 3.34.1 → 3.34.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/icn3d.js +163 -97
- package/icn3d.min.js +5 -3
- package/icn3d.module.js +163 -97
- package/package.json +1 -1
package/icn3d.module.js
CHANGED
|
@@ -15030,10 +15030,10 @@ class SetDialog {
|
|
|
15030
15030
|
|
|
15031
15031
|
html += me.htmlCls.divStr + "dl_blast_rep_id' style='max-width:600px;' class='" + dialogClass + "'>";
|
|
15032
15032
|
html += this.addNotebookTitle('dl_blast_rep_id', 'Align sequence to structure');
|
|
15033
|
-
html += "Enter a
|
|
15034
|
-
html += "<b>Sequence ID</b>(NCBI protein accession of a sequence): " + me.htmlCls.inputTextStr + "id='" + me.pre + "query_id' value='NP_001108451.1' size=8><br> ";
|
|
15033
|
+
html += "Enter a protein sequence ID (or FASTA sequence) and the aligned protein accession, which can be found using the <a href='https://blast.ncbi.nlm.nih.gov/Blast.cgi?PROGRAM=blastp&PAGE_TYPE=BlastSearch' target='_blank'>BLAST</a> search with the protein sequence ID or FASTA sequence as input. If the protein accession is not a PDB chain, the corresponding AlphaFold UniProt structure is used.<br><br> ";
|
|
15034
|
+
html += "<b>Protein Sequence ID</b>(NCBI protein accession of a sequence): " + me.htmlCls.inputTextStr + "id='" + me.pre + "query_id' value='NP_001108451.1' size=8><br> ";
|
|
15035
15035
|
html += "or FASTA sequence: <br><textarea id='" + me.pre + "query_fasta' rows='5' style='width: 100%; height: " +(me.htmlCls.LOG_HEIGHT) + "px; padding: 0px; border: 0px;'></textarea><br><br>";
|
|
15036
|
-
html += "<b>
|
|
15036
|
+
html += "<b>Aligned Protein Accession</b> (or a chain of a PDB): " + me.htmlCls.inputTextStr + "id='" + me.pre + "blast_rep_id' value='1TSR_A' size=8><br> ";
|
|
15037
15037
|
//html += me.htmlCls.buttonStr + "reload_blast_rep_id'>Load</button>";
|
|
15038
15038
|
html += me.htmlCls.buttonStr + "reload_blast_rep_id'>Align with BLAST</button> " + me.htmlCls.wifiStr
|
|
15039
15039
|
+ me.htmlCls.buttonStr + "reload_alignsw' style='margin-left:30px'>Align with Global Smith-Waterman</button>"
|
|
@@ -15444,7 +15444,7 @@ class SetDialog {
|
|
|
15444
15444
|
html += me.htmlCls.divStr + "dl_ligplot' sty2D Interaction for One Ligand/Residule='background-color:white' class='" + dialogClass + "'>";
|
|
15445
15445
|
html += this.addNotebookTitle('dl_ligplot', 'e with Atom Details');
|
|
15446
15446
|
|
|
15447
|
-
html += me.htmlCls.divNowrapStr + "<b>Note</b>: Nodes can be dragged
|
|
15447
|
+
html += me.htmlCls.divNowrapStr + "<b>Note</b>: Nodes/Residues can be dragged. Both nodes and dashed lines/interactions can be clicked to select residues. " + me.htmlCls.space3;
|
|
15448
15448
|
|
|
15449
15449
|
html += '<div style="width:20px; margin-top:6px; display:inline-block;"><span id="'
|
|
15450
15450
|
+ me.pre + 'dl_ligplotcolor_expand" class="ui-icon ui-icon-plus icn3d-expand icn3d-link" style="display:none; width:15px;" title="Expand"></span><span id="'
|
|
@@ -15453,7 +15453,8 @@ class SetDialog {
|
|
|
15453
15453
|
html += me.htmlCls.divStr + "dl_ligplotcolor' style='inline-block;'>";
|
|
15454
15454
|
|
|
15455
15455
|
// html += "The real interaction distances are not in scale, and are about twice the distances of dashed line segments.<br>Some \"Contact\" lines are only shown partially to simplify the view.<br>";
|
|
15456
|
-
html += "
|
|
15456
|
+
// html += "Mouseover the dashed lines to see interaction types and distances.<br>";
|
|
15457
|
+
html += "<b>Color legend</b> for interactions (dashed lines): <br>";
|
|
15457
15458
|
|
|
15458
15459
|
html += me.htmlCls.setHtmlCls.setColorHints();
|
|
15459
15460
|
|
|
@@ -16515,8 +16516,8 @@ class Events {
|
|
|
16515
16516
|
hostUrl = (pos == -1) ? hostUrl : hostUrl.substr(0, pos);
|
|
16516
16517
|
|
|
16517
16518
|
// some URLs from VAST search are like https://www.ncbi.nlm.nih.gov/Structure/vast/icn3d/
|
|
16518
|
-
if(hostUrl
|
|
16519
|
-
hostUrl = '
|
|
16519
|
+
if(hostUrl.indexOf('/vast/icn3d/')) {
|
|
16520
|
+
hostUrl = hostUrl.replace(/\/vast\/icn3d\//g, '/icn3d/');
|
|
16520
16521
|
}
|
|
16521
16522
|
|
|
16522
16523
|
ic.definedSetsCls.clickCustomAtoms();
|
|
@@ -17337,7 +17338,11 @@ class Events {
|
|
|
17337
17338
|
me.myEventCls.onIds("#" + me.pre + "reload_blast_rep_id", "click", function(e) { let ic = me.icn3d;
|
|
17338
17339
|
e.preventDefault();
|
|
17339
17340
|
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
17340
|
-
let query_id = $("#" + me.pre + "query_id").val();
|
|
17341
|
+
let query_id = $("#" + me.pre + "query_id").val().trim();
|
|
17342
|
+
if(query_id.substr(1, 2) == 'M_') { // e.g., NM_..., XM_...
|
|
17343
|
+
alert("You are inputting a nucleotide accession " + query_id + ". Please use a protein accession instead.");
|
|
17344
|
+
return;
|
|
17345
|
+
}
|
|
17341
17346
|
let query_fasta = encodeURIComponent($("#" + me.pre + "query_fasta").val());
|
|
17342
17347
|
let blast_rep_id = $("#" + me.pre + "blast_rep_id").val();
|
|
17343
17348
|
thisClass.setLogCmd("load seq_struct_ids " + query_id + "," + blast_rep_id, false);
|
|
@@ -17404,7 +17409,11 @@ class Events {
|
|
|
17404
17409
|
me.myEventCls.onIds("#" + me.pre + "reload_alignsw", "click", function(e) { let ic = me.icn3d;
|
|
17405
17410
|
e.preventDefault();
|
|
17406
17411
|
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
17407
|
-
let query_id = $("#" + me.pre + "query_id").val();
|
|
17412
|
+
let query_id = $("#" + me.pre + "query_id").val().trim();
|
|
17413
|
+
if(query_id.substr(1, 2) == 'M_') { // e.g., NM_..., XM_...
|
|
17414
|
+
alert("You are inputting a nucleotide accession " + query_id + ". Please use a protein accession instead.");
|
|
17415
|
+
return;
|
|
17416
|
+
}
|
|
17408
17417
|
let query_fasta = encodeURIComponent($("#" + me.pre + "query_fasta").val());
|
|
17409
17418
|
let blast_rep_id = $("#" + me.pre + "blast_rep_id").val();
|
|
17410
17419
|
thisClass.setLogCmd("load seq_struct_ids_smithwm " + query_id + "," + blast_rep_id, false);
|
|
@@ -17420,7 +17429,11 @@ class Events {
|
|
|
17420
17429
|
me.myEventCls.onIds("#" + me.pre + "reload_alignswlocal", "click", function(e) { let ic = me.icn3d;
|
|
17421
17430
|
e.preventDefault();
|
|
17422
17431
|
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
17423
|
-
let query_id = $("#" + me.pre + "query_id").val();
|
|
17432
|
+
let query_id = $("#" + me.pre + "query_id").val().trim();
|
|
17433
|
+
if(query_id.substr(1, 2) == 'M_') { // e.g., NM_..., XM_...
|
|
17434
|
+
alert("You are inputting a nucleotide accession " + query_id + ". Please use a protein accession instead.");
|
|
17435
|
+
return;
|
|
17436
|
+
}
|
|
17424
17437
|
let query_fasta = encodeURIComponent($("#" + me.pre + "query_fasta").val());
|
|
17425
17438
|
let blast_rep_id = $("#" + me.pre + "blast_rep_id").val();
|
|
17426
17439
|
thisClass.setLogCmd("load seq_struct_ids_local_smithwm " + query_id + "," + blast_rep_id, false);
|
|
@@ -18291,6 +18304,7 @@ class Events {
|
|
|
18291
18304
|
|
|
18292
18305
|
let scale = $("#" + me.ligplotid + "_scale").val();
|
|
18293
18306
|
$("#" + me.ligplotid).attr("width",(ic.ligplotWidth * parseFloat(scale)).toString() + "px");
|
|
18307
|
+
ic.ligplotScale = parseFloat(scale);
|
|
18294
18308
|
thisClass.setLogCmd("ligplot scale " + scale, true);
|
|
18295
18309
|
});
|
|
18296
18310
|
|
|
@@ -19541,7 +19555,7 @@ class SetHtml {
|
|
|
19541
19555
|
|
|
19542
19556
|
html += me.htmlCls.divNowrapStr + '<span style="margin-left:33px; color:#00FF00; font-weight:bold">Green</span>: H-Bonds; ';
|
|
19543
19557
|
html += '<span style="color:#00FFFF; font-weight:bold">Cyan</span>: Salt Bridge/Ionic; ';
|
|
19544
|
-
html += '<span style="font-weight:bold">Grey</span>:
|
|
19558
|
+
html += '<span style="font-weight:bold">Grey</span>: Contacts</div>';
|
|
19545
19559
|
html += me.htmlCls.divNowrapStr + '<span style="margin-left:33px; color:#FF00FF; font-weight:bold">Magenta</span>: Halogen Bonds; ';
|
|
19546
19560
|
html += '<span style="color:#FF0000; font-weight:bold">Red</span>: π-Cation; ';
|
|
19547
19561
|
html += '<span style="color:#0000FF; font-weight:bold">Blue</span>: π-Stacking</div>';
|
|
@@ -34812,7 +34826,7 @@ class ApplyDisplay {
|
|
|
34812
34826
|
atomsObj = {};
|
|
34813
34827
|
} // end if(bHighlight === 1)
|
|
34814
34828
|
|
|
34815
|
-
if(ic.bInitial) {
|
|
34829
|
+
if(ic.bInitial && ic.bMembrane === undefined) {
|
|
34816
34830
|
if(me.htmlCls.setHtmlCls.getCookie('membrane') != '') {
|
|
34817
34831
|
let bMembrane = parseInt(me.htmlCls.setHtmlCls.getCookie('membrane'));
|
|
34818
34832
|
|
|
@@ -35106,7 +35120,7 @@ class ApplyOther {
|
|
|
35106
35120
|
}
|
|
35107
35121
|
}
|
|
35108
35122
|
|
|
35109
|
-
if(ic.bInitial) {
|
|
35123
|
+
if(ic.bInitial && ic.bGlycansCartoon === undefined) {
|
|
35110
35124
|
if(me.htmlCls.setHtmlCls.getCookie('glycan') != '') {
|
|
35111
35125
|
let bGlycansCartoon = parseInt(me.htmlCls.setHtmlCls.getCookie('glycan'));
|
|
35112
35126
|
|
|
@@ -39495,15 +39509,16 @@ class SetColor {
|
|
|
39495
39509
|
atoms = me.hashUtilsCls.intHash(atoms, ic.hAtoms);
|
|
39496
39510
|
|
|
39497
39511
|
for (let i in atoms) {
|
|
39498
|
-
|
|
39499
|
-
if(!atom.het) ++cnt;
|
|
39512
|
+
ic.atoms[i];
|
|
39513
|
+
// if(!atom.het) ++cnt;
|
|
39514
|
+
++cnt;
|
|
39500
39515
|
}
|
|
39501
39516
|
|
|
39502
39517
|
let lastTerSerialInv = (cnt > 1) ? 1 / (cnt - 1) : 1;
|
|
39503
39518
|
for (let i in atoms) {
|
|
39504
39519
|
let atom = ic.atoms[i];
|
|
39505
|
-
//atom.color = atom.het ? me.parasCls.atomColors[atom.elem] || me.parasCls.defaultAtomColor : me.parasCls.thr().setHSL(
|
|
39506
|
-
atom.color =
|
|
39520
|
+
// atom.color = atom.het ? me.parasCls.atomColors[atom.elem] || me.parasCls.defaultAtomColor : me.parasCls.thr().setHSL(3 / 4 * (1 - idx++ * lastTerSerialInv), 1, 0.45);
|
|
39521
|
+
atom.color = me.parasCls.thr().setHSL(3 / 4 * (1 - idx++ * lastTerSerialInv), 1, 0.45);
|
|
39507
39522
|
|
|
39508
39523
|
ic.atomPrevColors[i] = atom.color;
|
|
39509
39524
|
}
|
|
@@ -39517,14 +39532,16 @@ class SetColor {
|
|
|
39517
39532
|
atoms = me.hashUtilsCls.intHash(atoms, ic.hAtoms);
|
|
39518
39533
|
|
|
39519
39534
|
for (let i in atoms) {
|
|
39520
|
-
|
|
39521
|
-
if(!atom.het) ++cnt;
|
|
39535
|
+
ic.atoms[i];
|
|
39536
|
+
// if(!atom.het) ++cnt;
|
|
39537
|
+
++cnt;
|
|
39522
39538
|
}
|
|
39523
39539
|
|
|
39524
39540
|
let lastTerSerialInv = (cnt > 1) ? 1 / (cnt - 1) : 1;
|
|
39525
39541
|
for (let i in atoms) {
|
|
39526
39542
|
let atom = ic.atoms[i];
|
|
39527
|
-
atom.color = atom.het ? me.parasCls.atomColors[atom.elem] || me.parasCls.defaultAtomColor : me.parasCls.thr().setHSL(3 / 4 * idx++ * lastTerSerialInv, 1, 0.45);
|
|
39543
|
+
// atom.color = atom.het ? me.parasCls.atomColors[atom.elem] || me.parasCls.defaultAtomColor : me.parasCls.thr().setHSL(3 / 4 * idx++ * lastTerSerialInv, 1, 0.45);
|
|
39544
|
+
atom.color = me.parasCls.thr().setHSL(3 / 4 * idx++ * lastTerSerialInv, 1, 0.45);
|
|
39528
39545
|
|
|
39529
39546
|
ic.atomPrevColors[i] = atom.color;
|
|
39530
39547
|
}
|
|
@@ -40974,6 +40991,7 @@ class AnnoCddSite {
|
|
|
40974
40991
|
if(me.bNode) {
|
|
40975
40992
|
if(!ic.resid2cdd) ic.resid2cdd = {};
|
|
40976
40993
|
if(!ic.resid2site) ic.resid2site = {};
|
|
40994
|
+
if(!ic.chainid2cdd) ic.chainid2cdd = {};
|
|
40977
40995
|
}
|
|
40978
40996
|
|
|
40979
40997
|
for(let i = 0, il = dataArray.length; i < il; ++i) {
|
|
@@ -40996,6 +41014,8 @@ class AnnoCddSite {
|
|
|
40996
41014
|
let html3 = html;
|
|
40997
41015
|
let domainArray = cddData.doms;
|
|
40998
41016
|
if(me.bNode && !ic.resid2cdd[chnid]) ic.resid2cdd[chnid] = [];
|
|
41017
|
+
if(me.bNode && !ic.chainid2cdd[chnid]) ic.chainid2cdd[chnid] = [];
|
|
41018
|
+
|
|
40999
41019
|
let result = thisClass.setDomainFeature(domainArray, chnid, 'domain', html, html2, html3);
|
|
41000
41020
|
|
|
41001
41021
|
ic.chainid2pssmid[chnid] = {pssmid2name: result.pssmid2name, pssmid2fromArray: result.pssmid2fromArray, pssmid2toArray: result.pssmid2toArray};
|
|
@@ -41287,6 +41307,10 @@ class AnnoCddSite {
|
|
|
41287
41307
|
|
|
41288
41308
|
if(ic.seqStartLen && ic.seqStartLen[chnid]) html += ic.showSeqCls.insertMulGap(ic.seqStartLen[chnid], '-');
|
|
41289
41309
|
|
|
41310
|
+
if(me.bNode && type == 'domain') {
|
|
41311
|
+
ic.chainid2cdd[chnid].push(fulltitle + "_from_" + fromArray + "_to_" + toArray);
|
|
41312
|
+
}
|
|
41313
|
+
|
|
41290
41314
|
for(let i = 0, il = ic.giSeq[chnid].length; i < il; ++i) {
|
|
41291
41315
|
html += ic.showSeqCls.insertGap(chnid, i, '-');
|
|
41292
41316
|
|
|
@@ -43323,7 +43347,7 @@ class AnnoSnpClinVar {
|
|
|
43323
43347
|
}
|
|
43324
43348
|
|
|
43325
43349
|
//snpTitle += "<br>Links: <span class='" + ic.pre + "snpin3d icn3d-snplink' snp='" + chnid + "_" + pos + "_" + resi2snp[i][j] + "'>SNP in 3D with scap</span>, <span class='" + ic.pre + "snpinter icn3d-snplink' snp='" + chnid + "_" + pos + "_" + resi2snp[i][j] + "'>SNP Interactions in 3D</span>, <span class='" + ic.pre + "snppdb icn3d-snplink' snp='" + chnid + "_" + pos + "_" + resi2snp[i][j] + "'>SNP PDB</span>, <a href='https://www.ncbi.nlm.nih.gov/clinvar/?term=" + resi2clinAllele[i][j] + "[AlleleID]' target='_blank'>ClinVar</a>, <a href='https://www.ncbi.nlm.nih.gov/snp/?term=" + resi2rsnum[i][j] + "' target='_blank'>dbSNP(rs" + resi2rsnum[i][j] + ")</a>";
|
|
43326
|
-
snpTitle += "<br>Links: <a href='https://www.ncbi.nlm.nih.gov/clinvar/?term=" + resi2clinAllele[i][j] + "[AlleleID]' target='_blank'>ClinVar</a>, <a href='https://www.ncbi.nlm.nih.gov/snp/?term=" + resi2rsnum[i][j] + "' target='_blank'>dbSNP(rs" + resi2rsnum[i][j] + ")</a>";
|
|
43350
|
+
snpTitle += "<br>Links: <a href='https://www.ncbi.nlm.nih.gov/clinvar/?term=" + resi2clinAllele[i][j] + "[AlleleID]' style='color:blue' target='_blank'>ClinVar</a>, <a href='https://www.ncbi.nlm.nih.gov/snp/?term=" + resi2rsnum[i][j] + "' style='color:blue' target='_blank'>dbSNP(rs" + resi2rsnum[i][j] + ")</a>";
|
|
43327
43351
|
}
|
|
43328
43352
|
else {
|
|
43329
43353
|
if(bCoord && !me.cfg.hidelicense) {
|
|
@@ -43405,7 +43429,7 @@ class AnnoSnpClinVar {
|
|
|
43405
43429
|
}
|
|
43406
43430
|
|
|
43407
43431
|
//snpTitle += "<br>Links: <span class='" + ic.pre + "snpin3d icn3d-snplink' snp='" + chnid + "_" + pos + "_" + resi2snp[i][j] + "'>SNP in 3D with scap</span>, <span class='" + ic.pre + "snpinter icn3d-snplink' snp='" + chnid + "_" + pos + "_" + resi2snp[i][j] + "'>SNP Interactions in 3D</span>, <span class='" + ic.pre + "snppdb icn3d-snplink' snp='" + chnid + "_" + pos + "_" + resi2snp[i][j] + "'>SNP PDB</span>, <a href='https://www.ncbi.nlm.nih.gov/clinvar/?term=" + resi2clinAllele[i][j] + "[AlleleID]' target='_blank'>ClinVar</a>, <a href='https://www.ncbi.nlm.nih.gov/snp/?term=" + resi2rsnum[i][j] + "' target='_blank'>dbSNP(rs" + resi2rsnum[i][j] + ")</a>";
|
|
43408
|
-
snpTitle += "<br>Links: <a href='https://www.ncbi.nlm.nih.gov/clinvar/?term=" + resi2clinAllele[i][j] + "[AlleleID]' target='_blank'>ClinVar</a>, <a href='https://www.ncbi.nlm.nih.gov/snp/?term=" + resi2rsnum[i][j] + "' target='_blank'>dbSNP(rs" + resi2rsnum[i][j] + ")</a>";
|
|
43432
|
+
snpTitle += "<br>Links: <a href='https://www.ncbi.nlm.nih.gov/clinvar/?term=" + resi2clinAllele[i][j] + "[AlleleID]' style='color:blue' target='_blank'>ClinVar</a>, <a href='https://www.ncbi.nlm.nih.gov/snp/?term=" + resi2rsnum[i][j] + "' style='color:blue' target='_blank'>dbSNP(rs" + resi2rsnum[i][j] + ")</a>";
|
|
43409
43433
|
if(j < jl - 1) {
|
|
43410
43434
|
snpTitle += '<br><br>';
|
|
43411
43435
|
}
|
|
@@ -45597,7 +45621,8 @@ class AddTrack {
|
|
|
45597
45621
|
$("#" + ic.pre + "tt_custom_" + chnid).append("<div id='" + ic.pre + "tt_custom_" + chnid + "_" + simpTitle + "'></div>");
|
|
45598
45622
|
$("#" + ic.pre + "tt_custom_" + chnid + "_" + simpTitle).width(divLength);
|
|
45599
45623
|
|
|
45600
|
-
let html = '<div id="' + ic.pre + 'giseq_sequence" class="icn3d-dl_sequence">';
|
|
45624
|
+
// let html = '<div id="' + ic.pre + 'giseq_sequence" class="icn3d-dl_sequence">';
|
|
45625
|
+
let html = '<div class="icn3d-dl_sequence">';
|
|
45601
45626
|
let htmlExon = html;
|
|
45602
45627
|
let html2 = html;
|
|
45603
45628
|
let html3 = html;
|
|
@@ -46892,6 +46917,7 @@ class AddTrack {
|
|
|
46892
46917
|
let title =(trackTitleArray[j].length < 20) ? trackTitleArray[j] : trackTitleArray[j].substr(0, 20) + '...';
|
|
46893
46918
|
let bMsa = true;
|
|
46894
46919
|
let exonArray = (acc2exons) ? acc2exons[trackTitleArray[j]] : undefined;
|
|
46920
|
+
|
|
46895
46921
|
this.showNewTrack(chainid, title, text, undefined, undefined, type, undefined, bMsa, fromArray, toArray, seqStartLen, exonArray, offsetArray);
|
|
46896
46922
|
}
|
|
46897
46923
|
|
|
@@ -47103,6 +47129,7 @@ class AddTrack {
|
|
|
47103
47129
|
await thisClass.showMsaTracks(chainid, seqFirst, trackTitleArray, trackSeqArray, startpos, type, acc2exons);
|
|
47104
47130
|
|
|
47105
47131
|
me.htmlCls.clickMenuCls.setLogCmd("add exon track | chainid " + chainid + " | geneid " + geneid + " | startpos " + startpos + " | type " + type, true);
|
|
47132
|
+
me.htmlCls.clickMenuCls.setLogCmd("set annotation custom", true);
|
|
47106
47133
|
}
|
|
47107
47134
|
|
|
47108
47135
|
async addMsaTracks(chainid, startpos, type, fastaList) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -48243,7 +48270,8 @@ class ShowAnno {
|
|
|
48243
48270
|
$("#" + ic.pre + "anno_" + name).append("<div id='" + ic.pre + "giseq_" + name + "'><div id='" + ic.pre + "dt_giseq_" + name + "' style='display:none'></div><div id='" + ic.pre + "ov_giseq_" + name + "'></div></div>");
|
|
48244
48271
|
$("#" + ic.pre + "anno_" + name).append("<br><hr><br>");
|
|
48245
48272
|
// sequence, detailed view
|
|
48246
|
-
let htmlTmp = '<div id="' + ic.pre + 'giseq_sequence" class="icn3d-dl_sequence">';
|
|
48273
|
+
// let htmlTmp = '<div id="' + ic.pre + 'giseq_sequence" class="icn3d-dl_sequence">';
|
|
48274
|
+
let htmlTmp = '<div class="icn3d-dl_sequence">';
|
|
48247
48275
|
let chainType = 'Chem.', chainTypeFull = 'Chemical';
|
|
48248
48276
|
//htmlTmp += '<div class="icn3d-seqTitle2" anno="sequence"><span style="white-space:nowrap;" title="' + chainTypeFull + ' ' + name + '">' + chainType + ' ' + name + '</span></div>';
|
|
48249
48277
|
htmlTmp += '<div class="icn3d-seqTitle icn3d-link icn3d-blue" anno="sequence" gi="' + name + '" resn="' + name + '"><span style="white-space:nowrap;" title="' + chainTypeFull + ' ' + name + '">' + chainType + ' ' + name + '</span></div>';
|
|
@@ -48280,6 +48308,8 @@ class ShowAnno {
|
|
|
48280
48308
|
}
|
|
48281
48309
|
|
|
48282
48310
|
async processSeqData(chainid_seq) { let ic = this.icn3d, me = ic.icn3dui;
|
|
48311
|
+
ic.bAnnoShown = true;
|
|
48312
|
+
|
|
48283
48313
|
for(let chnid in ic.protein_chainid) {
|
|
48284
48314
|
let chnidBase = ic.protein_chainid[chnid];
|
|
48285
48315
|
//if(chainid_seq.hasOwnProperty(chnid)) {
|
|
@@ -48797,11 +48827,17 @@ class ShowSeq {
|
|
|
48797
48827
|
html += '</div>';
|
|
48798
48828
|
html += '</div>'; // corresponds to above: html += '<div class="icn3d-dl_sequence">';
|
|
48799
48829
|
html3 += '</div></div>';
|
|
48830
|
+
// if(me.cfg.blast_rep_id === chnid) {
|
|
48831
|
+
// htmlTmp = '<div id="' + ic.pre + 'giseq_sequence" class="icn3d-dl_sequence" style="border: solid 1px #000">';
|
|
48832
|
+
// }
|
|
48833
|
+
// else {
|
|
48834
|
+
// htmlTmp = '<div id="' + ic.pre + 'giseq_sequence" class="icn3d-dl_sequence">';
|
|
48835
|
+
// }
|
|
48800
48836
|
if(me.cfg.blast_rep_id === chnid) {
|
|
48801
|
-
htmlTmp = '<div
|
|
48837
|
+
htmlTmp = '<div class="icn3d-dl_sequence" style="border: solid 1px #000">';
|
|
48802
48838
|
}
|
|
48803
48839
|
else {
|
|
48804
|
-
htmlTmp = '<div
|
|
48840
|
+
htmlTmp = '<div class="icn3d-dl_sequence">';
|
|
48805
48841
|
}
|
|
48806
48842
|
let chainType = 'Protein', chainTypeFull = 'Protein';
|
|
48807
48843
|
if(type !== undefined) {
|
|
@@ -52368,7 +52404,7 @@ class ViewInterPairs {
|
|
|
52368
52404
|
if(index2xy) {
|
|
52369
52405
|
let serialArray1 = resid1Ori.substr(pos1 + 1).split(',');
|
|
52370
52406
|
|
|
52371
|
-
let result = ic.ligplotCls.getSvgPerPair(serialArray1, resid1, resid2, interactionType, index2xy, xlen, ylen, xcenter, ycenter);
|
|
52407
|
+
let result = ic.ligplotCls.getSvgPerPair(serialArray1, resid1, resid2, interactionType, index2xy, xlen, ylen, xcenter, ycenter, dist);
|
|
52372
52408
|
svgHtmlNode += result.node;
|
|
52373
52409
|
svgHtmlLine += result.line;
|
|
52374
52410
|
}
|
|
@@ -52470,9 +52506,12 @@ class ViewInterPairs {
|
|
|
52470
52506
|
let resids = resid1 + '|' + resid2;
|
|
52471
52507
|
|
|
52472
52508
|
let serialArray1 = resids2distCnt[resids].serialArray1;
|
|
52473
|
-
|
|
52509
|
+
let dist1_dist2_atom1_atom2 = resids2distCnt[resids].dist1_dist2_atom1_atom2;
|
|
52510
|
+
let dist1 = dist1_dist2_atom1_atom2[0]; // min dist
|
|
52511
|
+
dist1_dist2_atom1_atom2[1]; // c-alpha dist
|
|
52512
|
+
// let dist = (dist1 < dist2) ? dist1 : dist2;
|
|
52474
52513
|
let bNotDrawNode = (i == 0) ? false : true;
|
|
52475
|
-
let result = ic.ligplotCls.getSvgPerPair(serialArray1, resid1, resid2, interactionType, index2xy, xlen, ylen, xcenter, ycenter, bNotDrawNode, prevX2, prevY2);
|
|
52514
|
+
let result = ic.ligplotCls.getSvgPerPair(serialArray1, resid1, resid2, interactionType, index2xy, xlen, ylen, xcenter, ycenter, dist1, bNotDrawNode, prevX2, prevY2);
|
|
52476
52515
|
svgHtmlNode += result.node;
|
|
52477
52516
|
svgHtmlLine += result.line;
|
|
52478
52517
|
prevX2 = result.x2;
|
|
@@ -53859,16 +53898,17 @@ class ChainalignParser {
|
|
|
53859
53898
|
// calculate secondary structures with applyCommandDssp
|
|
53860
53899
|
//$.when(ic.pdbParserCls.applyCommandDssp(true)).then(function() {
|
|
53861
53900
|
await ic.pdbParserCls.applyCommandDssp(true);
|
|
53862
|
-
|
|
53901
|
+
//!!!
|
|
53902
|
+
/*
|
|
53863
53903
|
// original version =============
|
|
53864
53904
|
// align PDB chains
|
|
53865
53905
|
for(let index in ic.pdbChainIndexHash) {
|
|
53866
53906
|
//ic.pdbChainIndexHash[index] = mmdbid_q_tmp + "_" + ic.chain_q + "_" + ic.mmdbid_t + "_" + ic.chain_t;
|
|
53867
53907
|
let idArray = ic.pdbChainIndexHash[index].split('_');
|
|
53868
53908
|
mmdbid_q = idArray[0];
|
|
53869
|
-
idArray[1];
|
|
53909
|
+
let chain_q = idArray[1];
|
|
53870
53910
|
mmdbid_t = idArray[2];
|
|
53871
|
-
idArray[3];
|
|
53911
|
+
let chain_t = idArray[3];
|
|
53872
53912
|
|
|
53873
53913
|
thisClass.transformStructure(mmdbid_q, index-1, 'query');
|
|
53874
53914
|
}
|
|
@@ -53878,7 +53918,7 @@ class ChainalignParser {
|
|
|
53878
53918
|
let urlalign = me.htmlCls.baseUrl + "vastdyn/vastdyn.cgi";
|
|
53879
53919
|
let urltmalign = me.htmlCls.baseUrl + "tmalign/tmalign.cgi";
|
|
53880
53920
|
|
|
53881
|
-
let resRangeArray = (me.cfg.resrange) ? me.cfg.resrange.split('
|
|
53921
|
+
let resRangeArray = (me.cfg.resrange) ? me.cfg.resrange.split(',') : [];
|
|
53882
53922
|
|
|
53883
53923
|
for(let index in ic.afChainIndexHash) {
|
|
53884
53924
|
let idArray = ic.afChainIndexHash[index].split('_');
|
|
@@ -53890,25 +53930,26 @@ class ChainalignParser {
|
|
|
53890
53930
|
let chain_t = idArray[3];
|
|
53891
53931
|
let chainid_t = mmdbid_t + '_' + chain_t;
|
|
53892
53932
|
|
|
53893
|
-
let atomSet_t = (resRangeArray[0]) ? ic.realignParserCls.getSeqCoorResid(resRangeArray[0].split(','), chainid_t).hAtoms : ic.chains[chainid_t];
|
|
53894
|
-
let atomSet_q = (resRangeArray[index]) ? ic.realignParserCls.getSeqCoorResid(resRangeArray[index].split(','), chainid_q).hAtoms : ic.chains[chainid_q];
|
|
53933
|
+
// let atomSet_t = (resRangeArray[0]) ? ic.realignParserCls.getSeqCoorResid(resRangeArray[0].split(','), chainid_t, true).hAtoms : ic.chains[chainid_t];
|
|
53934
|
+
// let atomSet_q = (resRangeArray[index]) ? ic.realignParserCls.getSeqCoorResid(resRangeArray[index].split(','), chainid_q, true).hAtoms : ic.chains[chainid_q];
|
|
53935
|
+
let atomSet_t = (resRangeArray[0]) ? ic.realignParserCls.getSeqCoorResid([resRangeArray[0]], chainid_t, true).hAtoms : ic.chains[chainid_t];
|
|
53936
|
+
let atomSet_q = (resRangeArray[index]) ? ic.realignParserCls.getSeqCoorResid([resRangeArray[index]], chainid_q, true).hAtoms : ic.chains[chainid_q];
|
|
53895
53937
|
// end of original version =============
|
|
53896
|
-
|
|
53897
|
-
|
|
53938
|
+
*/
|
|
53939
|
+
|
|
53898
53940
|
// new version to be done for VASTsrv ==============
|
|
53899
53941
|
// dynamically align pairs in all chainids
|
|
53900
53942
|
let ajaxArray = [], indexArray = [], struArray = [];
|
|
53901
53943
|
let urlalign = me.htmlCls.baseUrl + "vastdyn/vastdyn.cgi";
|
|
53902
53944
|
let urltmalign = me.htmlCls.baseUrl + "tmalign/tmalign.cgi";
|
|
53903
53945
|
|
|
53904
|
-
let resRangeArray = (me.cfg.resrange) ? me.cfg.resrange.split('
|
|
53946
|
+
let resRangeArray = (me.cfg.resrange) ? me.cfg.resrange.split(',') : [];
|
|
53905
53947
|
|
|
53906
53948
|
// dynamically align pairs in all chainids
|
|
53907
|
-
let atomSet_t = (me.cfg.resrange) ? ic.realignParserCls.getSeqCoorResid(resRangeArray[0]
|
|
53949
|
+
let atomSet_t = (me.cfg.resrange) ? ic.realignParserCls.getSeqCoorResid([resRangeArray[0]], chainidArray[0], true).hAtoms : ic.chains[chainidArray[0]];
|
|
53908
53950
|
for(let index = 1, indexl = chainidArray.length; index < indexl; ++index) {
|
|
53909
|
-
let atomSet_q = (me.cfg.resrange) ? ic.realignParserCls.getSeqCoorResid(resRangeArray[index]
|
|
53951
|
+
let atomSet_q = (me.cfg.resrange) ? ic.realignParserCls.getSeqCoorResid([resRangeArray[index]], chainidArray[index], true).hAtoms : ic.chains[chainidArray[index]];
|
|
53910
53952
|
// end of new version to be done for VASTsrv ==============
|
|
53911
|
-
*/
|
|
53912
53953
|
|
|
53913
53954
|
let alignAjax;
|
|
53914
53955
|
if(me.cfg.aligntool != 'tmalign') {
|
|
@@ -54136,10 +54177,11 @@ class ChainalignParser {
|
|
|
54136
54177
|
|
|
54137
54178
|
// chainid1 is target
|
|
54138
54179
|
aligType = 'target';
|
|
54139
|
-
|
|
54180
|
+
let bForce = true;
|
|
54181
|
+
this.transformStructure(target, index, aligType, bForce);
|
|
54140
54182
|
|
|
54141
54183
|
aligType = 'query';
|
|
54142
|
-
this.transformStructure(query, index, aligType);
|
|
54184
|
+
this.transformStructure(query, index, aligType, bForce);
|
|
54143
54185
|
|
|
54144
54186
|
allChainidHash[chainidArray[0]] = 1;
|
|
54145
54187
|
allChainidHash[chainidArray[1]] = 1;
|
|
@@ -54817,8 +54859,12 @@ class ChainalignParser {
|
|
|
54817
54859
|
|
|
54818
54860
|
if(bQuery && me.cfg.matchedchains) {
|
|
54819
54861
|
// $.when(ic.pdbParserCls.applyCommandDssp(true)).then(function() {
|
|
54820
|
-
let bRealign = true, bPredefined = true;
|
|
54821
|
-
await ic.realignParserCls.realignChainOnSeqAlign(undefined, ic.chainidArray, bRealign, bPredefined);
|
|
54862
|
+
// let bRealign = true, bPredefined = true;
|
|
54863
|
+
// await ic.realignParserCls.realignChainOnSeqAlign(undefined, ic.chainidArray, bRealign, bPredefined);
|
|
54864
|
+
|
|
54865
|
+
ic.hAtoms = ic.definedSetsCls.getAtomsFromNameArray(ic.chainidArray);
|
|
54866
|
+
await ic.realignParserCls.realignOnStructAlign();
|
|
54867
|
+
|
|
54822
54868
|
// reset annotations
|
|
54823
54869
|
$("#" + ic.pre + "dl_annotations").html("");
|
|
54824
54870
|
ic.bAnnoShown = false;
|
|
@@ -59389,7 +59435,7 @@ class RealignParser {
|
|
|
59389
59435
|
}
|
|
59390
59436
|
}
|
|
59391
59437
|
|
|
59392
|
-
getSeqCoorResid(resiArray, chainid) { let ic = this.icn3d, me = ic.icn3dui;
|
|
59438
|
+
getSeqCoorResid(resiArray, chainid, bNCBI) { let ic = this.icn3d, me = ic.icn3dui;
|
|
59393
59439
|
let seq = '', coorArray = [], residArray = [];
|
|
59394
59440
|
let hAtoms = {};
|
|
59395
59441
|
|
|
@@ -59397,15 +59443,7 @@ class RealignParser {
|
|
|
59397
59443
|
if(resiArray[j].indexOf('-') != -1) {
|
|
59398
59444
|
let startEnd = resiArray[j].split('-');
|
|
59399
59445
|
for(let k = parseInt(startEnd[0]); k <= parseInt(startEnd[1]); ++k) {
|
|
59400
|
-
|
|
59401
|
-
//if(me.cfg.usepdbnum === false) k += base - 1;
|
|
59402
|
-
|
|
59403
|
-
//let seqIndex = k - base;
|
|
59404
|
-
let seqIndex = ic.setSeqAlignCls.getPosFromResi(chainid, k);
|
|
59405
|
-
// if(ic.bNCBI) {
|
|
59406
|
-
// let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[chainid + '_' + k]);
|
|
59407
|
-
// if(atom && atom.resiNCBI) seqIndex = atom.resiNCBI - 1;
|
|
59408
|
-
// }
|
|
59446
|
+
let seqIndex = (bNCBI) ? k : ic.setSeqAlignCls.getPosFromResi(chainid, k);
|
|
59409
59447
|
|
|
59410
59448
|
// don't align solvent or chemicals
|
|
59411
59449
|
if(!ic.chainsSeq[chainid] || !ic.chainsSeq[chainid][seqIndex] || me.parasCls.b62ResArray.indexOf(ic.chainsSeq[chainid][seqIndex].name.toUpperCase()) == -1) continue;
|
|
@@ -59417,20 +59455,14 @@ class RealignParser {
|
|
|
59417
59455
|
residArray.push(chainid + '_' + k);
|
|
59418
59456
|
}
|
|
59419
59457
|
}
|
|
59458
|
+
else if(resiArray[j] == 0) { // 0 means the whole chain
|
|
59459
|
+
let residueHash = ic.firstAtomObjCls.getResiduesFromAtoms(ic.chains[chainid]);
|
|
59460
|
+
residArray = Object.keys(residueHash);
|
|
59461
|
+
}
|
|
59420
59462
|
else { // one residue
|
|
59421
|
-
|
|
59422
|
-
//let k = parseInt(resiArray[j]);
|
|
59423
59463
|
let k = resiArray[j];
|
|
59424
|
-
// from VAST neighbor page, use NCBI residue number
|
|
59425
|
-
//if(me.cfg.usepdbnum === false) k += base - 1;
|
|
59426
|
-
|
|
59427
|
-
//let seqIndex = k - base;
|
|
59428
|
-
let seqIndex = ic.setSeqAlignCls.getPosFromResi(chainid, k);
|
|
59429
59464
|
|
|
59430
|
-
|
|
59431
|
-
// let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[chainid + '_' + k]);
|
|
59432
|
-
// if(atom && atom.resiNCBI) seqIndex = atom.resiNCBI - 1;
|
|
59433
|
-
// }
|
|
59465
|
+
let seqIndex = (bNCBI) ? k : ic.setSeqAlignCls.getPosFromResi(chainid, k);
|
|
59434
59466
|
|
|
59435
59467
|
if(!ic.chainsSeq[chainid][seqIndex]) continue;
|
|
59436
59468
|
|
|
@@ -61135,10 +61167,7 @@ class ParserUtils {
|
|
|
61135
61167
|
// display the structure right away. load the mns and sequences later
|
|
61136
61168
|
setTimeout(async function(){
|
|
61137
61169
|
if(ic.bInitial) {
|
|
61138
|
-
|
|
61139
|
-
// if(me.cfg.showsets) {
|
|
61140
|
-
// ic.definedSetsCls.showSets();
|
|
61141
|
-
// }
|
|
61170
|
+
// if(ic.bInitial && (!ic.bAnnoShown || ic.bResetAnno)) {
|
|
61142
61171
|
if(me.cfg.align !== undefined || me.cfg.chainalign !== undefined) {
|
|
61143
61172
|
// expand the toolbar
|
|
61144
61173
|
let id = ic.pre + 'selection';
|
|
@@ -67277,6 +67306,7 @@ class ApplyCommand {
|
|
|
67277
67306
|
let scale = command.substr(pos + 1);
|
|
67278
67307
|
|
|
67279
67308
|
$("#" + me.ligplotid + "_scale").val(scale);
|
|
67309
|
+
ic.ligplotScale = parseFloat(scale);
|
|
67280
67310
|
|
|
67281
67311
|
$("#" + me.ligplotid).attr("width",(ic.ligplotWidth * parseFloat(scale)).toString() + "px");
|
|
67282
67312
|
}
|
|
@@ -67505,6 +67535,7 @@ class ApplyCommand {
|
|
|
67505
67535
|
}
|
|
67506
67536
|
else if(command.indexOf('glycans cartoon') == 0) {
|
|
67507
67537
|
let value = command.substr(command.lastIndexOf(' ') + 1);
|
|
67538
|
+
|
|
67508
67539
|
if(value == 'yes') {
|
|
67509
67540
|
ic.bGlycansCartoon = true;
|
|
67510
67541
|
}
|
|
@@ -67967,21 +67998,21 @@ class DefinedSets {
|
|
|
67967
67998
|
|
|
67968
67999
|
setProtNuclLigInMenu() { let ic = this.icn3d; ic.icn3dui;
|
|
67969
68000
|
// Initially, add proteins, nucleotides, chemicals, ions, water into the menu "custom selections"
|
|
67970
|
-
if(Object.keys(ic.proteins).length > 0) {
|
|
68001
|
+
if(ic.proteins && Object.keys(ic.proteins).length > 0) {
|
|
67971
68002
|
//ic.defNames2Atoms['proteins'] = Object.keys(ic.proteins);
|
|
67972
68003
|
ic.defNames2Residues['proteins'] = Object.keys(ic.firstAtomObjCls.getResiduesFromAtoms(ic.proteins));
|
|
67973
68004
|
ic.defNames2Descr['proteins'] = 'proteins';
|
|
67974
68005
|
ic.defNames2Command['proteins'] = 'select :proteins';
|
|
67975
68006
|
}
|
|
67976
68007
|
|
|
67977
|
-
if(Object.keys(ic.nucleotides).length > 0) {
|
|
68008
|
+
if(ic.nucleotides && Object.keys(ic.nucleotides).length > 0) {
|
|
67978
68009
|
//ic.defNames2Atoms['nucleotides'] = Object.keys(ic.nucleotides);
|
|
67979
68010
|
ic.defNames2Residues['nucleotides'] = Object.keys(ic.firstAtomObjCls.getResiduesFromAtoms(ic.nucleotides));
|
|
67980
68011
|
ic.defNames2Descr['nucleotides'] = 'nucleotides';
|
|
67981
68012
|
ic.defNames2Command['nucleotides'] = 'select :nucleotides';
|
|
67982
68013
|
}
|
|
67983
68014
|
|
|
67984
|
-
if(Object.keys(ic.chemicals).length > 0) {
|
|
68015
|
+
if(ic.chemicals && Object.keys(ic.chemicals).length > 0) {
|
|
67985
68016
|
//ic.defNames2Atoms['chemicals'] = Object.keys(ic.chemicals);
|
|
67986
68017
|
if(ic.bOpm) {
|
|
67987
68018
|
let chemicalResHash = {}, memResHash = {};
|
|
@@ -68015,14 +68046,14 @@ class DefinedSets {
|
|
|
68015
68046
|
}
|
|
68016
68047
|
}
|
|
68017
68048
|
|
|
68018
|
-
if(Object.keys(ic.ions).length > 0) {
|
|
68049
|
+
if(ic.ions && Object.keys(ic.ions).length > 0) {
|
|
68019
68050
|
//ic.defNames2Atoms['ions'] = Object.keys(ic.ions);
|
|
68020
68051
|
ic.defNames2Residues['ions'] = Object.keys(ic.firstAtomObjCls.getResiduesFromAtoms(ic.ions));
|
|
68021
68052
|
ic.defNames2Descr['ions'] = 'ions';
|
|
68022
68053
|
ic.defNames2Command['ions'] = 'select :ions';
|
|
68023
68054
|
}
|
|
68024
68055
|
|
|
68025
|
-
if(Object.keys(ic.water).length > 0) {
|
|
68056
|
+
if(ic.water && Object.keys(ic.water).length > 0) {
|
|
68026
68057
|
//ic.defNames2Atoms['water'] = Object.keys(ic.water);
|
|
68027
68058
|
ic.defNames2Residues['water'] = Object.keys(ic.firstAtomObjCls.getResiduesFromAtoms(ic.water));
|
|
68028
68059
|
ic.defNames2Descr['water'] = 'water';
|
|
@@ -68153,7 +68184,7 @@ class DefinedSets {
|
|
|
68153
68184
|
}
|
|
68154
68185
|
|
|
68155
68186
|
// select whole structure
|
|
68156
|
-
if(Object.keys(ic.structures) == 1) {
|
|
68187
|
+
if(ic.structures && Object.keys(ic.structures) == 1) {
|
|
68157
68188
|
let structure = Object.keys(ic.structures)[0];
|
|
68158
68189
|
|
|
68159
68190
|
ic.defNames2Residues[structure] = Object.keys(ic.residues);
|
|
@@ -68161,7 +68192,7 @@ class DefinedSets {
|
|
|
68161
68192
|
|
|
68162
68193
|
ic.defNames2Command[structure] = 'select $' + structure;
|
|
68163
68194
|
}
|
|
68164
|
-
else {
|
|
68195
|
+
else if(ic.residues) {
|
|
68165
68196
|
let resArray = Object.keys(ic.residues);
|
|
68166
68197
|
let structResHash = {};
|
|
68167
68198
|
for(let i = 0, il = resArray.length; i < il; ++i) {
|
|
@@ -69240,7 +69271,7 @@ class LoadScript {
|
|
|
69240
69271
|
|
|
69241
69272
|
let chainid = paraArray[1].substr(8);
|
|
69242
69273
|
let geneid = paraArray[2].substr(7);
|
|
69243
|
-
let startpos = paraArray[3].substr(9);
|
|
69274
|
+
let startpos = parseInt(paraArray[3].substr(9));
|
|
69244
69275
|
let type = paraArray[4].substr(5);
|
|
69245
69276
|
|
|
69246
69277
|
if($("#" + ic.pre + "anno_custom")[0]) {
|
|
@@ -69431,9 +69462,10 @@ class LoadScript {
|
|
|
69431
69462
|
|
|
69432
69463
|
if(command.indexOf('load') !== -1) { // 'load pdb [pdbid]'
|
|
69433
69464
|
let load_parameters = command.split(' | ');
|
|
69434
|
-
|
|
69435
69465
|
let loadStr = load_parameters[0];
|
|
69436
|
-
|
|
69466
|
+
|
|
69467
|
+
// do not reset me.cfg.inpara from "command=..." part if it was not empty
|
|
69468
|
+
if(load_parameters.length > 1 && !me.cfg.inpara) {
|
|
69437
69469
|
let firstSpacePos = load_parameters[load_parameters.length - 1].indexOf(' ');
|
|
69438
69470
|
me.cfg.inpara = load_parameters[load_parameters.length - 1].substr(firstSpacePos + 1);
|
|
69439
69471
|
if(me.cfg.inpara === 'undefined') {
|
|
@@ -76558,6 +76590,12 @@ class Diagram2d {
|
|
|
76558
76590
|
thisClass.clickInteraction(this);
|
|
76559
76591
|
});
|
|
76560
76592
|
|
|
76593
|
+
$(document).on("click", "#" + ic.pre + "dl_ligplot .icn3d-interaction", function(e) { thisClass.icn3d;
|
|
76594
|
+
e.stopImmediatePropagation();
|
|
76595
|
+
|
|
76596
|
+
thisClass.clickInteraction(this);
|
|
76597
|
+
});
|
|
76598
|
+
|
|
76561
76599
|
$(document).on("click", "#" + ic.pre + "dl_alignerrormap .icn3d-node", function(e) { thisClass.icn3d;
|
|
76562
76600
|
e.stopImmediatePropagation();
|
|
76563
76601
|
|
|
@@ -77806,7 +77844,7 @@ class Ligplot {
|
|
|
77806
77844
|
}
|
|
77807
77845
|
|
|
77808
77846
|
|
|
77809
|
-
getSvgPerPair(serialArray1, resid1, resid2, interactionType, index2xy, xlen, ylen, xcenter, ycenter, bNotDrawNode, prevX2, prevY2) { let ic = this.icn3d, me = ic.icn3dui;
|
|
77847
|
+
getSvgPerPair(serialArray1, resid1, resid2, interactionType, index2xy, xlen, ylen, xcenter, ycenter, dist, bNotDrawNode, prevX2, prevY2) { let ic = this.icn3d, me = ic.icn3dui;
|
|
77810
77848
|
let xOffset = 1, yOffset = -1;
|
|
77811
77849
|
let bondLen = (interactionType == 'hbond' || interactionType == 'contact' || interactionType == 'halogen') ? ic.len4ang : ic.len4ang * 1.5; // real distance should be bout 120, not 80
|
|
77812
77850
|
let shortBondLen = ic.len4ang / 2;
|
|
@@ -77918,6 +77956,26 @@ class Ligplot {
|
|
|
77918
77956
|
// sometimes the same ligand atom is used in both Hbond and contact. THus we add "interactionType"
|
|
77919
77957
|
let idpair = resid2Real + '--' + serialArray1.join('-') + interactionType;
|
|
77920
77958
|
|
|
77959
|
+
let interactionTypeStr;
|
|
77960
|
+
if(interactionType == 'hbond') {
|
|
77961
|
+
interactionTypeStr = 'H-Bonds';
|
|
77962
|
+
}
|
|
77963
|
+
else if(interactionType == 'ionic') {
|
|
77964
|
+
interactionTypeStr = 'Salt Bridge/Ionic';
|
|
77965
|
+
}
|
|
77966
|
+
else if(interactionType == 'halogen') {
|
|
77967
|
+
interactionTypeStr = 'Halogen Bonds';
|
|
77968
|
+
}
|
|
77969
|
+
else if(interactionType == 'pi-cation') {
|
|
77970
|
+
interactionTypeStr = 'π-Cation';
|
|
77971
|
+
}
|
|
77972
|
+
else if(interactionType == 'pi-stacking') {
|
|
77973
|
+
interactionTypeStr = 'π-Stacking';
|
|
77974
|
+
}
|
|
77975
|
+
else if(interactionType == 'contact') {
|
|
77976
|
+
interactionTypeStr = 'Contacts';
|
|
77977
|
+
}
|
|
77978
|
+
|
|
77921
77979
|
let id = resid2Real;
|
|
77922
77980
|
if(bNotDrawNode || ic.resid2ToXy.hasOwnProperty(id)) {
|
|
77923
77981
|
x2 = (ic.resid2ToXy.hasOwnProperty(id)) ? ic.resid2ToXy[id].x2 : prevX2;
|
|
@@ -77934,11 +77992,12 @@ class Ligplot {
|
|
|
77934
77992
|
}
|
|
77935
77993
|
}
|
|
77936
77994
|
|
|
77937
|
-
line +=
|
|
77995
|
+
line +='<g><title>Interaction type: ' + interactionTypeStr + '; Distance: ' + parseFloat(dist).toFixed(1) + ' Å</title>';
|
|
77996
|
+
line += '<line class="icn3d-interaction" id="' + idpair + '" resid1="' + resid1Real + '" resid2="' + resid2Real + '" x1="' + x1b.toFixed(2) + '" y1="' + y1b.toFixed(2) + '" x2="' + x2.toFixed(2) + '" y2="' + y2.toFixed(2) + '" x0="' + x1.toFixed(2) + '" y0="' + y1.toFixed(2) + '" short="' + bShort + '" opacity="1.0" stroke="' + lineColor + '" stroke-width="' + strokeWidth + '" stroke-dasharray="5,5"/>\n';
|
|
77997
|
+
line += '</g>\n';
|
|
77938
77998
|
}
|
|
77939
77999
|
else {
|
|
77940
|
-
node +='<g>';
|
|
77941
|
-
node += '<title>' + resName2 + '</title>';
|
|
78000
|
+
node +='<g><title>' + resName2 + '</title>';
|
|
77942
78001
|
// node += '<circle class='icn3d-ctnode' cx="' + x2.toFixed(2) + '" cy="' + y2.toFixed(2) + '" r="10" fill="#' + textColor2 + '" stroke-width="1" stroke="' + textColor2 + '" resid="' + resid2Real + '"/>';
|
|
77943
78002
|
let boxWidth = 28, boxHeight = 14;
|
|
77944
78003
|
node += '<rect id="' + id + '_node" x="' + (x2 - boxWidth*0.5).toFixed(2) + '" y="' + (y2 - boxHeight*0.5).toFixed(2) + '" width="' + boxWidth + '" height="' + boxHeight + '" rx="2" ry="2" fill="#' + textColor2 + '" stroke-width="1" stroke="' + textColor2 + '" resid="' + resid2Real + '"/>';
|
|
@@ -77946,7 +78005,9 @@ class Ligplot {
|
|
|
77946
78005
|
node += '<text class="icn3d-ctnode" resid="' + id + '" id="' + id + '" x="' + x2.toFixed(2) + '" y="' + y2.toFixed(2) + '" fill="#000" stroke="none" text-anchor="middle" alignment-baseline="central" style="font-size:10px">' + resName2 + '</text>';
|
|
77947
78006
|
node += '</g>\n';
|
|
77948
78007
|
|
|
77949
|
-
line +=
|
|
78008
|
+
line +='<g><title>Interaction type: ' + interactionTypeStr + '; Distance: ' + parseFloat(dist).toFixed(1) + ' Å</title>';
|
|
78009
|
+
line += '<line class="icn3d-interaction" id="' + idpair + '" resid1="' + resid1Real + '" resid2="' + resid2Real + '" x1="' + x1.toFixed(2) + '" y1="' + y1.toFixed(2) + '" x2="' + x2.toFixed(2) + '" y2="' + y2.toFixed(2) + '" opacity="1.0" stroke="' + lineColor + '" stroke-width="' + strokeWidth + '" stroke-dasharray="5,5"/>';
|
|
78010
|
+
line += '</g>\n';
|
|
77950
78011
|
|
|
77951
78012
|
if(interactionType != 'contact') {
|
|
77952
78013
|
if(!ic.resid2ToXy.hasOwnProperty(resid2Real)) ic.resid2ToXy[resid2Real] = {x2: x2, y2: y2};
|
|
@@ -77966,26 +78027,29 @@ class Ligplot {
|
|
|
77966
78027
|
start: function( e, ui ) {
|
|
77967
78028
|
let oriX= parseFloat(e.target.getAttribute('x'));
|
|
77968
78029
|
let oriY = parseFloat(e.target.getAttribute('y'));
|
|
77969
|
-
|
|
77970
78030
|
e.target.setAttribute('x', oriX);
|
|
77971
78031
|
e.target.setAttribute('y', oriY);
|
|
77972
78032
|
},
|
|
77973
78033
|
drag: function( e, ui ) {
|
|
77974
|
-
let
|
|
77975
|
-
|
|
78034
|
+
let ligplotScale = (ic.ligplotScale) ? ic.ligplotScale : 1;
|
|
78035
|
+
|
|
78036
|
+
let offsetX = $("#" + me.ligplotid).offset().left + ic.len4ang * ligplotScale; // ic.len4ang was defined in svg viewbox
|
|
78037
|
+
let offsetY = $("#" + me.ligplotid).offset().top + ic.len4ang * ligplotScale;
|
|
77976
78038
|
|
|
77977
78039
|
let id = e.target.getAttribute('resid');
|
|
77978
|
-
let x = (e.clientX - offsetX);
|
|
77979
|
-
let y = (e.clientY - offsetY);
|
|
78040
|
+
let x = (e.clientX - offsetX) / ligplotScale;
|
|
78041
|
+
let y = (e.clientY - offsetY) / ligplotScale;
|
|
77980
78042
|
|
|
77981
78043
|
let oriX = parseFloat(e.target.getAttribute('x'));
|
|
77982
78044
|
let oriY = parseFloat(e.target.getAttribute('y'));
|
|
77983
78045
|
|
|
77984
78046
|
// change for each step
|
|
77985
|
-
let dx = (x - oriX) / ic.resizeRatioX;
|
|
77986
|
-
let dy = (y - oriY) / ic.resizeRatioY;
|
|
78047
|
+
// let dx = (x - oriX) / ic.resizeRatioX;
|
|
78048
|
+
// let dy = (y - oriY) / ic.resizeRatioY;
|
|
78049
|
+
let dx = (x - oriX);
|
|
78050
|
+
let dy = (y - oriY);
|
|
77987
78051
|
|
|
77988
|
-
// move the
|
|
78052
|
+
// move the node
|
|
77989
78053
|
oriX = parseFloat($("#" + id + "_node").attr('x'));
|
|
77990
78054
|
oriY = parseFloat($("#" + id + "_node").attr('y'));
|
|
77991
78055
|
|
|
@@ -82811,7 +82875,7 @@ class iCn3DUI {
|
|
|
82811
82875
|
//even when multiple iCn3D viewers are shown together.
|
|
82812
82876
|
this.pre = this.cfg.divid + "_";
|
|
82813
82877
|
|
|
82814
|
-
this.REVISION = '3.34.
|
|
82878
|
+
this.REVISION = '3.34.1';
|
|
82815
82879
|
|
|
82816
82880
|
// In nodejs, iCn3D defines "window = {navigator: {}}"
|
|
82817
82881
|
this.bNode = (Object.keys(window).length < 2) ? true : false;
|
|
@@ -83001,7 +83065,8 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
|
|
|
83001
83065
|
await ic.realignParserCls.realignChainOnSeqAlign(undefined, chainidArray, bRealign, bPredefined);
|
|
83002
83066
|
}
|
|
83003
83067
|
}
|
|
83004
|
-
else if(me.cfg.resdef !== undefined && me.cfg.matchedchains !== undefined) {
|
|
83068
|
+
// else if(me.cfg.resdef !== undefined && me.cfg.matchedchains !== undefined) {
|
|
83069
|
+
else if(me.cfg.matchedchains !== undefined) {
|
|
83005
83070
|
let stru_t = Object.keys(ic.structures)[0];
|
|
83006
83071
|
|
|
83007
83072
|
let chain_t = stru_t + '_' + me.cfg.masterchain;
|
|
@@ -83029,7 +83094,7 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
|
|
|
83029
83094
|
ic.chainidArray = [chain_t].concat(chainidArray);
|
|
83030
83095
|
ic.chainidArray = ic.chainalignParserCls.addPostfixForChainids(ic.chainidArray);
|
|
83031
83096
|
|
|
83032
|
-
me.htmlCls.clickMenuCls.setLogCmd('resdef ' + me.cfg.resdef, true);
|
|
83097
|
+
// me.htmlCls.clickMenuCls.setLogCmd('resdef ' + me.cfg.resdef, true);
|
|
83033
83098
|
|
|
83034
83099
|
ic.loadCmd = 'vast_search_chainid ' + ic.chainidArray;
|
|
83035
83100
|
me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
|
|
@@ -83255,7 +83320,8 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
|
|
|
83255
83320
|
ic.bChainAlign = true;
|
|
83256
83321
|
ic.inputid = me.cfg.chainalign;
|
|
83257
83322
|
let resrangeStr = (me.cfg.resrange) ? ' | resrange ' + me.cfg.resrange : '';
|
|
83258
|
-
|
|
83323
|
+
let resdef = (me.cfg.resdef) ? me.cfg.resdef : '';
|
|
83324
|
+
ic.loadCmd = 'load chainalignment ' + me.cfg.chainalign + ' | resnum ' + me.cfg.resnum + ' | resdef ' + resdef + ' | aligntool ' + me.cfg.aligntool + ' | parameters ' + me.cfg.inpara + resrangeStr;
|
|
83259
83325
|
me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
|
|
83260
83326
|
await ic.chainalignParserCls.downloadChainalignment(me.cfg.chainalign);
|
|
83261
83327
|
}
|