icn3d 3.21.2 → 3.21.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 +109 -74
- package/icn3d.min.js +2 -2
- package/icn3d.module.js +109 -74
- package/package.json +1 -1
package/icn3d.js
CHANGED
|
@@ -7778,7 +7778,7 @@ class ClickMenu {
|
|
|
7778
7778
|
type: 'POST',
|
|
7779
7779
|
data: {
|
|
7780
7780
|
q : pdbstr,
|
|
7781
|
-
database: ["afdb50", "afdb-swissprot", "gmgcl_id", "pdb100"],
|
|
7781
|
+
database: ["afdb50", "afdb-swissprot", "gmgcl_id", "pdb100", "afdb-proteome", "mgnify_esm30"],
|
|
7782
7782
|
mode: "3diaa"
|
|
7783
7783
|
},
|
|
7784
7784
|
dataType: 'text',
|
|
@@ -9330,6 +9330,10 @@ class SetMenu {
|
|
|
9330
9330
|
html += this.getRadio('mn4_clr', 'mn4_clrIdentity', 'Identity', undefined, undefined, 2);
|
|
9331
9331
|
html += this.getRadio('mn4_clr', 'mn4_clrConserved', 'Conservation', true, undefined, 2);
|
|
9332
9332
|
}
|
|
9333
|
+
else {
|
|
9334
|
+
html += this.getRadio('mn4_clr', 'mn4_clrIdentity', 'Identity', undefined, undefined, 2);
|
|
9335
|
+
html += this.getRadio('mn4_clr', 'mn4_clrConserved', 'Conservation', undefined, undefined, 2);
|
|
9336
|
+
}
|
|
9333
9337
|
|
|
9334
9338
|
//if(me.cfg.afid) html += this.getRadio('mn4_clr', 'mn4_clrConfidence', 'AF Confidence');
|
|
9335
9339
|
//if(!me.cfg.mmtfid && !me.cfg.pdbid && !me.cfg.opmid && !me.cfg.mmdbid && !me.cfg.gi && !me.cfg.uniprotid && !me.cfg.blast_rep_id && !me.cfg.cid && !me.cfg.mmcifid && !me.cfg.align && !me.cfg.chainalign) {
|
|
@@ -9404,6 +9408,15 @@ class SetMenu {
|
|
|
9404
9408
|
|
|
9405
9409
|
html += this.getLink('mn6_hbondsYes', 'Interactions', 1, 1);
|
|
9406
9410
|
|
|
9411
|
+
html += this.getMenuText('mn1_window', 'Bring to Front', undefined, undefined, 1);
|
|
9412
|
+
html += "<ul>";
|
|
9413
|
+
html += this.getLink('mn1_window_table', 'Interaction Table', undefined, 2);
|
|
9414
|
+
html += this.getLink('mn1_window_linegraph', '2D Interaction Network', undefined, 2);
|
|
9415
|
+
html += this.getLink('mn1_window_scatterplot', '2D Interaction Map', undefined, 2);
|
|
9416
|
+
html += this.getLink('mn1_window_graph', '2D Graph(Force-Directed)', undefined, 2);
|
|
9417
|
+
html += "</ul>";
|
|
9418
|
+
html += "</li>";
|
|
9419
|
+
|
|
9407
9420
|
html += this.getLink('mn6_contactmap', 'Contact Map', undefined, 1);
|
|
9408
9421
|
|
|
9409
9422
|
if(!me.cfg.notebook) {
|
|
@@ -10514,10 +10527,11 @@ class SetDialog {
|
|
|
10514
10527
|
|
|
10515
10528
|
html += me.htmlCls.divStr + "dl_customref' class='" + dialogClass + "'>";
|
|
10516
10529
|
html += '<div style="width:550px;">You can define your own reference numbers in a custom file using Excel, and then export it as a CSV file. An example file is shown below with cells separated by commas.<br>';
|
|
10517
|
-
html += '<pre>refnum,11,12,,21,22<br>';
|
|
10518
|
-
html += '1TUP_A,100,101,,,132
|
|
10519
|
-
html += '1TUP_B,110,111,,141,142
|
|
10520
|
-
html += '
|
|
10530
|
+
html += '<pre>refnum,11,12,,21,22,,10C,11C,20C<br>';
|
|
10531
|
+
html += '1TUP_A,100,101,,,132,,,,<br>';
|
|
10532
|
+
html += '1TUP_B,110,111,,141,142,,,,</pre>';
|
|
10533
|
+
html += '1TUP_C,,,,,,,200,201,230</pre>';
|
|
10534
|
+
html += 'The first row defines the reference residue numbers, which could be any strings. The 1st cell could be anything. The rest cells are reference residue numbers (e.g., 11, 21, 10C, etc.) or empty cells. Each chain has a separate row. The first cell of the second row is the chain ID "1TUP_A". The rest cells are the corresponding real residue numbers for reference residue numbers in the first row. For example, the reference numbers for residues 100, 101, and 132 in the chain 1TUP_A are 11, 12, and 22, respectively. The fourth row shows another set of reference numners for the chain "1TUP_C". It could be a chain from a different structure.<br><br>';
|
|
10521
10535
|
html += 'To select all residues corresponding to the reference numbers, you can simplay replace ":" with "%" in the <a href="https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d.html#selectb" target="_blank">Specification</a>. For example, "%12" selects the residue 101 in 1TUP_A and the residue 111 in 1TUP_B. ".A%12" has the chain "A" filter and selects the residue 101 in 1TUP_A.<br>';
|
|
10522
10536
|
html += '</div><br>';
|
|
10523
10537
|
html += "Custom File: " + me.htmlCls.inputFileStr + "id='" + me.pre + "cstreffile' size=8> <br><br>";
|
|
@@ -15002,7 +15016,7 @@ class SetHtml {
|
|
|
15002
15016
|
else if(pos != -1) {
|
|
15003
15017
|
let url = imageStr.substr(pos + matchedStr.length);
|
|
15004
15018
|
me.htmlCls.clickMenuCls.setLogCmd('load iCn3D PNG image ' + $("#" + me.pre + "pngimage").val(), false);
|
|
15005
|
-
window.open(url);
|
|
15019
|
+
window.open(url, '_self');
|
|
15006
15020
|
}
|
|
15007
15021
|
else if(posState != -1) {
|
|
15008
15022
|
let matchedStrData = "Start of data file======\n";
|
|
@@ -33055,7 +33069,7 @@ class SetColor {
|
|
|
33055
33069
|
let b = atom.b;
|
|
33056
33070
|
|
|
33057
33071
|
// PDB
|
|
33058
|
-
b = (atom.structure.length < 6) ? 100 - b : b;
|
|
33072
|
+
b = (atom.structure.substr(0, 4) != ic.defaultPdbId && atom.structure.length < 6) ? 100 - b : b;
|
|
33059
33073
|
|
|
33060
33074
|
if(b >= 90) {
|
|
33061
33075
|
atom.color = me.parasCls.thr().setRGB(0, 0.325, 0.839);
|
|
@@ -33093,7 +33107,7 @@ class SetColor {
|
|
|
33093
33107
|
if(b > 100) b = 100;
|
|
33094
33108
|
|
|
33095
33109
|
// AlphaFold
|
|
33096
|
-
b = (atom.structure.length > 5) ? 100 - b : b;
|
|
33110
|
+
b = (atom.structure.substr(0, 4) != ic.defaultPdbId && atom.structure.length > 5) ? 100 - b : b;
|
|
33097
33111
|
|
|
33098
33112
|
let s1 = (ic.middB - b) * ic.spanBinv1;
|
|
33099
33113
|
let s2 = (b - ic.middB) * ic.spanBinv2;
|
|
@@ -39925,7 +39939,7 @@ class ShowSeq {
|
|
|
39925
39939
|
|
|
39926
39940
|
//if(ic.resid2refnum.hasOwnProperty(residueid)) {
|
|
39927
39941
|
let refnumLabel = ic.resid2refnum[residueid];
|
|
39928
|
-
if(refnumLabel) {
|
|
39942
|
+
if(refnumLabel) {
|
|
39929
39943
|
let refnumStr_ori = refnumLabel.replace(/'/g, '').substr(1);
|
|
39930
39944
|
let refnumStr;
|
|
39931
39945
|
if(bCustom) {
|
|
@@ -43991,7 +44005,7 @@ class ContactMap {
|
|
|
43991
44005
|
|
|
43992
44006
|
let graphStr = '{\n';
|
|
43993
44007
|
|
|
43994
|
-
let struc1 = (ic.structures.length > 0) ? ic.structures[0] :
|
|
44008
|
+
let struc1 = (ic.structures.length > 0) ? ic.structures[0] : ic.defaultPdbId;
|
|
43995
44009
|
let len1 = nodeArray1.length,
|
|
43996
44010
|
len2 = nodeArray2.length;
|
|
43997
44011
|
let factor = 1;
|
|
@@ -44876,7 +44890,7 @@ class ChainalignParser {
|
|
|
44876
44890
|
let chainid = chainidArray[i];
|
|
44877
44891
|
let pos = chainid.indexOf('_');
|
|
44878
44892
|
let struct = chainid.substr(0, pos);
|
|
44879
|
-
if(struct !=
|
|
44893
|
+
if(struct != ic.defaultPdbId) struct = struct.toUpperCase();
|
|
44880
44894
|
|
|
44881
44895
|
if(!struct2cnt.hasOwnProperty(struct)) {
|
|
44882
44896
|
struct2cnt[struct] = 1;
|
|
@@ -45673,11 +45687,11 @@ class MmcifParser {
|
|
|
45673
45687
|
|
|
45674
45688
|
//ic.bCid = undefined;
|
|
45675
45689
|
|
|
45676
|
-
let data1 = await me.getAjaxPromise(url, 'text', false,
|
|
45690
|
+
let data1 = await me.getAjaxPromise(url, 'text', false, "The structure " + mmcifid + " was not found...");
|
|
45677
45691
|
|
|
45678
45692
|
url = me.htmlCls.baseUrl + "mmcifparser/mmcifparser.cgi";
|
|
45679
45693
|
let dataObj = {'mmcifheader': data1};
|
|
45680
|
-
let data = await me.getAjaxPostPromise(url, dataObj, false,
|
|
45694
|
+
let data = await me.getAjaxPostPromise(url, dataObj, false, "The mmCIF data of " + mmcifid + " can not be parsed...");
|
|
45681
45695
|
|
|
45682
45696
|
if(data.emd !== undefined) ic.emd = data.emd;
|
|
45683
45697
|
if(data.organism !== undefined) ic.organism = data.organism;
|
|
@@ -45737,7 +45751,7 @@ class MmcifParser {
|
|
|
45737
45751
|
//loadAtomDataIn. The deferred parameter was resolved after the parsing so that other javascript code can be executed.
|
|
45738
45752
|
async loadMmcifData(data, mmcifid) { let ic = this.icn3d; ic.icn3dui;
|
|
45739
45753
|
if(!mmcifid) mmcifid = data.mmcif;
|
|
45740
|
-
if(!mmcifid) mmcifid =
|
|
45754
|
+
if(!mmcifid) mmcifid = ic.defaultPdbId;
|
|
45741
45755
|
|
|
45742
45756
|
if(data.atoms !== undefined) {
|
|
45743
45757
|
ic.init();
|
|
@@ -46834,7 +46848,7 @@ class OpmParser {
|
|
|
46834
46848
|
|
|
46835
46849
|
async loadOpmData(data, pdbid, bFull, type, pdbid2) { let ic = this.icn3d, me = ic.icn3dui;
|
|
46836
46850
|
try {
|
|
46837
|
-
if(!pdbid) pdbid =
|
|
46851
|
+
if(!pdbid) pdbid = ic.defaultPdbId;
|
|
46838
46852
|
let url = me.htmlCls.baseUrl + "mmdb/mmdb_strview.cgi?v=2&program=icn3d&opm&uid=" + pdbid.toLowerCase();
|
|
46839
46853
|
|
|
46840
46854
|
let opmdata = await me.getAjaxPromise(url, 'jsonp', false);
|
|
@@ -47039,20 +47053,22 @@ class PdbParser {
|
|
|
47039
47053
|
if(me.cfg.opmid === undefined) ic.ParserUtilsCls.transformToOpmOri(pdbid);
|
|
47040
47054
|
|
|
47041
47055
|
if(ic.biomtMatrices !== undefined && ic.biomtMatrices.length > 1) {
|
|
47042
|
-
$("#" + ic.pre + "assemblyWrapper").show();
|
|
47056
|
+
if(!me.bNode) $("#" + ic.pre + "assemblyWrapper").show();
|
|
47043
47057
|
|
|
47044
47058
|
ic.asuCnt = ic.biomtMatrices.length;
|
|
47045
47059
|
}
|
|
47046
47060
|
|
|
47047
|
-
if(
|
|
47048
|
-
|
|
47049
|
-
|
|
47050
|
-
|
|
47051
|
-
|
|
47052
|
-
|
|
47053
|
-
|
|
47054
|
-
|
|
47055
|
-
|
|
47061
|
+
if(!me.bNode) {
|
|
47062
|
+
if(ic.emd !== undefined) {
|
|
47063
|
+
$("#" + ic.pre + "mapWrapper1").hide();
|
|
47064
|
+
$("#" + ic.pre + "mapWrapper2").hide();
|
|
47065
|
+
$("#" + ic.pre + "mapWrapper3").hide();
|
|
47066
|
+
}
|
|
47067
|
+
else {
|
|
47068
|
+
$("#" + ic.pre + "emmapWrapper1").hide();
|
|
47069
|
+
$("#" + ic.pre + "emmapWrapper2").hide();
|
|
47070
|
+
$("#" + ic.pre + "emmapWrapper3").hide();
|
|
47071
|
+
}
|
|
47056
47072
|
}
|
|
47057
47073
|
|
|
47058
47074
|
// calculate secondary structures if not available
|
|
@@ -47073,7 +47089,7 @@ class PdbParser {
|
|
|
47073
47089
|
else {
|
|
47074
47090
|
await this.loadPdbDataRender(bAppend);
|
|
47075
47091
|
|
|
47076
|
-
await ic.ParserUtilsCls.checkMemProteinAndRotate();
|
|
47092
|
+
if(!me.bNode) await ic.ParserUtilsCls.checkMemProteinAndRotate();
|
|
47077
47093
|
|
|
47078
47094
|
/// if(ic.deferredOpm !== undefined) ic.deferredOpm.resolve();
|
|
47079
47095
|
}
|
|
@@ -49721,7 +49737,7 @@ class ParserUtils {
|
|
|
49721
49737
|
|
|
49722
49738
|
//var dxymax = npoint / 2.0 * step;
|
|
49723
49739
|
|
|
49724
|
-
pdbid =(pdbid) ? pdbid.toUpperCase() :
|
|
49740
|
+
pdbid =(pdbid) ? pdbid.toUpperCase() : ic.defaultPdbId;
|
|
49725
49741
|
|
|
49726
49742
|
ic.structures[pdbid].push(pdbid + '_MEM');
|
|
49727
49743
|
ic.chains[pdbid + '_MEM'] = {};
|
|
@@ -49963,7 +49979,7 @@ class ParserUtils {
|
|
|
49963
49979
|
let afMemdata = await me.getAjaxPromise(url2, 'text');
|
|
49964
49980
|
|
|
49965
49981
|
ic.bAfMem = true;
|
|
49966
|
-
$("#" + me.pre + "togglememli").show(); // show the menu "View > Toggle Membrane"
|
|
49982
|
+
if(!me.bNode) $("#" + me.pre + "togglememli").show(); // show the menu "View > Toggle Membrane"
|
|
49967
49983
|
|
|
49968
49984
|
// append the PDB
|
|
49969
49985
|
let pdbid = data.pdbid.substr(0, data.pdbid.indexOf('_'));
|
|
@@ -52144,7 +52160,7 @@ class LoadPDB {
|
|
|
52144
52160
|
|
|
52145
52161
|
//let chainMissingResidueArray = {}
|
|
52146
52162
|
|
|
52147
|
-
let id = (pdbid) ? pdbid :
|
|
52163
|
+
let id = (pdbid) ? pdbid : ic.defaultPdbId;
|
|
52148
52164
|
let structure = id;
|
|
52149
52165
|
|
|
52150
52166
|
let prevMissingChain = '';
|
|
@@ -52164,18 +52180,18 @@ class LoadPDB {
|
|
|
52164
52180
|
|
|
52165
52181
|
if(id == '') {
|
|
52166
52182
|
if(bAppend) {
|
|
52167
|
-
id =
|
|
52183
|
+
id = ic.defaultPdbId;
|
|
52168
52184
|
}
|
|
52169
52185
|
else {
|
|
52170
|
-
//if(!ic.inputid) ic.inputid =
|
|
52171
|
-
id = (ic.inputid && ic.inputid.indexOf('/') == -1) ? ic.inputid.substr(0, 10) :
|
|
52186
|
+
//if(!ic.inputid) ic.inputid = ic.defaultPdbId;
|
|
52187
|
+
id = (ic.inputid && ic.inputid.indexOf('/') == -1) ? ic.inputid.substr(0, 10) : ic.defaultPdbId; //ic.filename.substr(0, 4);
|
|
52172
52188
|
}
|
|
52173
52189
|
}
|
|
52174
52190
|
|
|
52175
52191
|
structure = id;
|
|
52176
52192
|
|
|
52177
|
-
if(id ==
|
|
52178
|
-
//if(id ==
|
|
52193
|
+
if(id == ic.defaultPdbId || bMutation) { // bMutation: side chain prediction
|
|
52194
|
+
//if(id == ic.defaultPdbId) {
|
|
52179
52195
|
structure = (moleculeNum === 1) ? id : id + moleculeNum.toString();
|
|
52180
52196
|
}
|
|
52181
52197
|
|
|
@@ -52290,12 +52306,12 @@ class LoadPDB {
|
|
|
52290
52306
|
ic.organism = ic.organism.substr(0, ic.organism.length - 1);
|
|
52291
52307
|
} else if (record === 'ENDMDL') {
|
|
52292
52308
|
++moleculeNum;
|
|
52293
|
-
id =
|
|
52309
|
+
id = ic.defaultPdbId;
|
|
52294
52310
|
|
|
52295
52311
|
structure = id;
|
|
52296
52312
|
|
|
52297
|
-
if(id ==
|
|
52298
|
-
//if(id ==
|
|
52313
|
+
if(id == ic.defaultPdbId || bMutation) { // bMutation: side chain prediction
|
|
52314
|
+
//if(id == ic.defaultPdbId) {
|
|
52299
52315
|
structure = (moleculeNum === 1) ? id : id + moleculeNum.toString();
|
|
52300
52316
|
}
|
|
52301
52317
|
|
|
@@ -52318,8 +52334,8 @@ class LoadPDB {
|
|
|
52318
52334
|
} else if (record === 'ATOM ' || record === 'HETATM') {
|
|
52319
52335
|
structure = id;
|
|
52320
52336
|
|
|
52321
|
-
if(id ==
|
|
52322
|
-
//if(id ==
|
|
52337
|
+
if(id == ic.defaultPdbId || bMutation) { // bMutation: side chain prediction
|
|
52338
|
+
//if(id == ic.defaultPdbId) {
|
|
52323
52339
|
structure = (moleculeNum === 1) ? id : id + moleculeNum.toString();
|
|
52324
52340
|
}
|
|
52325
52341
|
|
|
@@ -54964,21 +54980,23 @@ class ApplyCommand {
|
|
|
54964
54980
|
else if(command.indexOf('window') == 0) {
|
|
54965
54981
|
let secondPart = command.substr(command.indexOf(' ') + 1);
|
|
54966
54982
|
|
|
54967
|
-
|
|
54983
|
+
setTimeout(function(){
|
|
54984
|
+
if(secondPart == "aligned sequences") {
|
|
54968
54985
|
me.htmlCls.dialogCls.openDlg('dl_alignment', 'Select residues in aligned sequences');
|
|
54969
|
-
|
|
54970
|
-
|
|
54971
|
-
|
|
54972
|
-
|
|
54973
|
-
|
|
54974
|
-
|
|
54975
|
-
|
|
54976
|
-
|
|
54977
|
-
|
|
54978
|
-
|
|
54979
|
-
|
|
54980
|
-
|
|
54981
|
-
|
|
54986
|
+
}
|
|
54987
|
+
else if(secondPart == "interaction table") {
|
|
54988
|
+
me.htmlCls.dialogCls.openDlg('dl_allinteraction', 'Show interactions');
|
|
54989
|
+
}
|
|
54990
|
+
else if(secondPart == "interaction graph") {
|
|
54991
|
+
me.htmlCls.dialogCls.openDlg('dl_linegraph', 'Show interactions between two lines of residue nodes');
|
|
54992
|
+
}
|
|
54993
|
+
else if(secondPart == "interaction scatterplot") {
|
|
54994
|
+
me.htmlCls.dialogCls.openDlg('dl_scatterplot', 'Show interactions as scatterplot');
|
|
54995
|
+
}
|
|
54996
|
+
else if(secondPart == "force-directed graph") {
|
|
54997
|
+
me.htmlCls.dialogCls.openDlg('dl_graph', 'Force-directed graph');
|
|
54998
|
+
}
|
|
54999
|
+
}, 1000);
|
|
54982
55000
|
}
|
|
54983
55001
|
else if(command.indexOf('set theme') == 0) {
|
|
54984
55002
|
let color = command.substr(command.lastIndexOf(' ') + 1);
|
|
@@ -59344,7 +59362,7 @@ class Dssp {
|
|
|
59344
59362
|
async showIgRefNum() { let ic = this.icn3d, me = ic.icn3dui;
|
|
59345
59363
|
let thisClass = this;
|
|
59346
59364
|
|
|
59347
|
-
if(Object.keys(ic.resid2refnum).length > 0) {
|
|
59365
|
+
if(ic.resid2refnum && Object.keys(ic.resid2refnum).length > 0) {
|
|
59348
59366
|
ic.bShowRefnum = true;
|
|
59349
59367
|
|
|
59350
59368
|
// open sequence view
|
|
@@ -59391,16 +59409,17 @@ class Dssp {
|
|
|
59391
59409
|
let ajaxArray = [];
|
|
59392
59410
|
let domainidpairArray = [];
|
|
59393
59411
|
|
|
59394
|
-
me.htmlCls.baseUrl + "tmalign/tmalign.cgi";
|
|
59412
|
+
let urltmalign = me.htmlCls.baseUrl + "tmalign/tmalign.cgi";
|
|
59395
59413
|
|
|
59396
59414
|
ic.resid2domainid = {};
|
|
59397
59415
|
|
|
59398
59416
|
for(let i = 0, il = struArray.length; i < il; ++i) {
|
|
59399
59417
|
let struct = struArray[i];
|
|
59400
59418
|
let chainidArray = ic.structures[struct];
|
|
59401
|
-
|
|
59419
|
+
|
|
59402
59420
|
for(let j = 0, jl = chainidArray.length; j < jl; ++j) {
|
|
59403
59421
|
let chainid = chainidArray[j];
|
|
59422
|
+
|
|
59404
59423
|
if(!ic.proteins.hasOwnProperty(ic.firstAtomObjCls.getFirstAtomObj(ic.chains[chainid]).serial)) continue;
|
|
59405
59424
|
if(ic.chainsSeq[chainid].length < 50) continue; // peptide
|
|
59406
59425
|
|
|
@@ -59435,20 +59454,19 @@ class Dssp {
|
|
|
59435
59454
|
domainAtomsArray.push(domainAtoms);
|
|
59436
59455
|
}
|
|
59437
59456
|
}
|
|
59438
|
-
|
|
59457
|
+
|
|
59439
59458
|
for(let k = 0, kl = domainAtomsArray.length; k < kl; ++k) {
|
|
59459
|
+
|
|
59440
59460
|
let pdb_target = ic.saveFileCls.getAtomPDB(domainAtomsArray[k], undefined, undefined, undefined, undefined, struct);
|
|
59441
59461
|
let domainid = chainid + '-' + k;
|
|
59442
59462
|
for(let index = 0, indexl = dataArray.length; index < indexl; ++index) {
|
|
59443
|
-
let struct2 =
|
|
59463
|
+
let struct2 = ic.defaultPdbId + index;
|
|
59444
59464
|
let pdb_query = dataArray[index].value; //[0];
|
|
59445
|
-
|
|
59446
59465
|
let header = 'HEADER ' + struct2 + '\n';
|
|
59447
59466
|
pdb_query = header + pdb_query;
|
|
59448
59467
|
|
|
59449
59468
|
let dataObj = {'pdb_query': pdb_query, 'pdb_target': pdb_target, "queryid": ic.refpdbArray[index]};
|
|
59450
|
-
let alignAjax = me.getAjaxPostPromise(
|
|
59451
|
-
|
|
59469
|
+
let alignAjax = me.getAjaxPostPromise(urltmalign, dataObj);
|
|
59452
59470
|
ajaxArray.push(alignAjax);
|
|
59453
59471
|
|
|
59454
59472
|
domainidpairArray.push(domainid + "," + index);
|
|
@@ -59459,18 +59477,19 @@ class Dssp {
|
|
|
59459
59477
|
|
|
59460
59478
|
let allPromise = Promise.allSettled(ajaxArray);
|
|
59461
59479
|
try {
|
|
59462
|
-
let
|
|
59463
|
-
|
|
59480
|
+
let dataArray2 = await allPromise;
|
|
59481
|
+
|
|
59482
|
+
await thisClass.parseAlignData(dataArray2, domainidpairArray);
|
|
59464
59483
|
|
|
59465
59484
|
/// if(ic.deferredRefnum !== undefined) ic.deferredRefnum.resolve();
|
|
59466
59485
|
}
|
|
59467
59486
|
catch(err) {
|
|
59468
|
-
console.log("Error in aligning with TM-align...");
|
|
59487
|
+
if(!me.bNode) console.log("Error in aligning with TM-align...");
|
|
59469
59488
|
return;
|
|
59470
59489
|
}
|
|
59471
59490
|
}
|
|
59472
59491
|
|
|
59473
|
-
async parseAlignData(dataArray, domainidpairArray) { let ic = this.icn3d
|
|
59492
|
+
async parseAlignData(dataArray, domainidpairArray) { let ic = this.icn3d, me = ic.icn3dui;
|
|
59474
59493
|
let thisClass = this;
|
|
59475
59494
|
|
|
59476
59495
|
let tmscoreThreshold = 0.4; //0.5;
|
|
@@ -59479,9 +59498,12 @@ class Dssp {
|
|
|
59479
59498
|
let domainid2score = {}, domainid2segs = {}, chainid2segs = {};
|
|
59480
59499
|
ic.chainid2index = {};
|
|
59481
59500
|
ic.domainid2ig2kabat = {};
|
|
59501
|
+
|
|
59482
59502
|
for(let i = 0, il = domainidpairArray.length; i < il; ++i) {
|
|
59483
59503
|
let queryData = dataArray[i].value; //[0];
|
|
59504
|
+
|
|
59484
59505
|
if(queryData.length == 0) continue;
|
|
59506
|
+
|
|
59485
59507
|
if(queryData[0].score < tmscoreThreshold || queryData[0].num_res < 50) continue;
|
|
59486
59508
|
|
|
59487
59509
|
let domainid_index = domainidpairArray[i].split(',');
|
|
@@ -59493,6 +59515,7 @@ class Dssp {
|
|
|
59493
59515
|
let bBstrand = false, bCstrand = false, bEstrand = false, bFstrand = false;
|
|
59494
59516
|
for(let i = 0, il = queryData[0].segs.length; i < il; ++i) {
|
|
59495
59517
|
let seg = queryData[0].segs[i];
|
|
59518
|
+
|
|
59496
59519
|
if(seg.q_start.indexOf('2050') != -1) {
|
|
59497
59520
|
bBstrand = true;
|
|
59498
59521
|
}
|
|
@@ -59512,12 +59535,13 @@ class Dssp {
|
|
|
59512
59535
|
//if(bBstrand && bCstrand && bEstrand && bFstrand && bGstrand) break;
|
|
59513
59536
|
if(bBstrand && bCstrand && bEstrand && bFstrand) break;
|
|
59514
59537
|
}
|
|
59538
|
+
|
|
59515
59539
|
//if(!(bBstrand && bCstrand && bEstrand && bFstrand && bGstrand)) continue;
|
|
59516
59540
|
if(!(bBstrand && bCstrand && bEstrand && bFstrand)) continue;
|
|
59517
59541
|
|
|
59518
59542
|
if(!domainid2score.hasOwnProperty(domainid) || queryData[0].score > domainid2score[domainid]) {
|
|
59519
59543
|
domainid2score[domainid] = queryData[0].score;
|
|
59520
|
-
console.log(domainid + ' TM-score: ' + domainid2score[domainid] + ' matched ' + ic.refpdbArray[domainid_index[1]]);
|
|
59544
|
+
if(!me.bNode) console.log(domainid + ' TM-score: ' + domainid2score[domainid] + ' matched ' + ic.refpdbArray[domainid_index[1]]);
|
|
59521
59545
|
ic.chainid2index[chainid] = domainid_index[1]; // could be several, just take the recent one for simplicity
|
|
59522
59546
|
domainid2segs[domainid] = queryData[0].segs;
|
|
59523
59547
|
ic.domainid2ig2kabat[domainid] = queryData[0].ig2kabat;
|
|
@@ -59537,7 +59561,7 @@ console.log(domainid + ' TM-score: ' + domainid2score[domainid] + ' matched ' +
|
|
|
59537
59561
|
if(!ic.chainsMapping) ic.chainsMapping = {};
|
|
59538
59562
|
for(let chainid in chainid2segs) {
|
|
59539
59563
|
let segArray = chainid2segs[chainid];
|
|
59540
|
-
console.log("One of the reference PDBs for chain chainid: " + ic.refpdbArray[ic.chainid2index[chainid]]);
|
|
59564
|
+
if(!me.bNode) console.log("One of the reference PDBs for chain chainid: " + ic.refpdbArray[ic.chainid2index[chainid]]);
|
|
59541
59565
|
|
|
59542
59566
|
for(let i = 0, il = segArray.length; i < il; ++i) {
|
|
59543
59567
|
let seg = segArray[i];
|
|
@@ -64189,13 +64213,23 @@ class SaveFile {
|
|
|
64189
64213
|
setStructureTitle(url, title, titlelinkColor) {var ic = this.icn3d, me = ic.icn3dui;
|
|
64190
64214
|
if(ic.molTitle.length > 40) title = ic.molTitle.substr(0, 40) + "...";
|
|
64191
64215
|
|
|
64192
|
-
|
|
64193
|
-
let asymmetricStr = "";
|
|
64216
|
+
let text = ic.inputid.toUpperCase();
|
|
64194
64217
|
|
|
64195
64218
|
let idName = (isNaN(ic.inputid) && ic.inputid.length > 5) ? "AlphaFold ID" : "PDB ID";
|
|
64219
|
+
if(ic.inputid.indexOf('http') != -1) {
|
|
64220
|
+
idName = "Data from";
|
|
64221
|
+
url = ic.inputid;
|
|
64222
|
+
text = ic.inputid;
|
|
64223
|
+
}
|
|
64224
|
+
|
|
64196
64225
|
if(me.cfg.refseqid) idName = 'NCBI Protein Acc.';
|
|
64197
64226
|
|
|
64198
|
-
|
|
64227
|
+
if(!ic.inputid || ic.inputid.substr(0, 4) == ic.defaultPdbId) {
|
|
64228
|
+
$("#" + ic.pre + "title").html(title);
|
|
64229
|
+
}
|
|
64230
|
+
else {
|
|
64231
|
+
$("#" + ic.pre + "title").html(idName + " <a id='" + ic.pre + "titlelink' href='" + url + "' style='color:" + titlelinkColor + "' target='_blank'>" + text + "</a>: " + title);
|
|
64232
|
+
}
|
|
64199
64233
|
}
|
|
64200
64234
|
|
|
64201
64235
|
getLinkToStructureSummary(bLog) {var ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -64281,7 +64315,7 @@ class ShareLink {
|
|
|
64281
64315
|
if(bPngHtml) url += "&random=" + parseInt(Math.random() * 1000); // generate a new shorten URL and thus image name everytime
|
|
64282
64316
|
//var inputid =(ic.inputid) ? ic.inputid : "custom";
|
|
64283
64317
|
let inputid = Object.keys(ic.structures).join('_');
|
|
64284
|
-
if(inputid ==
|
|
64318
|
+
if(inputid == ic.defaultPdbId) {
|
|
64285
64319
|
if(ic.filename) {
|
|
64286
64320
|
inputid = ic.filename;
|
|
64287
64321
|
}
|
|
@@ -66833,6 +66867,7 @@ class iCn3D {
|
|
|
66833
66867
|
this.transparentRenderOrder = false; // false: regular transparency; true: expensive renderOrder for each face
|
|
66834
66868
|
|
|
66835
66869
|
this.AFUniprotVersion = 'v4';
|
|
66870
|
+
this.defaultPdbId = 'stru';
|
|
66836
66871
|
|
|
66837
66872
|
if(!this.icn3dui.bNode) {
|
|
66838
66873
|
if ( bWebGL2 && bVR) {
|
|
@@ -67416,7 +67451,7 @@ class iCn3DUI {
|
|
|
67416
67451
|
//even when multiple iCn3D viewers are shown together.
|
|
67417
67452
|
this.pre = this.cfg.divid + "_";
|
|
67418
67453
|
|
|
67419
|
-
this.REVISION = '3.21.
|
|
67454
|
+
this.REVISION = '3.21.3';
|
|
67420
67455
|
|
|
67421
67456
|
// In nodejs, iCn3D defines "window = {navigator: {}}"
|
|
67422
67457
|
this.bNode = (Object.keys(window).length < 2) ? true : false;
|
|
@@ -67887,7 +67922,7 @@ iCn3DUI.prototype.getAjaxPromise = function(url, dataType, beforeSend, alertMess
|
|
|
67887
67922
|
if(beforeSend) me.icn3d.ParserUtilsCls.showLoading();
|
|
67888
67923
|
},
|
|
67889
67924
|
complete: function() {
|
|
67890
|
-
if(complete)
|
|
67925
|
+
if(complete) me.icn3d.ParserUtilsCls.hideLoading();
|
|
67891
67926
|
},
|
|
67892
67927
|
success: function(data) {
|
|
67893
67928
|
resolve(data);
|
|
@@ -67916,7 +67951,7 @@ iCn3DUI.prototype.getAjaxPostPromise = function(url, data, beforeSend, alertMess
|
|
|
67916
67951
|
if(beforeSend) me.icn3d.ParserUtilsCls.showLoading();
|
|
67917
67952
|
},
|
|
67918
67953
|
complete: function() {
|
|
67919
|
-
if(complete)
|
|
67954
|
+
if(complete) me.icn3d.ParserUtilsCls.hideLoading();
|
|
67920
67955
|
},
|
|
67921
67956
|
success: function(data) {
|
|
67922
67957
|
resolve(data);
|