icn3d 3.34.2 → 3.34.4
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 +128 -45
- package/icn3d.min.js +4 -4
- package/icn3d.module.js +128 -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};
|
|
@@ -41155,6 +41172,20 @@ class AnnoCddSite {
|
|
|
41155
41172
|
ic.bAjaxCddSite = true;
|
|
41156
41173
|
}
|
|
41157
41174
|
|
|
41175
|
+
getResiArrayStr(resiNCBIArray, chainid) { let ic = this.icn3d; ic.icn3dui;
|
|
41176
|
+
let resiArrayStr = '';
|
|
41177
|
+
for(let i = 0, il = resiNCBIArray.length; i < il; ++i) {
|
|
41178
|
+
let resiNCBI = resiNCBIArray[i];
|
|
41179
|
+
let residNCBI = chainid + '_' + resiNCBI;
|
|
41180
|
+
let resid = ic.ncbi2resid[residNCBI];
|
|
41181
|
+
let resi = resid.split('_')[2];
|
|
41182
|
+
if(i > 0) resiArrayStr += ',';
|
|
41183
|
+
resiArrayStr += resi;
|
|
41184
|
+
}
|
|
41185
|
+
|
|
41186
|
+
return resiArrayStr;
|
|
41187
|
+
}
|
|
41188
|
+
|
|
41158
41189
|
setDomainFeature(domainArray, chnid, type, html, html2, html3, acc2domain, titleArray, fullTitleArray) { let ic = this.icn3d, me = ic.icn3dui;
|
|
41159
41190
|
|
|
41160
41191
|
let bNonDomainFeat = (type != 'domain' && type != 'feat') ? true : false;
|
|
@@ -41290,6 +41321,12 @@ class AnnoCddSite {
|
|
|
41290
41321
|
|
|
41291
41322
|
if(ic.seqStartLen && ic.seqStartLen[chnid]) html += ic.showSeqCls.insertMulGap(ic.seqStartLen[chnid], '-');
|
|
41292
41323
|
|
|
41324
|
+
if(me.bNode && type == 'domain') {
|
|
41325
|
+
let fromStr = this.getResiArrayStr(fromArray, chnid);
|
|
41326
|
+
let toStr = this.getResiArrayStr(toArray, chnid);
|
|
41327
|
+
ic.chainid2cdd[chnid].push(fulltitle + "_from_" + fromStr + "_to_" + toStr);
|
|
41328
|
+
}
|
|
41329
|
+
|
|
41293
41330
|
for(let i = 0, il = ic.giSeq[chnid].length; i < il; ++i) {
|
|
41294
41331
|
html += ic.showSeqCls.insertGap(chnid, i, '-');
|
|
41295
41332
|
|
|
@@ -43326,7 +43363,7 @@ class AnnoSnpClinVar {
|
|
|
43326
43363
|
}
|
|
43327
43364
|
|
|
43328
43365
|
//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>";
|
|
43366
|
+
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
43367
|
}
|
|
43331
43368
|
else {
|
|
43332
43369
|
if(bCoord && !me.cfg.hidelicense) {
|
|
@@ -43408,7 +43445,7 @@ class AnnoSnpClinVar {
|
|
|
43408
43445
|
}
|
|
43409
43446
|
|
|
43410
43447
|
//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>";
|
|
43448
|
+
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
43449
|
if(j < jl - 1) {
|
|
43413
43450
|
snpTitle += '<br><br>';
|
|
43414
43451
|
}
|
|
@@ -45600,7 +45637,8 @@ class AddTrack {
|
|
|
45600
45637
|
$("#" + ic.pre + "tt_custom_" + chnid).append("<div id='" + ic.pre + "tt_custom_" + chnid + "_" + simpTitle + "'></div>");
|
|
45601
45638
|
$("#" + ic.pre + "tt_custom_" + chnid + "_" + simpTitle).width(divLength);
|
|
45602
45639
|
|
|
45603
|
-
let html = '<div id="' + ic.pre + 'giseq_sequence" class="icn3d-dl_sequence">';
|
|
45640
|
+
// let html = '<div id="' + ic.pre + 'giseq_sequence" class="icn3d-dl_sequence">';
|
|
45641
|
+
let html = '<div class="icn3d-dl_sequence">';
|
|
45604
45642
|
let htmlExon = html;
|
|
45605
45643
|
let html2 = html;
|
|
45606
45644
|
let html3 = html;
|
|
@@ -46895,6 +46933,7 @@ class AddTrack {
|
|
|
46895
46933
|
let title =(trackTitleArray[j].length < 20) ? trackTitleArray[j] : trackTitleArray[j].substr(0, 20) + '...';
|
|
46896
46934
|
let bMsa = true;
|
|
46897
46935
|
let exonArray = (acc2exons) ? acc2exons[trackTitleArray[j]] : undefined;
|
|
46936
|
+
|
|
46898
46937
|
this.showNewTrack(chainid, title, text, undefined, undefined, type, undefined, bMsa, fromArray, toArray, seqStartLen, exonArray, offsetArray);
|
|
46899
46938
|
}
|
|
46900
46939
|
|
|
@@ -47106,6 +47145,7 @@ class AddTrack {
|
|
|
47106
47145
|
await thisClass.showMsaTracks(chainid, seqFirst, trackTitleArray, trackSeqArray, startpos, type, acc2exons);
|
|
47107
47146
|
|
|
47108
47147
|
me.htmlCls.clickMenuCls.setLogCmd("add exon track | chainid " + chainid + " | geneid " + geneid + " | startpos " + startpos + " | type " + type, true);
|
|
47148
|
+
me.htmlCls.clickMenuCls.setLogCmd("set annotation custom", true);
|
|
47109
47149
|
}
|
|
47110
47150
|
|
|
47111
47151
|
async addMsaTracks(chainid, startpos, type, fastaList) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -48246,7 +48286,8 @@ class ShowAnno {
|
|
|
48246
48286
|
$("#" + 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
48287
|
$("#" + ic.pre + "anno_" + name).append("<br><hr><br>");
|
|
48248
48288
|
// sequence, detailed view
|
|
48249
|
-
let htmlTmp = '<div id="' + ic.pre + 'giseq_sequence" class="icn3d-dl_sequence">';
|
|
48289
|
+
// let htmlTmp = '<div id="' + ic.pre + 'giseq_sequence" class="icn3d-dl_sequence">';
|
|
48290
|
+
let htmlTmp = '<div class="icn3d-dl_sequence">';
|
|
48250
48291
|
let chainType = 'Chem.', chainTypeFull = 'Chemical';
|
|
48251
48292
|
//htmlTmp += '<div class="icn3d-seqTitle2" anno="sequence"><span style="white-space:nowrap;" title="' + chainTypeFull + ' ' + name + '">' + chainType + ' ' + name + '</span></div>';
|
|
48252
48293
|
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 +48324,8 @@ class ShowAnno {
|
|
|
48283
48324
|
}
|
|
48284
48325
|
|
|
48285
48326
|
async processSeqData(chainid_seq) { let ic = this.icn3d, me = ic.icn3dui;
|
|
48327
|
+
ic.bAnnoShown = true;
|
|
48328
|
+
|
|
48286
48329
|
for(let chnid in ic.protein_chainid) {
|
|
48287
48330
|
let chnidBase = ic.protein_chainid[chnid];
|
|
48288
48331
|
//if(chainid_seq.hasOwnProperty(chnid)) {
|
|
@@ -48800,11 +48843,17 @@ class ShowSeq {
|
|
|
48800
48843
|
html += '</div>';
|
|
48801
48844
|
html += '</div>'; // corresponds to above: html += '<div class="icn3d-dl_sequence">';
|
|
48802
48845
|
html3 += '</div></div>';
|
|
48846
|
+
// if(me.cfg.blast_rep_id === chnid) {
|
|
48847
|
+
// htmlTmp = '<div id="' + ic.pre + 'giseq_sequence" class="icn3d-dl_sequence" style="border: solid 1px #000">';
|
|
48848
|
+
// }
|
|
48849
|
+
// else {
|
|
48850
|
+
// htmlTmp = '<div id="' + ic.pre + 'giseq_sequence" class="icn3d-dl_sequence">';
|
|
48851
|
+
// }
|
|
48803
48852
|
if(me.cfg.blast_rep_id === chnid) {
|
|
48804
|
-
htmlTmp = '<div
|
|
48853
|
+
htmlTmp = '<div class="icn3d-dl_sequence" style="border: solid 1px #000">';
|
|
48805
48854
|
}
|
|
48806
48855
|
else {
|
|
48807
|
-
htmlTmp = '<div
|
|
48856
|
+
htmlTmp = '<div class="icn3d-dl_sequence">';
|
|
48808
48857
|
}
|
|
48809
48858
|
let chainType = 'Protein', chainTypeFull = 'Protein';
|
|
48810
48859
|
if(type !== undefined) {
|
|
@@ -52371,7 +52420,7 @@ class ViewInterPairs {
|
|
|
52371
52420
|
if(index2xy) {
|
|
52372
52421
|
let serialArray1 = resid1Ori.substr(pos1 + 1).split(',');
|
|
52373
52422
|
|
|
52374
|
-
let result = ic.ligplotCls.getSvgPerPair(serialArray1, resid1, resid2, interactionType, index2xy, xlen, ylen, xcenter, ycenter);
|
|
52423
|
+
let result = ic.ligplotCls.getSvgPerPair(serialArray1, resid1, resid2, interactionType, index2xy, xlen, ylen, xcenter, ycenter, dist);
|
|
52375
52424
|
svgHtmlNode += result.node;
|
|
52376
52425
|
svgHtmlLine += result.line;
|
|
52377
52426
|
}
|
|
@@ -52473,9 +52522,12 @@ class ViewInterPairs {
|
|
|
52473
52522
|
let resids = resid1 + '|' + resid2;
|
|
52474
52523
|
|
|
52475
52524
|
let serialArray1 = resids2distCnt[resids].serialArray1;
|
|
52476
|
-
|
|
52525
|
+
let dist1_dist2_atom1_atom2 = resids2distCnt[resids].dist1_dist2_atom1_atom2;
|
|
52526
|
+
let dist1 = dist1_dist2_atom1_atom2[0]; // min dist
|
|
52527
|
+
dist1_dist2_atom1_atom2[1]; // c-alpha dist
|
|
52528
|
+
// let dist = (dist1 < dist2) ? dist1 : dist2;
|
|
52477
52529
|
let bNotDrawNode = (i == 0) ? false : true;
|
|
52478
|
-
let result = ic.ligplotCls.getSvgPerPair(serialArray1, resid1, resid2, interactionType, index2xy, xlen, ylen, xcenter, ycenter, bNotDrawNode, prevX2, prevY2);
|
|
52530
|
+
let result = ic.ligplotCls.getSvgPerPair(serialArray1, resid1, resid2, interactionType, index2xy, xlen, ylen, xcenter, ycenter, dist1, bNotDrawNode, prevX2, prevY2);
|
|
52479
52531
|
svgHtmlNode += result.node;
|
|
52480
52532
|
svgHtmlLine += result.line;
|
|
52481
52533
|
prevX2 = result.x2;
|
|
@@ -61131,10 +61183,7 @@ class ParserUtils {
|
|
|
61131
61183
|
// display the structure right away. load the mns and sequences later
|
|
61132
61184
|
setTimeout(async function(){
|
|
61133
61185
|
if(ic.bInitial) {
|
|
61134
|
-
|
|
61135
|
-
// if(me.cfg.showsets) {
|
|
61136
|
-
// ic.definedSetsCls.showSets();
|
|
61137
|
-
// }
|
|
61186
|
+
// if(ic.bInitial && (!ic.bAnnoShown || ic.bResetAnno)) {
|
|
61138
61187
|
if(me.cfg.align !== undefined || me.cfg.chainalign !== undefined) {
|
|
61139
61188
|
// expand the toolbar
|
|
61140
61189
|
let id = ic.pre + 'selection';
|
|
@@ -67273,6 +67322,7 @@ class ApplyCommand {
|
|
|
67273
67322
|
let scale = command.substr(pos + 1);
|
|
67274
67323
|
|
|
67275
67324
|
$("#" + me.ligplotid + "_scale").val(scale);
|
|
67325
|
+
ic.ligplotScale = parseFloat(scale);
|
|
67276
67326
|
|
|
67277
67327
|
$("#" + me.ligplotid).attr("width",(ic.ligplotWidth * parseFloat(scale)).toString() + "px");
|
|
67278
67328
|
}
|
|
@@ -67501,6 +67551,7 @@ class ApplyCommand {
|
|
|
67501
67551
|
}
|
|
67502
67552
|
else if(command.indexOf('glycans cartoon') == 0) {
|
|
67503
67553
|
let value = command.substr(command.lastIndexOf(' ') + 1);
|
|
67554
|
+
|
|
67504
67555
|
if(value == 'yes') {
|
|
67505
67556
|
ic.bGlycansCartoon = true;
|
|
67506
67557
|
}
|
|
@@ -67963,21 +68014,21 @@ class DefinedSets {
|
|
|
67963
68014
|
|
|
67964
68015
|
setProtNuclLigInMenu() { let ic = this.icn3d; ic.icn3dui;
|
|
67965
68016
|
// Initially, add proteins, nucleotides, chemicals, ions, water into the menu "custom selections"
|
|
67966
|
-
if(Object.keys(ic.proteins).length > 0) {
|
|
68017
|
+
if(ic.proteins && Object.keys(ic.proteins).length > 0) {
|
|
67967
68018
|
//ic.defNames2Atoms['proteins'] = Object.keys(ic.proteins);
|
|
67968
68019
|
ic.defNames2Residues['proteins'] = Object.keys(ic.firstAtomObjCls.getResiduesFromAtoms(ic.proteins));
|
|
67969
68020
|
ic.defNames2Descr['proteins'] = 'proteins';
|
|
67970
68021
|
ic.defNames2Command['proteins'] = 'select :proteins';
|
|
67971
68022
|
}
|
|
67972
68023
|
|
|
67973
|
-
if(Object.keys(ic.nucleotides).length > 0) {
|
|
68024
|
+
if(ic.nucleotides && Object.keys(ic.nucleotides).length > 0) {
|
|
67974
68025
|
//ic.defNames2Atoms['nucleotides'] = Object.keys(ic.nucleotides);
|
|
67975
68026
|
ic.defNames2Residues['nucleotides'] = Object.keys(ic.firstAtomObjCls.getResiduesFromAtoms(ic.nucleotides));
|
|
67976
68027
|
ic.defNames2Descr['nucleotides'] = 'nucleotides';
|
|
67977
68028
|
ic.defNames2Command['nucleotides'] = 'select :nucleotides';
|
|
67978
68029
|
}
|
|
67979
68030
|
|
|
67980
|
-
if(Object.keys(ic.chemicals).length > 0) {
|
|
68031
|
+
if(ic.chemicals && Object.keys(ic.chemicals).length > 0) {
|
|
67981
68032
|
//ic.defNames2Atoms['chemicals'] = Object.keys(ic.chemicals);
|
|
67982
68033
|
if(ic.bOpm) {
|
|
67983
68034
|
let chemicalResHash = {}, memResHash = {};
|
|
@@ -68011,14 +68062,14 @@ class DefinedSets {
|
|
|
68011
68062
|
}
|
|
68012
68063
|
}
|
|
68013
68064
|
|
|
68014
|
-
if(Object.keys(ic.ions).length > 0) {
|
|
68065
|
+
if(ic.ions && Object.keys(ic.ions).length > 0) {
|
|
68015
68066
|
//ic.defNames2Atoms['ions'] = Object.keys(ic.ions);
|
|
68016
68067
|
ic.defNames2Residues['ions'] = Object.keys(ic.firstAtomObjCls.getResiduesFromAtoms(ic.ions));
|
|
68017
68068
|
ic.defNames2Descr['ions'] = 'ions';
|
|
68018
68069
|
ic.defNames2Command['ions'] = 'select :ions';
|
|
68019
68070
|
}
|
|
68020
68071
|
|
|
68021
|
-
if(Object.keys(ic.water).length > 0) {
|
|
68072
|
+
if(ic.water && Object.keys(ic.water).length > 0) {
|
|
68022
68073
|
//ic.defNames2Atoms['water'] = Object.keys(ic.water);
|
|
68023
68074
|
ic.defNames2Residues['water'] = Object.keys(ic.firstAtomObjCls.getResiduesFromAtoms(ic.water));
|
|
68024
68075
|
ic.defNames2Descr['water'] = 'water';
|
|
@@ -68149,7 +68200,7 @@ class DefinedSets {
|
|
|
68149
68200
|
}
|
|
68150
68201
|
|
|
68151
68202
|
// select whole structure
|
|
68152
|
-
if(Object.keys(ic.structures) == 1) {
|
|
68203
|
+
if(ic.structures && Object.keys(ic.structures) == 1) {
|
|
68153
68204
|
let structure = Object.keys(ic.structures)[0];
|
|
68154
68205
|
|
|
68155
68206
|
ic.defNames2Residues[structure] = Object.keys(ic.residues);
|
|
@@ -68157,7 +68208,7 @@ class DefinedSets {
|
|
|
68157
68208
|
|
|
68158
68209
|
ic.defNames2Command[structure] = 'select $' + structure;
|
|
68159
68210
|
}
|
|
68160
|
-
else {
|
|
68211
|
+
else if(ic.residues) {
|
|
68161
68212
|
let resArray = Object.keys(ic.residues);
|
|
68162
68213
|
let structResHash = {};
|
|
68163
68214
|
for(let i = 0, il = resArray.length; i < il; ++i) {
|
|
@@ -69236,7 +69287,7 @@ class LoadScript {
|
|
|
69236
69287
|
|
|
69237
69288
|
let chainid = paraArray[1].substr(8);
|
|
69238
69289
|
let geneid = paraArray[2].substr(7);
|
|
69239
|
-
let startpos = paraArray[3].substr(9);
|
|
69290
|
+
let startpos = parseInt(paraArray[3].substr(9));
|
|
69240
69291
|
let type = paraArray[4].substr(5);
|
|
69241
69292
|
|
|
69242
69293
|
if($("#" + ic.pre + "anno_custom")[0]) {
|
|
@@ -76555,6 +76606,12 @@ class Diagram2d {
|
|
|
76555
76606
|
thisClass.clickInteraction(this);
|
|
76556
76607
|
});
|
|
76557
76608
|
|
|
76609
|
+
$(document).on("click", "#" + ic.pre + "dl_ligplot .icn3d-interaction", function(e) { thisClass.icn3d;
|
|
76610
|
+
e.stopImmediatePropagation();
|
|
76611
|
+
|
|
76612
|
+
thisClass.clickInteraction(this);
|
|
76613
|
+
});
|
|
76614
|
+
|
|
76558
76615
|
$(document).on("click", "#" + ic.pre + "dl_alignerrormap .icn3d-node", function(e) { thisClass.icn3d;
|
|
76559
76616
|
e.stopImmediatePropagation();
|
|
76560
76617
|
|
|
@@ -77803,7 +77860,7 @@ class Ligplot {
|
|
|
77803
77860
|
}
|
|
77804
77861
|
|
|
77805
77862
|
|
|
77806
|
-
getSvgPerPair(serialArray1, resid1, resid2, interactionType, index2xy, xlen, ylen, xcenter, ycenter, bNotDrawNode, prevX2, prevY2) { let ic = this.icn3d, me = ic.icn3dui;
|
|
77863
|
+
getSvgPerPair(serialArray1, resid1, resid2, interactionType, index2xy, xlen, ylen, xcenter, ycenter, dist, bNotDrawNode, prevX2, prevY2) { let ic = this.icn3d, me = ic.icn3dui;
|
|
77807
77864
|
let xOffset = 1, yOffset = -1;
|
|
77808
77865
|
let bondLen = (interactionType == 'hbond' || interactionType == 'contact' || interactionType == 'halogen') ? ic.len4ang : ic.len4ang * 1.5; // real distance should be bout 120, not 80
|
|
77809
77866
|
let shortBondLen = ic.len4ang / 2;
|
|
@@ -77915,6 +77972,26 @@ class Ligplot {
|
|
|
77915
77972
|
// sometimes the same ligand atom is used in both Hbond and contact. THus we add "interactionType"
|
|
77916
77973
|
let idpair = resid2Real + '--' + serialArray1.join('-') + interactionType;
|
|
77917
77974
|
|
|
77975
|
+
let interactionTypeStr;
|
|
77976
|
+
if(interactionType == 'hbond') {
|
|
77977
|
+
interactionTypeStr = 'H-Bonds';
|
|
77978
|
+
}
|
|
77979
|
+
else if(interactionType == 'ionic') {
|
|
77980
|
+
interactionTypeStr = 'Salt Bridge/Ionic';
|
|
77981
|
+
}
|
|
77982
|
+
else if(interactionType == 'halogen') {
|
|
77983
|
+
interactionTypeStr = 'Halogen Bonds';
|
|
77984
|
+
}
|
|
77985
|
+
else if(interactionType == 'pi-cation') {
|
|
77986
|
+
interactionTypeStr = 'π-Cation';
|
|
77987
|
+
}
|
|
77988
|
+
else if(interactionType == 'pi-stacking') {
|
|
77989
|
+
interactionTypeStr = 'π-Stacking';
|
|
77990
|
+
}
|
|
77991
|
+
else if(interactionType == 'contact') {
|
|
77992
|
+
interactionTypeStr = 'Contacts';
|
|
77993
|
+
}
|
|
77994
|
+
|
|
77918
77995
|
let id = resid2Real;
|
|
77919
77996
|
if(bNotDrawNode || ic.resid2ToXy.hasOwnProperty(id)) {
|
|
77920
77997
|
x2 = (ic.resid2ToXy.hasOwnProperty(id)) ? ic.resid2ToXy[id].x2 : prevX2;
|
|
@@ -77931,11 +78008,12 @@ class Ligplot {
|
|
|
77931
78008
|
}
|
|
77932
78009
|
}
|
|
77933
78010
|
|
|
77934
|
-
line +=
|
|
78011
|
+
line +='<g><title>Interaction type: ' + interactionTypeStr + '; Distance: ' + parseFloat(dist).toFixed(1) + ' Å</title>';
|
|
78012
|
+
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';
|
|
78013
|
+
line += '</g>\n';
|
|
77935
78014
|
}
|
|
77936
78015
|
else {
|
|
77937
|
-
node +='<g>';
|
|
77938
|
-
node += '<title>' + resName2 + '</title>';
|
|
78016
|
+
node +='<g><title>' + resName2 + '</title>';
|
|
77939
78017
|
// 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
78018
|
let boxWidth = 28, boxHeight = 14;
|
|
77941
78019
|
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 +78021,9 @@ class Ligplot {
|
|
|
77943
78021
|
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
78022
|
node += '</g>\n';
|
|
77945
78023
|
|
|
77946
|
-
line +=
|
|
78024
|
+
line +='<g><title>Interaction type: ' + interactionTypeStr + '; Distance: ' + parseFloat(dist).toFixed(1) + ' Å</title>';
|
|
78025
|
+
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"/>';
|
|
78026
|
+
line += '</g>\n';
|
|
77947
78027
|
|
|
77948
78028
|
if(interactionType != 'contact') {
|
|
77949
78029
|
if(!ic.resid2ToXy.hasOwnProperty(resid2Real)) ic.resid2ToXy[resid2Real] = {x2: x2, y2: y2};
|
|
@@ -77963,26 +78043,29 @@ class Ligplot {
|
|
|
77963
78043
|
start: function( e, ui ) {
|
|
77964
78044
|
let oriX= parseFloat(e.target.getAttribute('x'));
|
|
77965
78045
|
let oriY = parseFloat(e.target.getAttribute('y'));
|
|
77966
|
-
|
|
77967
78046
|
e.target.setAttribute('x', oriX);
|
|
77968
78047
|
e.target.setAttribute('y', oriY);
|
|
77969
78048
|
},
|
|
77970
78049
|
drag: function( e, ui ) {
|
|
77971
|
-
let
|
|
77972
|
-
|
|
78050
|
+
let ligplotScale = (ic.ligplotScale) ? ic.ligplotScale : 1;
|
|
78051
|
+
|
|
78052
|
+
let offsetX = $("#" + me.ligplotid).offset().left + ic.len4ang * ligplotScale; // ic.len4ang was defined in svg viewbox
|
|
78053
|
+
let offsetY = $("#" + me.ligplotid).offset().top + ic.len4ang * ligplotScale;
|
|
77973
78054
|
|
|
77974
78055
|
let id = e.target.getAttribute('resid');
|
|
77975
|
-
let x = (e.clientX - offsetX);
|
|
77976
|
-
let y = (e.clientY - offsetY);
|
|
78056
|
+
let x = (e.clientX - offsetX) / ligplotScale;
|
|
78057
|
+
let y = (e.clientY - offsetY) / ligplotScale;
|
|
77977
78058
|
|
|
77978
78059
|
let oriX = parseFloat(e.target.getAttribute('x'));
|
|
77979
78060
|
let oriY = parseFloat(e.target.getAttribute('y'));
|
|
77980
78061
|
|
|
77981
78062
|
// change for each step
|
|
77982
|
-
let dx = (x - oriX) / ic.resizeRatioX;
|
|
77983
|
-
let dy = (y - oriY) / ic.resizeRatioY;
|
|
78063
|
+
// let dx = (x - oriX) / ic.resizeRatioX;
|
|
78064
|
+
// let dy = (y - oriY) / ic.resizeRatioY;
|
|
78065
|
+
let dx = (x - oriX);
|
|
78066
|
+
let dy = (y - oriY);
|
|
77984
78067
|
|
|
77985
|
-
// move the
|
|
78068
|
+
// move the node
|
|
77986
78069
|
oriX = parseFloat($("#" + id + "_node").attr('x'));
|
|
77987
78070
|
oriY = parseFloat($("#" + id + "_node").attr('y'));
|
|
77988
78071
|
|