icn3d 3.34.2 → 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 +112 -45
- package/icn3d.min.js +4 -4
- package/icn3d.module.js +112 -45
- 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
|
|
|
@@ -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
|
|
|
@@ -40977,6 +40991,7 @@ class AnnoCddSite {
|
|
|
40977
40991
|
if(me.bNode) {
|
|
40978
40992
|
if(!ic.resid2cdd) ic.resid2cdd = {};
|
|
40979
40993
|
if(!ic.resid2site) ic.resid2site = {};
|
|
40994
|
+
if(!ic.chainid2cdd) ic.chainid2cdd = {};
|
|
40980
40995
|
}
|
|
40981
40996
|
|
|
40982
40997
|
for(let i = 0, il = dataArray.length; i < il; ++i) {
|
|
@@ -40999,6 +41014,8 @@ class AnnoCddSite {
|
|
|
40999
41014
|
let html3 = html;
|
|
41000
41015
|
let domainArray = cddData.doms;
|
|
41001
41016
|
if(me.bNode && !ic.resid2cdd[chnid]) ic.resid2cdd[chnid] = [];
|
|
41017
|
+
if(me.bNode && !ic.chainid2cdd[chnid]) ic.chainid2cdd[chnid] = [];
|
|
41018
|
+
|
|
41002
41019
|
let result = thisClass.setDomainFeature(domainArray, chnid, 'domain', html, html2, html3);
|
|
41003
41020
|
|
|
41004
41021
|
ic.chainid2pssmid[chnid] = {pssmid2name: result.pssmid2name, pssmid2fromArray: result.pssmid2fromArray, pssmid2toArray: result.pssmid2toArray};
|
|
@@ -41290,6 +41307,10 @@ class AnnoCddSite {
|
|
|
41290
41307
|
|
|
41291
41308
|
if(ic.seqStartLen && ic.seqStartLen[chnid]) html += ic.showSeqCls.insertMulGap(ic.seqStartLen[chnid], '-');
|
|
41292
41309
|
|
|
41310
|
+
if(me.bNode && type == 'domain') {
|
|
41311
|
+
ic.chainid2cdd[chnid].push(fulltitle + "_from_" + fromArray + "_to_" + toArray);
|
|
41312
|
+
}
|
|
41313
|
+
|
|
41293
41314
|
for(let i = 0, il = ic.giSeq[chnid].length; i < il; ++i) {
|
|
41294
41315
|
html += ic.showSeqCls.insertGap(chnid, i, '-');
|
|
41295
41316
|
|
|
@@ -43326,7 +43347,7 @@ class AnnoSnpClinVar {
|
|
|
43326
43347
|
}
|
|
43327
43348
|
|
|
43328
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>";
|
|
43329
|
-
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>";
|
|
43330
43351
|
}
|
|
43331
43352
|
else {
|
|
43332
43353
|
if(bCoord && !me.cfg.hidelicense) {
|
|
@@ -43408,7 +43429,7 @@ class AnnoSnpClinVar {
|
|
|
43408
43429
|
}
|
|
43409
43430
|
|
|
43410
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>";
|
|
43411
|
-
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>";
|
|
43412
43433
|
if(j < jl - 1) {
|
|
43413
43434
|
snpTitle += '<br><br>';
|
|
43414
43435
|
}
|
|
@@ -45600,7 +45621,8 @@ class AddTrack {
|
|
|
45600
45621
|
$("#" + ic.pre + "tt_custom_" + chnid).append("<div id='" + ic.pre + "tt_custom_" + chnid + "_" + simpTitle + "'></div>");
|
|
45601
45622
|
$("#" + ic.pre + "tt_custom_" + chnid + "_" + simpTitle).width(divLength);
|
|
45602
45623
|
|
|
45603
|
-
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">';
|
|
45604
45626
|
let htmlExon = html;
|
|
45605
45627
|
let html2 = html;
|
|
45606
45628
|
let html3 = html;
|
|
@@ -46895,6 +46917,7 @@ class AddTrack {
|
|
|
46895
46917
|
let title =(trackTitleArray[j].length < 20) ? trackTitleArray[j] : trackTitleArray[j].substr(0, 20) + '...';
|
|
46896
46918
|
let bMsa = true;
|
|
46897
46919
|
let exonArray = (acc2exons) ? acc2exons[trackTitleArray[j]] : undefined;
|
|
46920
|
+
|
|
46898
46921
|
this.showNewTrack(chainid, title, text, undefined, undefined, type, undefined, bMsa, fromArray, toArray, seqStartLen, exonArray, offsetArray);
|
|
46899
46922
|
}
|
|
46900
46923
|
|
|
@@ -47106,6 +47129,7 @@ class AddTrack {
|
|
|
47106
47129
|
await thisClass.showMsaTracks(chainid, seqFirst, trackTitleArray, trackSeqArray, startpos, type, acc2exons);
|
|
47107
47130
|
|
|
47108
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);
|
|
47109
47133
|
}
|
|
47110
47134
|
|
|
47111
47135
|
async addMsaTracks(chainid, startpos, type, fastaList) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -48246,7 +48270,8 @@ class ShowAnno {
|
|
|
48246
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>");
|
|
48247
48271
|
$("#" + ic.pre + "anno_" + name).append("<br><hr><br>");
|
|
48248
48272
|
// sequence, detailed view
|
|
48249
|
-
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">';
|
|
48250
48275
|
let chainType = 'Chem.', chainTypeFull = 'Chemical';
|
|
48251
48276
|
//htmlTmp += '<div class="icn3d-seqTitle2" anno="sequence"><span style="white-space:nowrap;" title="' + chainTypeFull + ' ' + name + '">' + chainType + ' ' + name + '</span></div>';
|
|
48252
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>';
|
|
@@ -48283,6 +48308,8 @@ class ShowAnno {
|
|
|
48283
48308
|
}
|
|
48284
48309
|
|
|
48285
48310
|
async processSeqData(chainid_seq) { let ic = this.icn3d, me = ic.icn3dui;
|
|
48311
|
+
ic.bAnnoShown = true;
|
|
48312
|
+
|
|
48286
48313
|
for(let chnid in ic.protein_chainid) {
|
|
48287
48314
|
let chnidBase = ic.protein_chainid[chnid];
|
|
48288
48315
|
//if(chainid_seq.hasOwnProperty(chnid)) {
|
|
@@ -48800,11 +48827,17 @@ class ShowSeq {
|
|
|
48800
48827
|
html += '</div>';
|
|
48801
48828
|
html += '</div>'; // corresponds to above: html += '<div class="icn3d-dl_sequence">';
|
|
48802
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
|
+
// }
|
|
48803
48836
|
if(me.cfg.blast_rep_id === chnid) {
|
|
48804
|
-
htmlTmp = '<div
|
|
48837
|
+
htmlTmp = '<div class="icn3d-dl_sequence" style="border: solid 1px #000">';
|
|
48805
48838
|
}
|
|
48806
48839
|
else {
|
|
48807
|
-
htmlTmp = '<div
|
|
48840
|
+
htmlTmp = '<div class="icn3d-dl_sequence">';
|
|
48808
48841
|
}
|
|
48809
48842
|
let chainType = 'Protein', chainTypeFull = 'Protein';
|
|
48810
48843
|
if(type !== undefined) {
|
|
@@ -52371,7 +52404,7 @@ class ViewInterPairs {
|
|
|
52371
52404
|
if(index2xy) {
|
|
52372
52405
|
let serialArray1 = resid1Ori.substr(pos1 + 1).split(',');
|
|
52373
52406
|
|
|
52374
|
-
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);
|
|
52375
52408
|
svgHtmlNode += result.node;
|
|
52376
52409
|
svgHtmlLine += result.line;
|
|
52377
52410
|
}
|
|
@@ -52473,9 +52506,12 @@ class ViewInterPairs {
|
|
|
52473
52506
|
let resids = resid1 + '|' + resid2;
|
|
52474
52507
|
|
|
52475
52508
|
let serialArray1 = resids2distCnt[resids].serialArray1;
|
|
52476
|
-
|
|
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;
|
|
52477
52513
|
let bNotDrawNode = (i == 0) ? false : true;
|
|
52478
|
-
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);
|
|
52479
52515
|
svgHtmlNode += result.node;
|
|
52480
52516
|
svgHtmlLine += result.line;
|
|
52481
52517
|
prevX2 = result.x2;
|
|
@@ -61131,10 +61167,7 @@ class ParserUtils {
|
|
|
61131
61167
|
// display the structure right away. load the mns and sequences later
|
|
61132
61168
|
setTimeout(async function(){
|
|
61133
61169
|
if(ic.bInitial) {
|
|
61134
|
-
|
|
61135
|
-
// if(me.cfg.showsets) {
|
|
61136
|
-
// ic.definedSetsCls.showSets();
|
|
61137
|
-
// }
|
|
61170
|
+
// if(ic.bInitial && (!ic.bAnnoShown || ic.bResetAnno)) {
|
|
61138
61171
|
if(me.cfg.align !== undefined || me.cfg.chainalign !== undefined) {
|
|
61139
61172
|
// expand the toolbar
|
|
61140
61173
|
let id = ic.pre + 'selection';
|
|
@@ -67273,6 +67306,7 @@ class ApplyCommand {
|
|
|
67273
67306
|
let scale = command.substr(pos + 1);
|
|
67274
67307
|
|
|
67275
67308
|
$("#" + me.ligplotid + "_scale").val(scale);
|
|
67309
|
+
ic.ligplotScale = parseFloat(scale);
|
|
67276
67310
|
|
|
67277
67311
|
$("#" + me.ligplotid).attr("width",(ic.ligplotWidth * parseFloat(scale)).toString() + "px");
|
|
67278
67312
|
}
|
|
@@ -67501,6 +67535,7 @@ class ApplyCommand {
|
|
|
67501
67535
|
}
|
|
67502
67536
|
else if(command.indexOf('glycans cartoon') == 0) {
|
|
67503
67537
|
let value = command.substr(command.lastIndexOf(' ') + 1);
|
|
67538
|
+
|
|
67504
67539
|
if(value == 'yes') {
|
|
67505
67540
|
ic.bGlycansCartoon = true;
|
|
67506
67541
|
}
|
|
@@ -67963,21 +67998,21 @@ class DefinedSets {
|
|
|
67963
67998
|
|
|
67964
67999
|
setProtNuclLigInMenu() { let ic = this.icn3d; ic.icn3dui;
|
|
67965
68000
|
// Initially, add proteins, nucleotides, chemicals, ions, water into the menu "custom selections"
|
|
67966
|
-
if(Object.keys(ic.proteins).length > 0) {
|
|
68001
|
+
if(ic.proteins && Object.keys(ic.proteins).length > 0) {
|
|
67967
68002
|
//ic.defNames2Atoms['proteins'] = Object.keys(ic.proteins);
|
|
67968
68003
|
ic.defNames2Residues['proteins'] = Object.keys(ic.firstAtomObjCls.getResiduesFromAtoms(ic.proteins));
|
|
67969
68004
|
ic.defNames2Descr['proteins'] = 'proteins';
|
|
67970
68005
|
ic.defNames2Command['proteins'] = 'select :proteins';
|
|
67971
68006
|
}
|
|
67972
68007
|
|
|
67973
|
-
if(Object.keys(ic.nucleotides).length > 0) {
|
|
68008
|
+
if(ic.nucleotides && Object.keys(ic.nucleotides).length > 0) {
|
|
67974
68009
|
//ic.defNames2Atoms['nucleotides'] = Object.keys(ic.nucleotides);
|
|
67975
68010
|
ic.defNames2Residues['nucleotides'] = Object.keys(ic.firstAtomObjCls.getResiduesFromAtoms(ic.nucleotides));
|
|
67976
68011
|
ic.defNames2Descr['nucleotides'] = 'nucleotides';
|
|
67977
68012
|
ic.defNames2Command['nucleotides'] = 'select :nucleotides';
|
|
67978
68013
|
}
|
|
67979
68014
|
|
|
67980
|
-
if(Object.keys(ic.chemicals).length > 0) {
|
|
68015
|
+
if(ic.chemicals && Object.keys(ic.chemicals).length > 0) {
|
|
67981
68016
|
//ic.defNames2Atoms['chemicals'] = Object.keys(ic.chemicals);
|
|
67982
68017
|
if(ic.bOpm) {
|
|
67983
68018
|
let chemicalResHash = {}, memResHash = {};
|
|
@@ -68011,14 +68046,14 @@ class DefinedSets {
|
|
|
68011
68046
|
}
|
|
68012
68047
|
}
|
|
68013
68048
|
|
|
68014
|
-
if(Object.keys(ic.ions).length > 0) {
|
|
68049
|
+
if(ic.ions && Object.keys(ic.ions).length > 0) {
|
|
68015
68050
|
//ic.defNames2Atoms['ions'] = Object.keys(ic.ions);
|
|
68016
68051
|
ic.defNames2Residues['ions'] = Object.keys(ic.firstAtomObjCls.getResiduesFromAtoms(ic.ions));
|
|
68017
68052
|
ic.defNames2Descr['ions'] = 'ions';
|
|
68018
68053
|
ic.defNames2Command['ions'] = 'select :ions';
|
|
68019
68054
|
}
|
|
68020
68055
|
|
|
68021
|
-
if(Object.keys(ic.water).length > 0) {
|
|
68056
|
+
if(ic.water && Object.keys(ic.water).length > 0) {
|
|
68022
68057
|
//ic.defNames2Atoms['water'] = Object.keys(ic.water);
|
|
68023
68058
|
ic.defNames2Residues['water'] = Object.keys(ic.firstAtomObjCls.getResiduesFromAtoms(ic.water));
|
|
68024
68059
|
ic.defNames2Descr['water'] = 'water';
|
|
@@ -68149,7 +68184,7 @@ class DefinedSets {
|
|
|
68149
68184
|
}
|
|
68150
68185
|
|
|
68151
68186
|
// select whole structure
|
|
68152
|
-
if(Object.keys(ic.structures) == 1) {
|
|
68187
|
+
if(ic.structures && Object.keys(ic.structures) == 1) {
|
|
68153
68188
|
let structure = Object.keys(ic.structures)[0];
|
|
68154
68189
|
|
|
68155
68190
|
ic.defNames2Residues[structure] = Object.keys(ic.residues);
|
|
@@ -68157,7 +68192,7 @@ class DefinedSets {
|
|
|
68157
68192
|
|
|
68158
68193
|
ic.defNames2Command[structure] = 'select $' + structure;
|
|
68159
68194
|
}
|
|
68160
|
-
else {
|
|
68195
|
+
else if(ic.residues) {
|
|
68161
68196
|
let resArray = Object.keys(ic.residues);
|
|
68162
68197
|
let structResHash = {};
|
|
68163
68198
|
for(let i = 0, il = resArray.length; i < il; ++i) {
|
|
@@ -69236,7 +69271,7 @@ class LoadScript {
|
|
|
69236
69271
|
|
|
69237
69272
|
let chainid = paraArray[1].substr(8);
|
|
69238
69273
|
let geneid = paraArray[2].substr(7);
|
|
69239
|
-
let startpos = paraArray[3].substr(9);
|
|
69274
|
+
let startpos = parseInt(paraArray[3].substr(9));
|
|
69240
69275
|
let type = paraArray[4].substr(5);
|
|
69241
69276
|
|
|
69242
69277
|
if($("#" + ic.pre + "anno_custom")[0]) {
|
|
@@ -76555,6 +76590,12 @@ class Diagram2d {
|
|
|
76555
76590
|
thisClass.clickInteraction(this);
|
|
76556
76591
|
});
|
|
76557
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
|
+
|
|
76558
76599
|
$(document).on("click", "#" + ic.pre + "dl_alignerrormap .icn3d-node", function(e) { thisClass.icn3d;
|
|
76559
76600
|
e.stopImmediatePropagation();
|
|
76560
76601
|
|
|
@@ -77803,7 +77844,7 @@ class Ligplot {
|
|
|
77803
77844
|
}
|
|
77804
77845
|
|
|
77805
77846
|
|
|
77806
|
-
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;
|
|
77807
77848
|
let xOffset = 1, yOffset = -1;
|
|
77808
77849
|
let bondLen = (interactionType == 'hbond' || interactionType == 'contact' || interactionType == 'halogen') ? ic.len4ang : ic.len4ang * 1.5; // real distance should be bout 120, not 80
|
|
77809
77850
|
let shortBondLen = ic.len4ang / 2;
|
|
@@ -77915,6 +77956,26 @@ class Ligplot {
|
|
|
77915
77956
|
// sometimes the same ligand atom is used in both Hbond and contact. THus we add "interactionType"
|
|
77916
77957
|
let idpair = resid2Real + '--' + serialArray1.join('-') + interactionType;
|
|
77917
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
|
+
|
|
77918
77979
|
let id = resid2Real;
|
|
77919
77980
|
if(bNotDrawNode || ic.resid2ToXy.hasOwnProperty(id)) {
|
|
77920
77981
|
x2 = (ic.resid2ToXy.hasOwnProperty(id)) ? ic.resid2ToXy[id].x2 : prevX2;
|
|
@@ -77931,11 +77992,12 @@ class Ligplot {
|
|
|
77931
77992
|
}
|
|
77932
77993
|
}
|
|
77933
77994
|
|
|
77934
|
-
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';
|
|
77935
77998
|
}
|
|
77936
77999
|
else {
|
|
77937
|
-
node +='<g>';
|
|
77938
|
-
node += '<title>' + resName2 + '</title>';
|
|
78000
|
+
node +='<g><title>' + resName2 + '</title>';
|
|
77939
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 + '"/>';
|
|
77940
78002
|
let boxWidth = 28, boxHeight = 14;
|
|
77941
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 + '"/>';
|
|
@@ -77943,7 +78005,9 @@ class Ligplot {
|
|
|
77943
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>';
|
|
77944
78006
|
node += '</g>\n';
|
|
77945
78007
|
|
|
77946
|
-
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';
|
|
77947
78011
|
|
|
77948
78012
|
if(interactionType != 'contact') {
|
|
77949
78013
|
if(!ic.resid2ToXy.hasOwnProperty(resid2Real)) ic.resid2ToXy[resid2Real] = {x2: x2, y2: y2};
|
|
@@ -77963,26 +78027,29 @@ class Ligplot {
|
|
|
77963
78027
|
start: function( e, ui ) {
|
|
77964
78028
|
let oriX= parseFloat(e.target.getAttribute('x'));
|
|
77965
78029
|
let oriY = parseFloat(e.target.getAttribute('y'));
|
|
77966
|
-
|
|
77967
78030
|
e.target.setAttribute('x', oriX);
|
|
77968
78031
|
e.target.setAttribute('y', oriY);
|
|
77969
78032
|
},
|
|
77970
78033
|
drag: function( e, ui ) {
|
|
77971
|
-
let
|
|
77972
|
-
|
|
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;
|
|
77973
78038
|
|
|
77974
78039
|
let id = e.target.getAttribute('resid');
|
|
77975
|
-
let x = (e.clientX - offsetX);
|
|
77976
|
-
let y = (e.clientY - offsetY);
|
|
78040
|
+
let x = (e.clientX - offsetX) / ligplotScale;
|
|
78041
|
+
let y = (e.clientY - offsetY) / ligplotScale;
|
|
77977
78042
|
|
|
77978
78043
|
let oriX = parseFloat(e.target.getAttribute('x'));
|
|
77979
78044
|
let oriY = parseFloat(e.target.getAttribute('y'));
|
|
77980
78045
|
|
|
77981
78046
|
// change for each step
|
|
77982
|
-
let dx = (x - oriX) / ic.resizeRatioX;
|
|
77983
|
-
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);
|
|
77984
78051
|
|
|
77985
|
-
// move the
|
|
78052
|
+
// move the node
|
|
77986
78053
|
oriX = parseFloat($("#" + id + "_node").attr('x'));
|
|
77987
78054
|
oriY = parseFloat($("#" + id + "_node").attr('y'));
|
|
77988
78055
|
|