icn3d 3.25.12 → 3.25.14
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 +302 -162
- package/icn3d.min.js +3 -3
- package/icn3d.module.js +302 -162
- package/package.json +1 -1
package/icn3d.module.js
CHANGED
|
@@ -7136,19 +7136,19 @@ class ClickMenu {
|
|
|
7136
7136
|
});
|
|
7137
7137
|
|
|
7138
7138
|
me.myEventCls.onIds("#" + me.pre + "mn1_link_bind", "click", function(e) { let ic = me.icn3d; e.preventDefault();
|
|
7139
|
-
url = "https://www.ncbi.nlm.nih.gov/pccompound?LinkName=pccompound_structure&from_uid=" + ic.inputid;
|
|
7139
|
+
let url = "https://www.ncbi.nlm.nih.gov/pccompound?LinkName=pccompound_structure&from_uid=" + ic.inputid;
|
|
7140
7140
|
thisClass.setLogCmd("link to 3D protein structures bound to CID " + ic.inputid + ": " + url, false);
|
|
7141
7141
|
let urlTarget = (ic.structures && Object.keys(ic.structures).length > 0) ? '_blank' : '_self';
|
|
7142
7142
|
window.open(url, urlTarget);
|
|
7143
7143
|
});
|
|
7144
7144
|
|
|
7145
7145
|
me.myEventCls.onIds("#" + me.pre + "mn1_link_vast", "click", function(e) { let ic = me.icn3d; e.preventDefault();
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
|
|
7146
|
+
let url;
|
|
7147
|
+
if(ic.inputid === undefined) {
|
|
7148
|
+
url = "https://www.ncbi.nlm.nih.gov/pccompound?term=" + ic.molTitle;
|
|
7149
|
+
thisClass.setLogCmd("link to compounds " + ic.molTitle + ": " + url, false);
|
|
7149
7150
|
}
|
|
7150
7151
|
else {
|
|
7151
|
-
let url;
|
|
7152
7152
|
if(me.cfg.cid !== undefined) {
|
|
7153
7153
|
url = "https://www.ncbi.nlm.nih.gov/pccompound?LinkName=pccompound_pccompound_3d&from_uid=" + ic.inputid;
|
|
7154
7154
|
thisClass.setLogCmd("link to compounds with structure similar to CID " + ic.inputid + ": " + url, false);
|
|
@@ -7172,8 +7172,8 @@ class ClickMenu {
|
|
|
7172
7172
|
});
|
|
7173
7173
|
|
|
7174
7174
|
me.myEventCls.onIds("#" + me.pre + "mn1_link_pubmed", "click", function(e) { let ic = me.icn3d; e.preventDefault();
|
|
7175
|
+
let url;
|
|
7175
7176
|
if(ic.inputid === undefined) {
|
|
7176
|
-
let url;
|
|
7177
7177
|
url = "https://www.ncbi.nlm.nih.gov/pubmed/?term=" + ic.molTitle;
|
|
7178
7178
|
thisClass.setLogCmd("link to literature about " + ic.molTitle + ": " + url, false);
|
|
7179
7179
|
let urlTarget = (ic.structures && Object.keys(ic.structures).length > 0) ? '_blank' : '_self';
|
|
@@ -7181,7 +7181,6 @@ class ClickMenu {
|
|
|
7181
7181
|
}
|
|
7182
7182
|
else if(ic.pmid) {
|
|
7183
7183
|
let idArray = ic.pmid.toString().split('_');
|
|
7184
|
-
let url;
|
|
7185
7184
|
if(idArray.length === 1) {
|
|
7186
7185
|
url = "https://www.ncbi.nlm.nih.gov/pubmed/" + ic.pmid;
|
|
7187
7186
|
thisClass.setLogCmd("link to PubMed ID " + ic.pmid + ": " + url, false);
|
|
@@ -7195,7 +7194,6 @@ class ClickMenu {
|
|
|
7195
7194
|
}
|
|
7196
7195
|
else if(isNaN(ic.inputid)) {
|
|
7197
7196
|
let idArray = ic.inputid.toString().split('_');
|
|
7198
|
-
let url;
|
|
7199
7197
|
if(idArray.length === 1) {
|
|
7200
7198
|
url = "https://www.ncbi.nlm.nih.gov/pubmed/?term=" + ic.inputid;
|
|
7201
7199
|
thisClass.setLogCmd("link to literature about PDB " + ic.inputid + ": " + url, false);
|
|
@@ -11909,11 +11907,11 @@ class SetDialog {
|
|
|
11909
11907
|
|
|
11910
11908
|
html += "<div>4. " + me.htmlCls.buttonStr + "applyhbonds'>3D Display Interactions</button></div><br>";
|
|
11911
11909
|
|
|
11912
|
-
html += "<div style='text-indent:1.1em'>" + me.htmlCls.buttonStr + "hbondWindow'>Highlight Interactions in Table</button><span style='margin-left:30px; font-wieght:bold'>Sort Interactions on</span>: " + me.htmlCls.buttonStr + "sortSet1'> Set 1</button>" + me.htmlCls.buttonStr + "sortSet2' style='margin-left:
|
|
11910
|
+
html += "<div style='text-indent:1.1em'>" + me.htmlCls.buttonStr + "hbondWindow'>Highlight Interactions in Table</button><span style='margin-left:30px; font-wieght:bold'>Sort Interactions on</span>: " + me.htmlCls.buttonStr + "sortSet1'> Set 1</button>" + me.htmlCls.buttonStr + "sortSet2' style='margin-left:12px'>Set 2</button></div><br>";
|
|
11913
11911
|
|
|
11914
|
-
html += "<div style='text-indent:1.1em'>" + me.htmlCls.buttonStr + "hbondLineGraph'>2D Interaction Network</button> to show
|
|
11912
|
+
html += "<div style='text-indent:1.1em'>" + me.htmlCls.buttonStr + "hbondLineGraph'>2D Interaction Network</button> " + me.htmlCls.buttonStr + "hbondLineGraph2' style='margin-left:12px'>2D Network with Reference Numbers</button> to show two lines of residue nodes</div><br>";
|
|
11915
11913
|
|
|
11916
|
-
html += "<div style='text-indent:1.1em'>" + me.htmlCls.buttonStr + "hbondScatterplot'>2D Interaction Map</button> to show
|
|
11914
|
+
html += "<div style='text-indent:1.1em'>" + me.htmlCls.buttonStr + "hbondScatterplot'>2D Interaction Map</button> " + me.htmlCls.buttonStr + "hbondScatterplot2' style='margin-left:12px'>2D Map with Reference Numbers</button> to show map</div><br>";
|
|
11917
11915
|
|
|
11918
11916
|
tmpStr = ': </td><td><input style="margin-left:-12px" type="text" id="';
|
|
11919
11917
|
|
|
@@ -14326,11 +14324,29 @@ class Events {
|
|
|
14326
14324
|
me.myEventCls.onIds("#" + me.pre + "hbondLineGraph", "click", async function(e) { let ic = me.icn3d;
|
|
14327
14325
|
e.preventDefault();
|
|
14328
14326
|
|
|
14327
|
+
ic.bShownRefnum = false;
|
|
14328
|
+
thisClass.setLogCmd("hide ref number", true);
|
|
14329
14329
|
await ic.showInterCls.showInteractions('linegraph');
|
|
14330
14330
|
});
|
|
14331
|
+
me.myEventCls.onIds("#" + me.pre + "hbondLineGraph2", "click", async function(e) { let ic = me.icn3d;
|
|
14332
|
+
e.preventDefault();
|
|
14333
|
+
|
|
14334
|
+
ic.bShownRefnum = true;
|
|
14335
|
+
thisClass.setLogCmd("show ref number", true);
|
|
14336
|
+
await ic.showInterCls.showInteractions('linegraph');
|
|
14337
|
+
});
|
|
14331
14338
|
me.myEventCls.onIds("#" + me.pre + "hbondScatterplot", "click", async function(e) { let ic = me.icn3d;
|
|
14339
|
+
e.preventDefault();
|
|
14340
|
+
|
|
14341
|
+
ic.bShownRefnum = false;
|
|
14342
|
+
thisClass.setLogCmd("hide ref number", true);
|
|
14343
|
+
await ic.showInterCls.showInteractions('scatterplot');
|
|
14344
|
+
});
|
|
14345
|
+
me.myEventCls.onIds("#" + me.pre + "hbondScatterplot2", "click", async function(e) { let ic = me.icn3d;
|
|
14332
14346
|
e.preventDefault();
|
|
14333
14347
|
|
|
14348
|
+
ic.bShownRefnum = true;
|
|
14349
|
+
thisClass.setLogCmd("show ref number", true);
|
|
14334
14350
|
await ic.showInterCls.showInteractions('scatterplot');
|
|
14335
14351
|
});
|
|
14336
14352
|
// select residues
|
|
@@ -33048,7 +33064,7 @@ class Alternate {
|
|
|
33048
33064
|
|
|
33049
33065
|
ic.dAtoms = {};
|
|
33050
33066
|
|
|
33051
|
-
let bMutation = moleculeArray.length == 2 && moleculeArray[1].replace(moleculeArray[0], '') == '2';
|
|
33067
|
+
let bMutation = ic.bScap; //moleculeArray.length == 2 && moleculeArray[1].replace(moleculeArray[0], '') == '2';
|
|
33052
33068
|
|
|
33053
33069
|
for(let i = 0, il = moleculeArray.length; i < il; ++i) {
|
|
33054
33070
|
let structure = moleculeArray[i];
|
|
@@ -36677,7 +36693,12 @@ class AnnoCddSite {
|
|
|
36677
36693
|
|| (Object.keys(ic.structures).length == 2 && me.cfg.align) ) {
|
|
36678
36694
|
let data = {};
|
|
36679
36695
|
try {
|
|
36680
|
-
|
|
36696
|
+
if(me.bNode) {
|
|
36697
|
+
data = await me.getAjaxPromise(url, 'jsonp');
|
|
36698
|
+
}
|
|
36699
|
+
else {
|
|
36700
|
+
data.value = await me.getAjaxPromise(url, 'jsonp');
|
|
36701
|
+
}
|
|
36681
36702
|
|
|
36682
36703
|
thisClass.parseCddData([data], chnidArray);
|
|
36683
36704
|
/// if(ic.deferredAnnoCddSite !== undefined) ic.deferredAnnoCddSite.resolve();
|
|
@@ -36735,7 +36756,9 @@ class AnnoCddSite {
|
|
|
36735
36756
|
|
|
36736
36757
|
for(let i = 0, il = dataArray.length; i < il; ++i) {
|
|
36737
36758
|
//let data = (bSeq) ? dataArray[i][0] : dataArray[i];
|
|
36738
|
-
let data = dataArray[i].value;
|
|
36759
|
+
let data = (me.bNode) ? dataArray[i] : dataArray[i].value;
|
|
36760
|
+
|
|
36761
|
+
if(!data) continue;
|
|
36739
36762
|
|
|
36740
36763
|
for(let chainI = 0, chainLen = data.data.length; chainI < chainLen; ++chainI) {
|
|
36741
36764
|
let cddData = data.data[chainI];
|
|
@@ -39477,49 +39500,48 @@ class Domain3d {
|
|
|
39477
39500
|
let residueArray = Object.keys(residueHash);
|
|
39478
39501
|
let chnid = residueArray[0].substr(0, residueArray[0].lastIndexOf('_'));
|
|
39479
39502
|
|
|
39503
|
+
if(!ic.posid2resid) ic.posid2resid = {};
|
|
39504
|
+
|
|
39480
39505
|
let substructItem = {};
|
|
39481
39506
|
let pos2resi = {};
|
|
39482
39507
|
for(let i = 0; i < residueArray.length; ++i) {
|
|
39483
39508
|
let resid = residueArray[i];
|
|
39484
39509
|
|
|
39485
39510
|
let resi = resid.substr(resid.lastIndexOf('_') + 1);
|
|
39486
|
-
/*
|
|
39487
|
-
if(i == 0) {
|
|
39488
|
-
resiOffset = resi - 1;
|
|
39489
|
-
|
|
39490
|
-
for(let j = 0; j < resiOffset; ++j) {
|
|
39491
|
-
x0.push(undefined);
|
|
39492
|
-
y0.push(undefined);
|
|
39493
|
-
z0.push(undefined);
|
|
39494
|
-
}
|
|
39495
|
-
}
|
|
39496
|
-
*/
|
|
39497
39511
|
|
|
39498
39512
|
//let resid = chnid + "_" + resi;
|
|
39499
39513
|
let atom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid]);
|
|
39500
39514
|
|
|
39501
|
-
if(!atom) continue;
|
|
39502
|
-
/*
|
|
39503
39515
|
if(atom) {
|
|
39504
39516
|
x0.push(atom.coord.x);
|
|
39505
39517
|
y0.push(atom.coord.y);
|
|
39506
39518
|
z0.push(atom.coord.z);
|
|
39507
39519
|
}
|
|
39508
39520
|
else {
|
|
39509
|
-
x0.push(
|
|
39510
|
-
y0.push(
|
|
39511
|
-
z0.push(
|
|
39521
|
+
// x0.push(dummyCoord);
|
|
39522
|
+
// y0.push(dummyCoord);
|
|
39523
|
+
// z0.push(dummyCoord);
|
|
39524
|
+
|
|
39525
|
+
continue;
|
|
39512
39526
|
}
|
|
39513
|
-
|
|
39514
|
-
//if(!atom)
|
|
39515
|
-
|
|
39516
|
-
|
|
39517
|
-
|
|
39518
|
-
|
|
39527
|
+
|
|
39528
|
+
// if(!atom) {
|
|
39529
|
+
// // continue;
|
|
39530
|
+
// }
|
|
39531
|
+
|
|
39532
|
+
// x0.push(atom.coord.x);
|
|
39533
|
+
// y0.push(atom.coord.y);
|
|
39534
|
+
// z0.push(atom.coord.z);
|
|
39535
|
+
|
|
39519
39536
|
//resiArray.push(resi);
|
|
39520
39537
|
resiArray.push(i+1);
|
|
39521
39538
|
pos2resi[i+1] = resi;
|
|
39522
39539
|
|
|
39540
|
+
ic.posid2resid[atom.structure + '_' + atom.chain + '_' + (i+1).toString()] = resid;
|
|
39541
|
+
// let residNCBI = ic.resid2ncbi[resid];
|
|
39542
|
+
// let pos = residNCBI.substr(residNCBI.lastIndexOf('_') + 1);
|
|
39543
|
+
// pos2resi[pos] = resi;
|
|
39544
|
+
|
|
39523
39545
|
if(atom.ssend) {
|
|
39524
39546
|
//substructItem.To = parseInt(resi);
|
|
39525
39547
|
substructItem.To = i + 1;
|
|
@@ -39938,8 +39960,8 @@ class Domain3d {
|
|
|
39938
39960
|
ic.tddomains[domainName][resid] = 1;
|
|
39939
39961
|
}
|
|
39940
39962
|
}
|
|
39941
|
-
}
|
|
39942
|
-
|
|
39963
|
+
}
|
|
39964
|
+
|
|
39943
39965
|
return {subdomains: subdomains, substruct: substruct, pos2resi: pos2resi };
|
|
39944
39966
|
} // end c2b_NewSplitChain
|
|
39945
39967
|
|
|
@@ -39957,9 +39979,14 @@ class Domain3d {
|
|
|
39957
39979
|
//the whole structure is also considered as a large domain
|
|
39958
39980
|
//if(subdomains.length == 0) {
|
|
39959
39981
|
//subdomains.push([parseInt(ic.chainsSeq[chnid][0].resi), parseInt(ic.chainsSeq[chnid][ic.chainsSeq[chnid].length - 1].resi)]);
|
|
39960
|
-
|
|
39961
|
-
|
|
39962
|
-
|
|
39982
|
+
|
|
39983
|
+
// subdomains.push([parseInt(residueArray[0].substr(residueArray[0].lastIndexOf('_') + 1)),
|
|
39984
|
+
// parseInt(residueArray[residueArray.length-1].substr(residueArray[residueArray.length-1].lastIndexOf('_') + 1))]);
|
|
39985
|
+
|
|
39986
|
+
// use position based
|
|
39987
|
+
subdomains.push([1, residueArray.length]);
|
|
39988
|
+
|
|
39989
|
+
//}
|
|
39963
39990
|
|
|
39964
39991
|
// m_domains1: {"data": [ {"ss": [[1,20,30,x,y,z,x,y,z], [2,50,60,x,y,z,x,y,z]], "domain": [[1,43,x,y,z],[2,58,x,y,z], ...]}, {"ss": [[1,20,30,x,y,z,x,y,z], [2,50,60,x,y,z,x,y,z]],"domain": [[1,43,x,y,z],[2,58,x,y,z], ...]} ] }
|
|
39965
39992
|
let jsonStr = '{"data": [';
|
|
@@ -39979,6 +40006,10 @@ class Domain3d {
|
|
|
39979
40006
|
let from = pos2resi[substruct[k].From];
|
|
39980
40007
|
let to = pos2resi[substruct[k].To];
|
|
39981
40008
|
|
|
40009
|
+
// 1-based residue numbers
|
|
40010
|
+
let fromPos = substruct[k].From;
|
|
40011
|
+
let toPos = substruct[k].To;
|
|
40012
|
+
|
|
39982
40013
|
let residFrom = chnid + "_" + from;
|
|
39983
40014
|
let atomFrom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[residFrom]);
|
|
39984
40015
|
if(!atomFrom || !ic.hAtoms.hasOwnProperty(atomFrom.serial)) continue;
|
|
@@ -39987,9 +40018,9 @@ class Domain3d {
|
|
|
39987
40018
|
let atomTo = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[residTo]);
|
|
39988
40019
|
if(!atomTo || !ic.hAtoms.hasOwnProperty(atomTo.serial)) continue;
|
|
39989
40020
|
|
|
39990
|
-
if(
|
|
40021
|
+
if(fromPos >= start && toPos <= end) {
|
|
39991
40022
|
if(ssCnt > 0) jsonStr += ', ';
|
|
39992
|
-
jsonStr += '[' + sstype + ',' +
|
|
40023
|
+
jsonStr += '[' + sstype + ',' + fromPos + ',' + toPos + ',' + substruct[k].x1.toFixed(2) + ',' + substruct[k].y1.toFixed(2) + ','
|
|
39993
40024
|
+ substruct[k].z1.toFixed(2) + ',' + substruct[k].x2.toFixed(2) + ',' + substruct[k].y2.toFixed(2) + ',' + substruct[k].z2.toFixed(2) + ']';
|
|
39994
40025
|
++ssCnt;
|
|
39995
40026
|
}
|
|
@@ -40007,7 +40038,10 @@ class Domain3d {
|
|
|
40007
40038
|
for(let k = 0, kl = residueArray.length; k < kl; ++k) {
|
|
40008
40039
|
let resid = residueArray[k];
|
|
40009
40040
|
|
|
40010
|
-
let resi = resid.substr(resid.lastIndexOf('_') + 1);
|
|
40041
|
+
// let resi = resid.substr(resid.lastIndexOf('_') + 1);
|
|
40042
|
+
// let residNCBI = ic.resid2ncbi[resid];
|
|
40043
|
+
// let pos = residNCBI.substr(residNCBI.lastIndexOf('_') + 1);
|
|
40044
|
+
let pos = k + 1;
|
|
40011
40045
|
|
|
40012
40046
|
//let resid = chnid + "_" + resi;
|
|
40013
40047
|
let atom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid]);
|
|
@@ -40017,9 +40051,9 @@ class Domain3d {
|
|
|
40017
40051
|
|
|
40018
40052
|
//domain: resi, restype, x, y, z
|
|
40019
40053
|
let restype = me.parasCls.resn2restype[atom.resn];
|
|
40020
|
-
if(restype !== undefined &&
|
|
40054
|
+
if(restype !== undefined && pos >= start && pos <= end) {
|
|
40021
40055
|
if(domainCnt > 0) jsonStr += ', ';
|
|
40022
|
-
jsonStr += '[' +
|
|
40056
|
+
jsonStr += '[' + pos + ',' + restype + ',' + atom.coord.x.toFixed(2) + ','
|
|
40023
40057
|
+ atom.coord.y.toFixed(2) + ',' + atom.coord.z.toFixed(2) + ']';
|
|
40024
40058
|
++domainCnt;
|
|
40025
40059
|
}
|
|
@@ -40849,7 +40883,7 @@ class AddTrack {
|
|
|
40849
40883
|
let bUnion = false, bUpdateHighlight = true;
|
|
40850
40884
|
|
|
40851
40885
|
let strandCnt = 0, loopCnt = 0;
|
|
40852
|
-
let setName, currStrand, prevStrand, prevStrandReal, currType, prevType;
|
|
40886
|
+
let setName, currStrand, prevStrand, prevStrandReal = 'NT', currType, prevType;
|
|
40853
40887
|
|
|
40854
40888
|
// clear selection
|
|
40855
40889
|
ic.hAtoms = {};
|
|
@@ -40916,6 +40950,7 @@ class AddTrack {
|
|
|
40916
40950
|
}
|
|
40917
40951
|
else if(prevType == 'igloop') {
|
|
40918
40952
|
++loopCnt;
|
|
40953
|
+
currStrand = 'CT';
|
|
40919
40954
|
setName = 'Loop-' + prevStrandReal + '_' + currStrand + '-' + chainid + '-' + loopCnt.toString().padStart(3, '0');
|
|
40920
40955
|
setName = setName.replace(/'/g, '`');
|
|
40921
40956
|
if(type == 'igloop') ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
|
|
@@ -41994,7 +42029,7 @@ class ShowAnno {
|
|
|
41994
42029
|
}
|
|
41995
42030
|
catch(err) {
|
|
41996
42031
|
thisClass.enableHlSeq();
|
|
41997
|
-
if(!me.bNode) console.log( "No data were found for the protein " + chnidBaseArray + "..." );
|
|
42032
|
+
if(!me.bNode) console.log( "No sequence data were found for the protein " + chnidBaseArray + "..." );
|
|
41998
42033
|
for(let chnid in ic.protein_chainid) {
|
|
41999
42034
|
let chnidBase = ic.protein_chainid[chnid];
|
|
42000
42035
|
ic.showSeqCls.setAlternativeSeq(chnid, chnidBase);
|
|
@@ -42120,7 +42155,7 @@ class ShowAnno {
|
|
|
42120
42155
|
}
|
|
42121
42156
|
}
|
|
42122
42157
|
else {
|
|
42123
|
-
if(!me.bNode) console.log( "No data were found for the chain " + chnid + "..." );
|
|
42158
|
+
if(!me.bNode) console.log( "No sequence data were found for the chain " + chnid + "..." );
|
|
42124
42159
|
ic.showSeqCls.setAlternativeSeq(chnid, chnidBase);
|
|
42125
42160
|
}
|
|
42126
42161
|
|
|
@@ -43214,6 +43249,8 @@ class ShowSeq {
|
|
|
43214
43249
|
// assign the adjusted reference numbers
|
|
43215
43250
|
ic.resid2refnum[residueid] = refnumLabel;
|
|
43216
43251
|
|
|
43252
|
+
refnumStr = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
|
|
43253
|
+
|
|
43217
43254
|
if(!ic.refnum2residArray.hasOwnProperty(refnumStr)) {
|
|
43218
43255
|
ic.refnum2residArray[refnumStr] = [residueid];
|
|
43219
43256
|
}
|
|
@@ -45202,6 +45239,11 @@ class GetGraph {
|
|
|
45202
45239
|
if(!bVertical) adjusty += 4 * r;
|
|
45203
45240
|
}
|
|
45204
45241
|
|
|
45242
|
+
// show reference numbers
|
|
45243
|
+
if(ic.bShownRefnum && ic.resid2refnum[resid]) {
|
|
45244
|
+
nodeName = ic.resid2refnum[resid];
|
|
45245
|
+
}
|
|
45246
|
+
|
|
45205
45247
|
let strokecolor = '#000';
|
|
45206
45248
|
let strokewidth = '1';
|
|
45207
45249
|
let textcolor = '#000';
|
|
@@ -45390,7 +45432,8 @@ class GetGraph {
|
|
|
45390
45432
|
let complement = firstSetAtoms;
|
|
45391
45433
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
45392
45434
|
let bSaltbridge = false;
|
|
45393
|
-
ic.hBondCls.calculateChemicalHbonds(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge, 'graph', true );
|
|
45435
|
+
// let selectedAtoms = ic.hBondCls.calculateChemicalHbonds(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge, 'graph', true );
|
|
45436
|
+
ic.hBondCls.calculateChemicalHbonds(me.hashUtilsCls.hash2Atoms(complement, ic.atoms), me.hashUtilsCls.hash2Atoms(firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge, 'graph', true );
|
|
45394
45437
|
resid2ResidhashHbond = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
45395
45438
|
}
|
|
45396
45439
|
|
|
@@ -45407,7 +45450,8 @@ class GetGraph {
|
|
|
45407
45450
|
let complement = firstSetAtoms;
|
|
45408
45451
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
45409
45452
|
let bSaltbridge = false;
|
|
45410
|
-
ic.saltbridgeCls.calculateIonicInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge, 'graph', true );
|
|
45453
|
+
// let selectedAtoms = ic.saltbridgeCls.calculateIonicInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge, 'graph', true );
|
|
45454
|
+
ic.saltbridgeCls.calculateIonicInteractions(me.hashUtilsCls.hash2Atoms(complement, ic.atoms), me.hashUtilsCls.hash2Atoms(firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge, 'graph', true );
|
|
45411
45455
|
resid2Residhash = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
45412
45456
|
}
|
|
45413
45457
|
let ionicStr = this.getGraphLinks(resid2Residhash, resid2Residhash, me.htmlCls.ionicInsideColor, labelType, me.htmlCls.ionicInsideValue);
|
|
@@ -45420,19 +45464,22 @@ class GetGraph {
|
|
|
45420
45464
|
let halogenpiStr = '', threshold;
|
|
45421
45465
|
threshold = parseFloat($("#" + ic.pre + "halogenthreshold" ).val());
|
|
45422
45466
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
45423
|
-
ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), parseFloat(threshold), 'graph', 'halogen', true );
|
|
45467
|
+
// let selectedAtoms = ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), parseFloat(threshold), 'graph', 'halogen', true );
|
|
45468
|
+
ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.hash2Atoms(firstSetAtoms, ic.atoms), me.hashUtilsCls.hash2Atoms(complement, ic.atoms), parseFloat(threshold), 'graph', 'halogen', true );
|
|
45424
45469
|
resid2Residhash = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
45425
45470
|
}
|
|
45426
45471
|
halogenpiStr += this.getGraphLinks(resid2Residhash, resid2Residhash, me.htmlCls.halogenInsideColor, labelType, me.htmlCls.halogenInsideValue);
|
|
45427
45472
|
threshold = parseFloat($("#" + ic.pre + "picationthreshold" ).val());
|
|
45428
45473
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
45429
|
-
ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), parseFloat(threshold), 'graph', 'pi-cation', true );
|
|
45474
|
+
// let selectedAtoms = ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), parseFloat(threshold), 'graph', 'pi-cation', true );
|
|
45475
|
+
ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.hash2Atoms(firstSetAtoms, ic.atoms), me.hashUtilsCls.hash2Atoms(complement, ic.atoms), parseFloat(threshold), 'graph', 'pi-cation', true );
|
|
45430
45476
|
resid2Residhash = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
45431
45477
|
}
|
|
45432
45478
|
halogenpiStr += this.getGraphLinks(resid2Residhash, resid2Residhash, me.htmlCls.picationInsideColor, labelType, me.htmlCls.picationInsideValue);
|
|
45433
45479
|
threshold = parseFloat($("#" + ic.pre + "pistackingthreshold" ).val());
|
|
45434
45480
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
45435
|
-
ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), parseFloat(threshold), 'graph', 'pi-stacking', true );
|
|
45481
|
+
// let selectedAtoms = ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), parseFloat(threshold), 'graph', 'pi-stacking', true );
|
|
45482
|
+
ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.hash2Atoms(firstSetAtoms, ic.atoms), me.hashUtilsCls.hash2Atoms(complement, ic.atoms), parseFloat(threshold), 'graph', 'pi-stacking', true );
|
|
45436
45483
|
resid2Residhash = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
45437
45484
|
}
|
|
45438
45485
|
halogenpiStr += this.getGraphLinks(resid2Residhash, resid2Residhash, me.htmlCls.pistackingInsideColor, labelType, me.htmlCls.pistackingInsideValue);
|
|
@@ -45590,6 +45637,15 @@ class ShowInter {
|
|
|
45590
45637
|
async showInteractions(type) { let ic = this.icn3d, me = ic.icn3dui;
|
|
45591
45638
|
let nameArray = $("#" + ic.pre + "atomsCustomHbond").val();
|
|
45592
45639
|
let nameArray2 = $("#" + ic.pre + "atomsCustomHbond2").val();
|
|
45640
|
+
|
|
45641
|
+
let atoms, atoms2;
|
|
45642
|
+
atoms = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
|
|
45643
|
+
atoms2 = ic.definedSetsCls.getAtomsFromNameArray(nameArray2);
|
|
45644
|
+
|
|
45645
|
+
// add the interacting atoms to display
|
|
45646
|
+
ic.dAtoms = me.hashUtilsCls.unionHash(ic.dAtoms, atoms);
|
|
45647
|
+
ic.dAtoms = me.hashUtilsCls.unionHash(ic.dAtoms, atoms2);
|
|
45648
|
+
|
|
45593
45649
|
if(nameArray2.length == 0) {
|
|
45594
45650
|
alert("Please select the first set");
|
|
45595
45651
|
}
|
|
@@ -45675,7 +45731,8 @@ class ShowInter {
|
|
|
45675
45731
|
ic.firstAtomObjCls.getFirstAtomObj(firstSetAtoms);
|
|
45676
45732
|
|
|
45677
45733
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
45678
|
-
let selectedAtoms = ic.hBondCls.calculateChemicalHbonds(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge );
|
|
45734
|
+
// let selectedAtoms = ic.hBondCls.calculateChemicalHbonds(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge );
|
|
45735
|
+
let selectedAtoms = ic.hBondCls.calculateChemicalHbonds(me.hashUtilsCls.hash2Atoms(complement, ic.atoms), me.hashUtilsCls.hash2Atoms(firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge );
|
|
45679
45736
|
let commanddesc;
|
|
45680
45737
|
if(bSaltbridge) {
|
|
45681
45738
|
ic.resid2ResidhashSaltbridge = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
@@ -45802,7 +45859,8 @@ class ShowInter {
|
|
|
45802
45859
|
complement = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
|
|
45803
45860
|
ic.firstAtomObjCls.getFirstAtomObj(firstSetAtoms);
|
|
45804
45861
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
45805
|
-
let selectedAtoms = ic.saltbridgeCls.calculateIonicInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge );
|
|
45862
|
+
// let selectedAtoms = ic.saltbridgeCls.calculateIonicInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge );
|
|
45863
|
+
let selectedAtoms = ic.saltbridgeCls.calculateIonicInteractions(me.hashUtilsCls.hash2Atoms(complement, ic.atoms), me.hashUtilsCls.hash2Atoms(firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge );
|
|
45806
45864
|
let commanddesc;
|
|
45807
45865
|
ic.resid2ResidhashSaltbridge = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
45808
45866
|
commanddesc = 'all atoms that have ionic interactions with the selected atoms';
|
|
@@ -45837,7 +45895,8 @@ class ShowInter {
|
|
|
45837
45895
|
complement = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
|
|
45838
45896
|
ic.firstAtomObjCls.getFirstAtomObj(firstSetAtoms);
|
|
45839
45897
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
45840
|
-
let selectedAtoms = ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), parseFloat(threshold), type, interactionType );
|
|
45898
|
+
// let selectedAtoms = ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), parseFloat(threshold), type, interactionType );
|
|
45899
|
+
let selectedAtoms = ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.hash2Atoms(firstSetAtoms, ic.atoms), me.hashUtilsCls.hash2Atoms(complement, ic.atoms), parseFloat(threshold), type, interactionType );
|
|
45841
45900
|
let commanddesc;
|
|
45842
45901
|
if(interactionType == 'halogen') {
|
|
45843
45902
|
ic.resid2ResidhashHalogen = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
@@ -45962,7 +46021,8 @@ class ShowInter {
|
|
|
45962
46021
|
pickCustomSphere_base(radius, atomlistTarget, otherAtoms, bSphereCalc, bInteraction, type, select, bGetPairs, bIncludeTarget) { let ic = this.icn3d, me = ic.icn3dui; // ic.pAtom is set already
|
|
45963
46022
|
let atoms;
|
|
45964
46023
|
if(bInteraction) {
|
|
45965
|
-
atoms = ic.contactCls.getAtomsWithinAtom(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, otherAtoms, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, atomlistTarget, ic.atoms), parseFloat(radius), bGetPairs, bInteraction, undefined, bIncludeTarget);
|
|
46024
|
+
// atoms = ic.contactCls.getAtomsWithinAtom(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, otherAtoms, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, atomlistTarget, ic.atoms), parseFloat(radius), bGetPairs, bInteraction, undefined, bIncludeTarget);
|
|
46025
|
+
atoms = ic.contactCls.getAtomsWithinAtom(me.hashUtilsCls.hash2Atoms(otherAtoms, ic.atoms), me.hashUtilsCls.hash2Atoms(atomlistTarget, ic.atoms), parseFloat(radius), bGetPairs, bInteraction, undefined, bIncludeTarget);
|
|
45966
46026
|
ic.resid2ResidhashInteractions = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
45967
46027
|
}
|
|
45968
46028
|
else {
|
|
@@ -47673,8 +47733,8 @@ class AlignParser {
|
|
|
47673
47733
|
let dataArray = await allPromise;
|
|
47674
47734
|
|
|
47675
47735
|
let data2 = data;
|
|
47676
|
-
let data3 = dataArray[0].value; //v3[0];
|
|
47677
|
-
let data4 = dataArray[1].value; //v4[0];
|
|
47736
|
+
let data3 = (me.bNode) ? dataArray[0] : dataArray[0].value; //v3[0];
|
|
47737
|
+
let data4 = (me.bNode) ? dataArray[1] : dataArray[1].value; //v4[0];
|
|
47678
47738
|
|
|
47679
47739
|
if(data3.atoms !== undefined && data4.atoms !== undefined) {
|
|
47680
47740
|
// ic.deferredOpm = $.Deferred(function() {
|
|
@@ -47836,7 +47896,7 @@ class AlignParser {
|
|
|
47836
47896
|
|
|
47837
47897
|
let bFound = false;
|
|
47838
47898
|
for(let i = 0, il = dataArray.length; i < il; ++i) {
|
|
47839
|
-
let opmdata = dataArray[i].value;
|
|
47899
|
+
let opmdata = (me.bNode) ? dataArray[i] : dataArray[i].value;
|
|
47840
47900
|
|
|
47841
47901
|
if(!opmdata) continue;
|
|
47842
47902
|
|
|
@@ -47996,7 +48056,7 @@ class ChainalignParser {
|
|
|
47996
48056
|
|
|
47997
48057
|
// modify the previous trans and rotation matrix
|
|
47998
48058
|
for(let i = 0, il = dataArray.length; i < il; ++i) {
|
|
47999
|
-
let align = dataArray[i].value;//[0];
|
|
48059
|
+
let align = (me.bNode) ? dataArray[i] : dataArray[i].value;//[0];
|
|
48000
48060
|
|
|
48001
48061
|
let mmdbid_q = struArray[i];
|
|
48002
48062
|
let index = indexArray[i];
|
|
@@ -48074,7 +48134,7 @@ class ChainalignParser {
|
|
|
48074
48134
|
return hAtomsAll;
|
|
48075
48135
|
}
|
|
48076
48136
|
|
|
48077
|
-
downloadChainalignmentPart2bRealign(dataArray, chainidPairArray) { let ic = this.icn3d, me = ic.icn3dui;
|
|
48137
|
+
downloadChainalignmentPart2bRealign(dataArray, chainidPairArray, bReverse) { let ic = this.icn3d, me = ic.icn3dui;
|
|
48078
48138
|
// set trans and rotation matrix
|
|
48079
48139
|
ic.t_trans_add = [];
|
|
48080
48140
|
ic.q_trans_sub = [];
|
|
@@ -48088,7 +48148,7 @@ class ChainalignParser {
|
|
|
48088
48148
|
|
|
48089
48149
|
let bFoundAlignment = false;
|
|
48090
48150
|
for(let i = 0, il = dataArray.length; i < il; ++i) {
|
|
48091
|
-
let align = dataArray[i].value;//[0];
|
|
48151
|
+
let align = (me.bNode) ? dataArray[i] : dataArray[i].value;//[0];
|
|
48092
48152
|
|
|
48093
48153
|
let bEqualMmdbid = false;
|
|
48094
48154
|
let bEqualChain = false;
|
|
@@ -48116,9 +48176,16 @@ class ChainalignParser {
|
|
|
48116
48176
|
}
|
|
48117
48177
|
|
|
48118
48178
|
if(!bFoundAlignment) {
|
|
48119
|
-
|
|
48120
|
-
if(
|
|
48121
|
-
|
|
48179
|
+
// sometimes VAST align works for the reversed pair
|
|
48180
|
+
if(!bReverse) {
|
|
48181
|
+
ic.realignParserCls.realignOnStructAlign(true);
|
|
48182
|
+
return;
|
|
48183
|
+
}
|
|
48184
|
+
else {
|
|
48185
|
+
/// if(ic.deferredRealignByStruct !== undefined) ic.deferredRealignByStruct.resolve();
|
|
48186
|
+
if(ic.bRender) alert("These structures can NOT be aligned...");
|
|
48187
|
+
return;
|
|
48188
|
+
}
|
|
48122
48189
|
}
|
|
48123
48190
|
|
|
48124
48191
|
// find the max aligned mmdbid as mmdbid_t
|
|
@@ -48473,7 +48540,7 @@ class ChainalignParser {
|
|
|
48473
48540
|
// Each argument is an array with the following structure: [ data, statusText, jqXHR ]
|
|
48474
48541
|
//var data2 = v2[0];
|
|
48475
48542
|
// index = 0: the mmdb data of target
|
|
48476
|
-
let targetData = dataArray[0].value; //[0];
|
|
48543
|
+
let targetData = (me.bNode) ? dataArray[0] : dataArray[0].value; //[0];
|
|
48477
48544
|
let header = 'HEADER ' + mmdbid_t + '\n';
|
|
48478
48545
|
if(isNaN(mmdbid_t) && mmdbid_t.length > 5) targetData = header + targetData;
|
|
48479
48546
|
|
|
@@ -48491,7 +48558,7 @@ class ChainalignParser {
|
|
|
48491
48558
|
let queryDataArray = [];
|
|
48492
48559
|
|
|
48493
48560
|
for(let index = 1, indexl = chainidArray.length; index < indexl; ++index) {
|
|
48494
|
-
let queryData = dataArray[index].value;//[0];
|
|
48561
|
+
let queryData = (me.bNode) ? dataArray[index] : dataArray[index].value;//[0];
|
|
48495
48562
|
|
|
48496
48563
|
let pos = chainidArray[index].indexOf('_');
|
|
48497
48564
|
let mmdbid_q = chainidArray[index].substr(0, pos).toUpperCase();
|
|
@@ -48537,7 +48604,7 @@ class ChainalignParser {
|
|
|
48537
48604
|
ic.qt_start_end[index-1] = undefined;
|
|
48538
48605
|
}
|
|
48539
48606
|
else {
|
|
48540
|
-
let align = dataArray[index2 - missedChainCnt].value;//[0];
|
|
48607
|
+
let align = (me.bNode) ? dataArray[index2 - missedChainCnt] : dataArray[index2 - missedChainCnt].value;//[0];
|
|
48541
48608
|
|
|
48542
48609
|
let bEqualMmdbid = (mmdbid_q == mmdbid_t);
|
|
48543
48610
|
let bEqualChain = (chain_q == chain_t);
|
|
@@ -48755,7 +48822,7 @@ class ChainalignParser {
|
|
|
48755
48822
|
|
|
48756
48823
|
let queryDataArray = [];
|
|
48757
48824
|
for(let index = 0, indexl = structArray.length; index < indexl; ++index) {
|
|
48758
|
-
let queryData = dataArray[index].value;//[0];
|
|
48825
|
+
let queryData = (me.bNode) ? dataArray[index] : dataArray[index].value;//[0];
|
|
48759
48826
|
let header = 'HEADER ' + structArray[index] + '\n';
|
|
48760
48827
|
if(isNaN(structArray[index]) && structArray[index].length > 5) queryData = header + queryData;
|
|
48761
48828
|
|
|
@@ -51207,7 +51274,7 @@ class RealignParser {
|
|
|
51207
51274
|
//var data2 = v2[0];
|
|
51208
51275
|
for(let index = 0, indexl = dataArray.length; index < indexl; ++index) {
|
|
51209
51276
|
// for(let index = 1, indexl = dataArray.length; index < indexl; ++index) {
|
|
51210
|
-
let data = dataArray[index].value;//[0];
|
|
51277
|
+
let data = (me.bNode) ? dataArray[index] : dataArray[index].value;//[0];
|
|
51211
51278
|
if(!data) continue;
|
|
51212
51279
|
|
|
51213
51280
|
let fromStruct = chainidArray[index + 1].substr(0, chainidArray[index + 1].indexOf('_')); //.toUpperCase();
|
|
@@ -51390,7 +51457,7 @@ class RealignParser {
|
|
|
51390
51457
|
await this.realignChainOnSeqAlign(undefined, chainidArray, bRealign);
|
|
51391
51458
|
}
|
|
51392
51459
|
|
|
51393
|
-
async realignOnStructAlign() { let ic = this.icn3d, me = ic.icn3dui;
|
|
51460
|
+
async realignOnStructAlign(bReverse) { let ic = this.icn3d, me = ic.icn3dui;
|
|
51394
51461
|
// each 3D domain should have at least 3 secondary structures
|
|
51395
51462
|
let minSseCnt = (me.cfg.aligntool != 'tmalign') ? 3 : 0;
|
|
51396
51463
|
let struct2domain = {};
|
|
@@ -51417,6 +51484,8 @@ class RealignParser {
|
|
|
51417
51484
|
|
|
51418
51485
|
//let cnt = 0;
|
|
51419
51486
|
let structArray = Object.keys(struct2domain);
|
|
51487
|
+
if(bReverse) structArray = structArray.reverse();
|
|
51488
|
+
|
|
51420
51489
|
for(let s = 0, sl = structArray.length; s < sl; ++s) {
|
|
51421
51490
|
let struct1 = structArray[s];
|
|
51422
51491
|
let chainidArray1 = Object.keys(struct2domain[struct1]);
|
|
@@ -51460,14 +51529,14 @@ class RealignParser {
|
|
|
51460
51529
|
}
|
|
51461
51530
|
|
|
51462
51531
|
let allPromise = Promise.allSettled(ajaxArray);
|
|
51463
|
-
try {
|
|
51532
|
+
// try {
|
|
51464
51533
|
let dataArray = await allPromise;
|
|
51465
51534
|
ic.qt_start_end = []; // reset the alignment
|
|
51466
|
-
await ic.chainalignParserCls.downloadChainalignmentPart2bRealign(dataArray, chainidPairArray);
|
|
51467
|
-
}
|
|
51468
|
-
catch(err) {
|
|
51469
|
-
|
|
51470
|
-
}
|
|
51535
|
+
await ic.chainalignParserCls.downloadChainalignmentPart2bRealign(dataArray, chainidPairArray, bReverse);
|
|
51536
|
+
// }
|
|
51537
|
+
// catch(err) {
|
|
51538
|
+
// if(ic.bRender) alert("These structures can NOT be aligned to each other...");
|
|
51539
|
+
// }
|
|
51471
51540
|
}
|
|
51472
51541
|
|
|
51473
51542
|
async realignOnStructAlignMsa(nameArray) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -51529,7 +51598,7 @@ class RealignParser {
|
|
|
51529
51598
|
}
|
|
51530
51599
|
|
|
51531
51600
|
let allPromise = Promise.allSettled(ajaxArray);
|
|
51532
|
-
try {
|
|
51601
|
+
// try {
|
|
51533
51602
|
let dataArray = await allPromise;
|
|
51534
51603
|
|
|
51535
51604
|
// set trans and rotation matrix
|
|
@@ -51543,10 +51612,10 @@ class RealignParser {
|
|
|
51543
51612
|
|
|
51544
51613
|
await ic.chainalignParserCls.downloadChainalignmentPart2b(undefined, nameArray, undefined, dataArray,
|
|
51545
51614
|
indexArray, struct1, struArray);
|
|
51546
|
-
}
|
|
51547
|
-
catch(err) {
|
|
51548
|
-
|
|
51549
|
-
}
|
|
51615
|
+
// }
|
|
51616
|
+
// catch(err) {
|
|
51617
|
+
// if(ic.bRender) alert("These structures can NOT be aligned to each other...");
|
|
51618
|
+
// }
|
|
51550
51619
|
}
|
|
51551
51620
|
|
|
51552
51621
|
async realignChainOnSeqAlign(chainresiCalphaHash2, chainidArray, bRealign, bPredefined) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -53055,13 +53124,13 @@ class ParserUtils {
|
|
|
53055
53124
|
let allPromise = Promise.allSettled([prms1, prms2]);
|
|
53056
53125
|
let dataArray = await allPromise;
|
|
53057
53126
|
|
|
53058
|
-
ic.interactionData1 = dataArray[0].value;
|
|
53127
|
+
ic.interactionData1 = (me.bNode) ? dataArray[0] : dataArray[0].value;
|
|
53059
53128
|
ic.html2ddgm = '';
|
|
53060
53129
|
ic.diagram2dCls.draw2Ddgm(ic.interactionData1, mmdbid1, 0);
|
|
53061
53130
|
if(me.cfg.show2d) me.htmlCls.dialogCls.openDlg('dl_2ddgm', 'Interactions');
|
|
53062
53131
|
|
|
53063
53132
|
|
|
53064
|
-
ic.interactionData2 = dataArray[1].value;
|
|
53133
|
+
ic.interactionData2 = (me.bNode) ? dataArray[1] : dataArray[1].value;
|
|
53065
53134
|
ic.diagram2dCls.draw2Ddgm(ic.interactionData2, mmdbid2, 1);
|
|
53066
53135
|
|
|
53067
53136
|
ic.html2ddgm += "<br>" + ic.diagram2dCls.set2DdgmNote(true);
|
|
@@ -53109,7 +53178,7 @@ class ParserUtils {
|
|
|
53109
53178
|
// Each argument is an array with the following structure: [ data, statusText, jqXHR ]
|
|
53110
53179
|
//var data2 = v2[0];
|
|
53111
53180
|
for(let index = 0, indexl = chainidArray.length; index < indexl; ++index) {
|
|
53112
|
-
let data = dataArray[index].value;//[0];
|
|
53181
|
+
let data = (me.bNode) ? dataArray[index] : dataArray[index].value;//[0];
|
|
53113
53182
|
let mmdbid = chainidArray[index].substr(0, chainidArray[index].indexOf('_'));
|
|
53114
53183
|
|
|
53115
53184
|
ic.diagram2dCls.draw2Ddgm(data, mmdbid, 0);
|
|
@@ -54722,7 +54791,8 @@ class SetSeqAlign {
|
|
|
54722
54791
|
return pos;
|
|
54723
54792
|
}
|
|
54724
54793
|
|
|
54725
|
-
getResnFromResi(chainid, resi) { let ic = this.icn3d
|
|
54794
|
+
getResnFromResi(chainid, resi) { let ic = this.icn3d; ic.icn3dui;
|
|
54795
|
+
/*
|
|
54726
54796
|
let pos = this.getPosFromResi(chainid, resi);
|
|
54727
54797
|
if(!pos) return '?';
|
|
54728
54798
|
|
|
@@ -54737,6 +54807,28 @@ class SetSeqAlign {
|
|
|
54737
54807
|
}
|
|
54738
54808
|
|
|
54739
54809
|
return resn;
|
|
54810
|
+
*/
|
|
54811
|
+
|
|
54812
|
+
let resid = chainid + '_' + resi;
|
|
54813
|
+
return ic.residueId2Name[resid];
|
|
54814
|
+
}
|
|
54815
|
+
|
|
54816
|
+
getResiAferAlign(chainid, bRealign, pos) { let ic = this.icn3d, me = ic.icn3dui;
|
|
54817
|
+
let resi;
|
|
54818
|
+
if(bRealign && me.cfg.aligntool == 'tmalign') {
|
|
54819
|
+
resi = pos;
|
|
54820
|
+
}
|
|
54821
|
+
else {
|
|
54822
|
+
if(ic.posid2resid) {
|
|
54823
|
+
let resid = ic.posid2resid[chainid + '_' + pos];
|
|
54824
|
+
resi = resid.substr(resid.lastIndexOf('_') + 1);
|
|
54825
|
+
}
|
|
54826
|
+
else {
|
|
54827
|
+
resi = ic.chainsSeq[chainid][pos].resi;
|
|
54828
|
+
}
|
|
54829
|
+
}
|
|
54830
|
+
|
|
54831
|
+
return resi;
|
|
54740
54832
|
}
|
|
54741
54833
|
|
|
54742
54834
|
setSeqAlignChain(chainid, chainIndex, chainidArray) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -54844,10 +54936,10 @@ class SetSeqAlign {
|
|
|
54844
54936
|
if(!ic.chainsMapping[chainid2]) ic.chainsMapping[chainid2] = {};
|
|
54845
54937
|
|
|
54846
54938
|
let posChain1 = {}, posChain2 = {};
|
|
54847
|
-
|
|
54939
|
+
|
|
54848
54940
|
for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
|
|
54849
54941
|
let start1, start2, end1, end2;
|
|
54850
|
-
if(bRealign) { // real residue numbers are stored, could be "100a"
|
|
54942
|
+
if(bRealign && me.cfg.aligntool == 'tmalign') { // real residue numbers are stored, could be "100a"
|
|
54851
54943
|
start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start);
|
|
54852
54944
|
start2 = parseInt(ic.qt_start_end[chainIndex][i].q_start);
|
|
54853
54945
|
end1 = parseInt(ic.qt_start_end[chainIndex][i].t_end);
|
|
@@ -54869,7 +54961,7 @@ class SetSeqAlign {
|
|
|
54869
54961
|
|
|
54870
54962
|
for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
|
|
54871
54963
|
let start1, start2, end1, end2;
|
|
54872
|
-
if(bRealign) { // real residue numbers are stored
|
|
54964
|
+
if(bRealign && me.cfg.aligntool == 'tmalign') { // real residue numbers are stored
|
|
54873
54965
|
start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start);
|
|
54874
54966
|
start2 = parseInt(ic.qt_start_end[chainIndex][i].q_start);
|
|
54875
54967
|
end1 = parseInt(ic.qt_start_end[chainIndex][i].t_end);
|
|
@@ -54891,8 +54983,9 @@ class SetSeqAlign {
|
|
|
54891
54983
|
|
|
54892
54984
|
if(ic.chainsSeq[chainid1] === undefined || ic.chainsSeq[chainid1][j] === undefined) break;
|
|
54893
54985
|
|
|
54894
|
-
let resi = (bRealign
|
|
54895
|
-
let resn = (bRealign) ? this.getResnFromResi(chainid1, j).toLowerCase() : ic.chainsSeq[chainid1][j].name.toLowerCase();
|
|
54986
|
+
let resi = this.getResiAferAlign(chainid1, bRealign, j + 1);
|
|
54987
|
+
// let resn = (bRealign && me.cfg.aligntool == 'tmalign') ? this.getResnFromResi(chainid1, j).toLowerCase() : ic.chainsSeq[chainid1][j].name.toLowerCase();
|
|
54988
|
+
let resn = this.getResnFromResi(chainid1, resi).toLowerCase();
|
|
54896
54989
|
|
|
54897
54990
|
if(resn == '?') continue;
|
|
54898
54991
|
|
|
@@ -54910,11 +55003,11 @@ class SetSeqAlign {
|
|
|
54910
55003
|
posChain2[j] = 1;
|
|
54911
55004
|
|
|
54912
55005
|
if(ic.chainsSeq[chainid2] === undefined || ic.chainsSeq[chainid2] === undefined) break;
|
|
54913
|
-
|
|
54914
|
-
|
|
54915
|
-
//let resn = ic.chainsSeq[chainid2][j].name.toLowerCase();
|
|
54916
|
-
let
|
|
54917
|
-
|
|
55006
|
+
|
|
55007
|
+
let resi = this.getResiAferAlign(chainid2, bRealign, j + 1);
|
|
55008
|
+
// let resn = (bRealign && me.cfg.aligntool == 'tmalign') ? this.getResnFromResi(chainid2, j).toLowerCase() : ic.chainsSeq[chainid2][j].name.toLowerCase();
|
|
55009
|
+
let resn = this.getResnFromResi(chainid2, resi).toLowerCase();
|
|
55010
|
+
|
|
54918
55011
|
|
|
54919
55012
|
if(resn == '?') continue;
|
|
54920
55013
|
|
|
@@ -54958,9 +55051,24 @@ class SetSeqAlign {
|
|
|
54958
55051
|
if(ic.chainsSeq[chainid1] === undefined || ic.chainsSeq[chainid2] === undefined) break;
|
|
54959
55052
|
|
|
54960
55053
|
let resi1, resi2, resn1, resn2;
|
|
55054
|
+
/*
|
|
54961
55055
|
if(bRealign) { // tmalign: just one residue in this for loop
|
|
54962
|
-
|
|
54963
|
-
|
|
55056
|
+
if(me.cfg.aligntool == 'tmalign') {
|
|
55057
|
+
resi1 = ic.qt_start_end[chainIndex][i].t_start;
|
|
55058
|
+
resi2 = ic.qt_start_end[chainIndex][i].q_start;
|
|
55059
|
+
}
|
|
55060
|
+
else {
|
|
55061
|
+
resi1 = j + start1;
|
|
55062
|
+
resi2 = j + start2;
|
|
55063
|
+
}
|
|
55064
|
+
|
|
55065
|
+
resn1 = this.getResnFromResi(chainid1, resi1).toUpperCase();
|
|
55066
|
+
resn2 = this.getResnFromResi(chainid2, resi2).toUpperCase();
|
|
55067
|
+
|
|
55068
|
+
if(resn1 == '?' || resn2 == '?') continue;
|
|
55069
|
+
}
|
|
55070
|
+
*/
|
|
55071
|
+
if(bRealign && me.cfg.aligntool == 'tmalign') { // tmalign: just one residue in this for loop
|
|
54964
55072
|
resi1 = ic.qt_start_end[chainIndex][i].t_start;
|
|
54965
55073
|
resi2 = ic.qt_start_end[chainIndex][i].q_start;
|
|
54966
55074
|
|
|
@@ -54972,10 +55080,15 @@ class SetSeqAlign {
|
|
|
54972
55080
|
else {
|
|
54973
55081
|
if(ic.chainsSeq[chainid1][j + start1] === undefined || ic.chainsSeq[chainid2][j + start2] === undefined) continue;
|
|
54974
55082
|
|
|
54975
|
-
resi1 = ic.chainsSeq[chainid1][j + start1].resi;
|
|
54976
|
-
resi2 = ic.chainsSeq[chainid2][j + start2].resi;
|
|
54977
|
-
resn1 = ic.chainsSeq[chainid1][j + start1].name.toUpperCase();
|
|
54978
|
-
resn2 = ic.chainsSeq[chainid2][j + start2].name.toUpperCase();
|
|
55083
|
+
// resi1 = ic.chainsSeq[chainid1][j + start1].resi;
|
|
55084
|
+
// resi2 = ic.chainsSeq[chainid2][j + start2].resi;
|
|
55085
|
+
// resn1 = ic.chainsSeq[chainid1][j + start1].name.toUpperCase();
|
|
55086
|
+
// resn2 = ic.chainsSeq[chainid2][j + start2].name.toUpperCase();
|
|
55087
|
+
|
|
55088
|
+
resi1 = this.getResiAferAlign(chainid1, bRealign, j + start1 + 1);
|
|
55089
|
+
resi2 = this.getResiAferAlign(chainid2, bRealign, j + start2 + 1);
|
|
55090
|
+
resn1 = this.getResnFromResi(chainid1, resi1).toUpperCase();
|
|
55091
|
+
resn2 = this.getResnFromResi(chainid2, resi2).toUpperCase();
|
|
54979
55092
|
}
|
|
54980
55093
|
|
|
54981
55094
|
if(resn1 === resn2) {
|
|
@@ -55239,7 +55352,12 @@ class SetSeqAlign {
|
|
|
55239
55352
|
resObject.mmdbid = chainid.substr(0, pos);
|
|
55240
55353
|
resObject.chain = chainid.substr(pos+1);
|
|
55241
55354
|
resObject.resi = (bGap) ? '' : resi; // resi will be empty if there is no coordinates
|
|
55242
|
-
|
|
55355
|
+
if(!resn) {
|
|
55356
|
+
resObject.resn = '-';
|
|
55357
|
+
}
|
|
55358
|
+
else {
|
|
55359
|
+
resObject.resn = (bGap) ? '-' : ((bAligned) ? resn.toUpperCase() : resn.toLowerCase());
|
|
55360
|
+
}
|
|
55243
55361
|
resObject.aligned = (bGap) ? false : bAligned;
|
|
55244
55362
|
resObject.color = (bGap || !bAligned) ? me.htmlCls.GREYC : ((resn == resn_t) ? "#FF0000" : "#0000FF"); // color by identity
|
|
55245
55363
|
resObject.color2 = (bGap || !bAligned) ? me.htmlCls.GREYC : '#' + ic.showAnnoCls.getColorhexFromBlosum62(resn, resn_t); // color by conservation
|
|
@@ -55273,9 +55391,9 @@ class SetSeqAlign {
|
|
|
55273
55391
|
return resn;
|
|
55274
55392
|
}
|
|
55275
55393
|
|
|
55276
|
-
getResnFromResid(resid) { let ic = this.icn3d
|
|
55277
|
-
|
|
55278
|
-
}
|
|
55394
|
+
// getResnFromResid(resid) { let ic = this.icn3d, me = ic.icn3dui;
|
|
55395
|
+
// return ic.residueId2Name[resid];
|
|
55396
|
+
// }
|
|
55279
55397
|
|
|
55280
55398
|
getResiPosInTemplate(chainid1, resi_t) { let ic = this.icn3d; ic.icn3dui;
|
|
55281
55399
|
// check the number of gaps before resiStart1 (nGap), and insert 'notAlnLen2 - notAlnLen1 - nGap' gaps
|
|
@@ -55404,7 +55522,7 @@ class SetSeqAlign {
|
|
|
55404
55522
|
|
|
55405
55523
|
for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
|
|
55406
55524
|
let start1, start2, end1, end2, resiStart1, start1Pos, end1Pos;
|
|
55407
|
-
if(bRealign) { // real residue numbers are stored
|
|
55525
|
+
if(bRealign && me.cfg.aligntool == 'tmalign') { // real residue numbers are stored
|
|
55408
55526
|
start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start);
|
|
55409
55527
|
start2 = parseInt(ic.qt_start_end[chainIndex][i].q_start);
|
|
55410
55528
|
end1 = parseInt(ic.qt_start_end[chainIndex][i].t_end);
|
|
@@ -55488,8 +55606,8 @@ class SetSeqAlign {
|
|
|
55488
55606
|
else {
|
|
55489
55607
|
let resi1 = (bRealign) ? start1 + k : ic.ParserUtilsCls.getResi(chainid1, start1 + k);
|
|
55490
55608
|
let resi2 = (bRealign) ? start2 + k : ic.ParserUtilsCls.getResi(chainid2, start2 + k);
|
|
55491
|
-
let resn1 = this.
|
|
55492
|
-
let resn2 = this.
|
|
55609
|
+
let resn1 = this.getResnFromResi(chainid1, resi1); //this.getResn(chainid1, start1 + k);
|
|
55610
|
+
let resn2 = this.getResnFromResi(chainid2, resi2); //this.getResn(chainid2, start2 + k);
|
|
55493
55611
|
|
|
55494
55612
|
let bAlign = true;
|
|
55495
55613
|
let resObject = this.getResObject(chainid2, false, bAlign, resi2, resn2, resn1);
|
|
@@ -56752,7 +56870,7 @@ class Vastplus {
|
|
|
56752
56870
|
|
|
56753
56871
|
let queryDataArray = [];
|
|
56754
56872
|
for(let index = 0, indexl = chainidpairArray.length; index < indexl; ++index) {
|
|
56755
|
-
let queryData = dataArray[index].value; //[0];
|
|
56873
|
+
let queryData = (me.bNode) ? dataArray[index] : dataArray[index].value; //[0];
|
|
56756
56874
|
|
|
56757
56875
|
queryDataArray.push(queryData);
|
|
56758
56876
|
/*
|
|
@@ -58720,6 +58838,12 @@ class ApplyCommand {
|
|
|
58720
58838
|
let dataStr = paraArray[1].replace(/\\n/g, '\n');
|
|
58721
58839
|
await ic.refnumCls.parseCustomRefFile(dataStr);
|
|
58722
58840
|
}
|
|
58841
|
+
else if(command.indexOf('show ref number') == 0) {
|
|
58842
|
+
ic.bShownRefnum = true;
|
|
58843
|
+
}
|
|
58844
|
+
else if(command.indexOf('hide ref number') == 0) {
|
|
58845
|
+
ic.bShownRefnum = false;
|
|
58846
|
+
}
|
|
58723
58847
|
|
|
58724
58848
|
// special, select ==========
|
|
58725
58849
|
|
|
@@ -60754,7 +60878,7 @@ class SelectByCommand {
|
|
|
60754
60878
|
// $1,2,3: Structure
|
|
60755
60879
|
// .A,B,C: chain
|
|
60756
60880
|
// :5-10,K,chemicals: residues, could be 'proteins', 'nucleotides', 'chemicals', 'ions', and 'water'
|
|
60757
|
-
// :
|
|
60881
|
+
// :ref_1250,anchors,strands,loops: reference numbers 1250, anchor residues (e.g., 2250), residues in strands, residues in loops
|
|
60758
60882
|
// @CA,C,C*: atoms
|
|
60759
60883
|
// wild card * can be used to select all
|
|
60760
60884
|
//var currHighlightAtoms = {}
|
|
@@ -60902,7 +61026,7 @@ class SelectByCommand {
|
|
|
60902
61026
|
let residArray = [];
|
|
60903
61027
|
|
|
60904
61028
|
if(bRefnum) {
|
|
60905
|
-
let residArrayTmp = (ic.refnum2residArray[k]) ? ic.refnum2residArray[k] : [];
|
|
61029
|
+
let residArrayTmp = (ic.refnum2residArray[k.toString()]) ? ic.refnum2residArray[k.toString()] : [];
|
|
60906
61030
|
for(let m = 0, ml = residArrayTmp.length; m < ml; ++m) {
|
|
60907
61031
|
let residueId = residArrayTmp[m];
|
|
60908
61032
|
if(residueId.substr(0, residueId.lastIndexOf('_')) == molecule_chain) {
|
|
@@ -62960,14 +63084,14 @@ class Dssp {
|
|
|
62960
63084
|
}
|
|
62961
63085
|
}
|
|
62962
63086
|
|
|
62963
|
-
async parseDsspData(dataArray, struArray, bAppend) { let ic = this.icn3d
|
|
63087
|
+
async parseDsspData(dataArray, struArray, bAppend) { let ic = this.icn3d, me = ic.icn3dui;
|
|
62964
63088
|
//var dataArray =(struArray.length == 1) ? [data] : data;
|
|
62965
63089
|
|
|
62966
63090
|
// Each argument is an array with the following structure: [ data, statusText, jqXHR ]
|
|
62967
63091
|
//var data2 = v2[0];
|
|
62968
63092
|
for(let index = 0, indexl = dataArray.length; index < indexl; ++index) {
|
|
62969
63093
|
//let ssHash = dataArray[index][0];
|
|
62970
|
-
let ssHash = dataArray[index].value;
|
|
63094
|
+
let ssHash = (me.bNode) ? dataArray[index] : dataArray[index].value;
|
|
62971
63095
|
|
|
62972
63096
|
if(ssHash !== undefined && JSON.stringify(ssHash).indexOf('Oops there was a problem') === -1) {
|
|
62973
63097
|
for(let chainNum in ic.chainsSeq) {
|
|
@@ -63093,8 +63217,19 @@ class Dssp {
|
|
|
63093
63217
|
ic.bShowRefnum = false;
|
|
63094
63218
|
|
|
63095
63219
|
ic.hAtoms = {};
|
|
63096
|
-
ic.bResetAnno = true;
|
|
63097
|
-
|
|
63220
|
+
//ic.bResetAnno = true;
|
|
63221
|
+
|
|
63222
|
+
// await ic.showAnnoCls.showAnnotations();
|
|
63223
|
+
if(ic.bAnnoShown) {
|
|
63224
|
+
for(let chain in ic.protein_chainid) {
|
|
63225
|
+
let chainidBase = ic.protein_chainid[chain];
|
|
63226
|
+
ic.showSeqCls.showSeq(chain, chainidBase, 'protein');
|
|
63227
|
+
}
|
|
63228
|
+
}
|
|
63229
|
+
else {
|
|
63230
|
+
await ic.showAnnoCls.showAnnotations();
|
|
63231
|
+
}
|
|
63232
|
+
|
|
63098
63233
|
ic.hlUpdateCls.updateHlAll();
|
|
63099
63234
|
}
|
|
63100
63235
|
|
|
@@ -63131,7 +63266,7 @@ class Dssp {
|
|
|
63131
63266
|
ic.refpdbArray = ['NaCaExchanger_2fwuA_dog_n2', 'C3_2qkiD_human_n1', 'Siglec3_5j0bB_human_C2-n2', 'ICOS_6x4gA_human_V', 'B2Microglobulin_7phrL_human_C1', 'VTCN1_Q7Z7D3_human_V-n2', 'Contactin1_2ee2A_human_FN3-n9', 'InsulinR_8guyE_human_FN3-n1', 'JAM1_1nbqA_human_VorIset-n2', 'LAG3_7tzgD_human_C2-n2', 'Palladin_2dm3A_human_Iset-n1', 'PD1_4zqkB_human_V', 'CD8a_1cd8A_human_V', 'VISTA_6oilA_human_V', 'LAG3_7tzgD_human_V-n1', 'TP47_1o75A_bacteria', 'TP34_2o6cA_bacteria', 'TEAD1_3kysC_human', 'RBPJ_6py8C_human_Unk-n2', 'TCRa_6jxrm_human_C1-n2', 'IsdA_2iteA_bacteria', 'LaminAC_1ifrA_human', 'CD19_6al5A_human_C2orV-n1'];
|
|
63132
63267
|
|
|
63133
63268
|
// round 2
|
|
63134
|
-
ic.refpdbHash = {};
|
|
63269
|
+
ic.refpdbHash = {};
|
|
63135
63270
|
ic.refpdbHash['NaCaExchanger_2fwuA_dog_n2'] = ['NaCaExchanger_2fwuA_dog_n2', 'ORF7a_1xakA_virus', 'ECadherin_4zt1A_human_n2', 'NaKATPaseTransporterBeta_2zxeB_spurdogshark'];
|
|
63136
63271
|
ic.refpdbHash['C3_2qkiD_human_n1'] = ['C3_2qkiD_human_n1', 'RBPJ_6py8C_human_Unk-n1', 'BArrestin1_4jqiA_rat_n1'];
|
|
63137
63272
|
ic.refpdbHash['Siglec3_5j0bB_human_C2-n2'] = ['Siglec3_5j0bB_human_C2-n2', 'CD2_1hnfA_human_C2-n2', 'GHR_1axiB_human_FN3-n1'];
|
|
@@ -63156,40 +63291,27 @@ class Dssp {
|
|
|
63156
63291
|
ic.refpdbHash['LaminAC_1ifrA_human'] = ['LaminAC_1ifrA_human', 'MPT63_1lmiA_bacteria'];
|
|
63157
63292
|
ic.refpdbHash['CD19_6al5A_human_C2orV-n1'] = ['CD19_6al5A_human_C2orV-n1'];
|
|
63158
63293
|
*/
|
|
63159
|
-
// round 1
|
|
63160
|
-
ic.refpdbArray = ['
|
|
63294
|
+
// round 1, 16 templates
|
|
63295
|
+
ic.refpdbArray = ['1InsulinR_8guyE_human_FN3-n1', '1Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4', '1CoAtomerGamma1_1r4xA_human', '1C3_2qkiD_human_n1', '1CuZnSuperoxideDismutase_1hl5C_human', '1ASF1A_2iijA_human', '1FAB-LIGHT_5esv_C1-n2', '1CD2_1hnfA_human_C2-n2', '1NaCaExchanger_2fwuA_dog_n2', '1FAB-HEAVY_5esv_V-n1', '1PDL1_4z18B_human_V-n1', '1BTLA_2aw2A_human_Iset', '1LaminAC_1ifrA_human', '1IsdA_2iteA_bacteria', '1TCRa_6jxrm_human_C1-n2', '1CD19_6al5A_human_C2orV-n1'];
|
|
63161
63296
|
|
|
63162
63297
|
// round 2
|
|
63163
63298
|
ic.refpdbHash = {};
|
|
63164
|
-
ic.refpdbHash['
|
|
63165
|
-
ic.refpdbHash['
|
|
63166
|
-
ic.refpdbHash['
|
|
63167
|
-
ic.refpdbHash['
|
|
63168
|
-
ic.refpdbHash['1JAM1_1nbqA_human_VorIset-n2'] = ['JAM1_1nbqA_human_VorIset-n2', 'PDL1_4z18B_human_V-n1'];
|
|
63169
|
-
ic.refpdbHash['1Palladin_2dm3A_human_Iset-n1'] = ['Palladin_2dm3A_human_Iset-n1', 'Titin_4uowM_human_Unk-n152', 'VISTA_6oilA_human_V'];
|
|
63170
|
-
ic.refpdbHash['1FAB-HEAVY_5esv_C1-n2'] = ['FAB-HEAVY_5esv_C1-n2', 'B2Microglobulin_7phrL_human_C1', 'MHCIa_7phrH_human_C1'];
|
|
63171
|
-
ic.refpdbHash['1FAB-LIGHT_5esv_C1-n2'] = ['FAB-LIGHT_5esv_C1-n2', 'VTCN1_Q7Z7D3_human_V-n2'];
|
|
63172
|
-
ic.refpdbHash['1BArrestin1_4jqiA_rat_n1'] = ['BArrestin1_4jqiA_rat_n1', 'C3_2qkiD_human_n1', 'RBPJ_6py8C_human_Unk-n1'];
|
|
63173
|
-
ic.refpdbHash['1IL6Rb_1bquB_human_FN3-n3'] = ['IL6Rb_1bquB_human_FN3-n3', 'Sidekick2_1wf5A_human_FN3-n7'];
|
|
63174
|
-
ic.refpdbHash['1Contactin1_2ee2A_human_FN3-n9'] = ['Contactin1_2ee2A_human_FN3-n9', 'IL6Rb_1bquB_human_FN3-n2'];
|
|
63175
|
-
ic.refpdbHash['1InsulinR_8guyE_human_FN3-n1'] = ['InsulinR_8guyE_human_FN3-n1', 'InsulinR_8guyE_human_FN3-n2'];
|
|
63176
|
-
ic.refpdbHash['1NaCaExchanger_2fwuA_dog_n2'] = ['NaCaExchanger_2fwuA_dog_n2', 'NaKATPaseTransporterBeta_2zxeB_spurdogshark'];
|
|
63299
|
+
ic.refpdbHash['1InsulinR_8guyE_human_FN3-n1'] = ['InsulinR_8guyE_human_FN3-n1', 'IL6Rb_1bquB_human_FN3-n3', 'Sidekick2_1wf5A_human_FN3-n7', 'InsulinR_8guyE_human_FN3-n2', 'Contactin1_2ee2A_human_FN3-n9', 'IL6Rb_1bquB_human_FN3-n2'];
|
|
63300
|
+
ic.refpdbHash['1Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'] = ['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4', 'ICOS_6x4gA_human_V'];
|
|
63301
|
+
ic.refpdbHash['1CoAtomerGamma1_1r4xA_human'] = ['CoAtomerGamma1_1r4xA_human', 'TP34_2o6cA_bacteria', 'RBPJ_6py8C_human_Unk-n2', 'TP47_1o75A_bacteria'];
|
|
63302
|
+
ic.refpdbHash['1C3_2qkiD_human_n1'] = ['C3_2qkiD_human_n1', 'BArrestin1_4jqiA_rat_n1', 'RBPJ_6py8C_human_Unk-n1'];
|
|
63177
63303
|
ic.refpdbHash['1CuZnSuperoxideDismutase_1hl5C_human'] = ['CuZnSuperoxideDismutase_1hl5C_human', 'TEAD1_3kysC_human'];
|
|
63178
|
-
ic.refpdbHash['
|
|
63179
|
-
ic.refpdbHash['
|
|
63180
|
-
|
|
63181
|
-
ic.refpdbHash['
|
|
63182
|
-
ic.refpdbHash['
|
|
63183
|
-
ic.refpdbHash['
|
|
63184
|
-
ic.refpdbHash['
|
|
63185
|
-
ic.refpdbHash['1TCRa_6jxrm_human_C1-n2'] = ['TCRa_6jxrm_human_C1-n2'];
|
|
63304
|
+
ic.refpdbHash['1ASF1A_2iijA_human'] = ['ASF1A_2iijA_human', 'MPT63_1lmiA_bacteria'];
|
|
63305
|
+
ic.refpdbHash['1FAB-LIGHT_5esv_C1-n2'] = ['FAB-LIGHT_5esv_C1-n2', 'GHR_1axiB_human_FN3-n1', 'VTCN1_Q7Z7D3_human_V-n2', 'B2Microglobulin_7phrL_human_C1', 'FAB-HEAVY_5esv_C1-n2', 'MHCIa_7phrH_human_C1'];
|
|
63306
|
+
ic.refpdbHash['1CD2_1hnfA_human_C2-n2'] = ['CD2_1hnfA_human_C2-n2', 'Siglec3_5j0bB_human_C2-n2'];
|
|
63307
|
+
ic.refpdbHash['1NaCaExchanger_2fwuA_dog_n2'] = ['NaCaExchanger_2fwuA_dog_n2', 'ORF7a_1xakA_virus', 'ECadherin_4zt1A_human_n2', 'NaKATPaseTransporterBeta_2zxeB_spurdogshark'];
|
|
63308
|
+
ic.refpdbHash['1FAB-HEAVY_5esv_V-n1'] = ['FAB-HEAVY_5esv_V-n1', 'FAB-LIGHT_5esv_V-n1', 'VNAR_1t6vN_shark_V', 'TCRa_6jxrm_human_V-n1', 'VISTA_6oilA_human_V', 'CD8a_1cd8A_human_V', 'PD1_4zqkB_human_V'];
|
|
63309
|
+
ic.refpdbHash['1PDL1_4z18B_human_V-n1'] = ['PDL1_4z18B_human_V-n1', 'CD2_1hnfA_human_V-n1', 'LAG3_7tzgD_human_V-n1'];
|
|
63310
|
+
ic.refpdbHash['1BTLA_2aw2A_human_Iset'] = ['BTLA_2aw2A_human_Iset', 'Palladin_2dm3A_human_Iset-n1', 'Titin_4uowM_human_Unk-n152', 'LAG3_7tzgD_human_C2-n2', 'JAM1_1nbqA_human_VorIset-n2', 'Contactin1_3s97C_human_C2-n2'];
|
|
63186
63311
|
ic.refpdbHash['1LaminAC_1ifrA_human'] = ['LaminAC_1ifrA_human'];
|
|
63187
63312
|
ic.refpdbHash['1IsdA_2iteA_bacteria'] = ['IsdA_2iteA_bacteria'];
|
|
63188
|
-
ic.refpdbHash['
|
|
63189
|
-
ic.refpdbHash['1CD19_6al5A_human_C2orV-n1'] = ['CD19_6al5A_human_C2orV-n1'];
|
|
63190
|
-
ic.refpdbHash['1ORF7a_1xakA_virus'] = ['ORF7a_1xakA_virus'];
|
|
63191
|
-
ic.refpdbHash['1ECadherin_4zt1A_human_n2'] = ['ECadherin_4zt1A_human_n2'];
|
|
63192
|
-
ic.refpdbHash['1ASF1A_2iijA_human'] = ['ASF1A_2iijA_human'];
|
|
63313
|
+
ic.refpdbHash['1TCRa_6jxrm_human_C1-n2'] = ['TCRa_6jxrm_human_C1-n2'];
|
|
63314
|
+
ic.refpdbHash['1CD19_6al5A_human_C2orV-n1'] = ['CD19_6al5A_human_C2orV-n1'];
|
|
63193
63315
|
|
|
63194
63316
|
// use known ref structure
|
|
63195
63317
|
ic.refpdbHash['5ESV'] = ['FAB-HEAVY_5esv_V-n1', 'FAB-LIGHT_5esv_V-n1', 'FAB-HEAVY_5esv_C1-n2', 'FAB-LIGHT_5esv_C1-n2'];
|
|
@@ -63333,15 +63455,16 @@ class Dssp {
|
|
|
63333
63455
|
domainAtomsArray.push(domainAtoms);
|
|
63334
63456
|
}
|
|
63335
63457
|
}
|
|
63336
|
-
|
|
63458
|
+
|
|
63337
63459
|
for(let k = 0, kl = domainAtomsArray.length; k < kl; ++k) {
|
|
63338
63460
|
let pdb_target = ic.saveFileCls.getAtomPDB(domainAtomsArray[k], undefined, undefined, undefined, undefined, struct);
|
|
63339
|
-
|
|
63461
|
+
// ig strand for any subset will have the same k, use the number of residue to separate them
|
|
63462
|
+
let domainid = chainid + '-' + k + '_' + domainAtomsArray[k].length;
|
|
63340
63463
|
ic.domainid2pdb[domainid] = pdb_target;
|
|
63341
63464
|
|
|
63342
63465
|
for(let index = 0, indexl = dataArray.length; index < indexl; ++index) {
|
|
63343
63466
|
let struct2 = ic.defaultPdbId + index;
|
|
63344
|
-
let pdb_query = dataArray[index].value; //[0];
|
|
63467
|
+
let pdb_query = (me.bNode) ? dataArray[index] : dataArray[index].value; //[0];
|
|
63345
63468
|
let header = 'HEADER ' + struct2 + '\n';
|
|
63346
63469
|
pdb_query = header + pdb_query;
|
|
63347
63470
|
|
|
@@ -63349,7 +63472,7 @@ class Dssp {
|
|
|
63349
63472
|
let alignAjax = me.getAjaxPostPromise(urltmalign, dataObj);
|
|
63350
63473
|
ajaxArray.push(alignAjax);
|
|
63351
63474
|
|
|
63352
|
-
domainidpairArray.push(domainid + "
|
|
63475
|
+
domainidpairArray.push(domainid + "|" + ic.refpdbArray[index]);
|
|
63353
63476
|
}
|
|
63354
63477
|
}
|
|
63355
63478
|
}
|
|
@@ -63375,7 +63498,7 @@ class Dssp {
|
|
|
63375
63498
|
async parseAlignData(dataArray, domainidpairArray, bRound1) { let ic = this.icn3d, me = ic.icn3dui;
|
|
63376
63499
|
let thisClass = this;
|
|
63377
63500
|
|
|
63378
|
-
let tmscoreThreshold = 0.4; //0.5;
|
|
63501
|
+
let tmscoreThreshold = 0.4; // 0.4; //0.5;
|
|
63379
63502
|
|
|
63380
63503
|
// find the best alignment for each chain
|
|
63381
63504
|
let domainid2score = {}, domainid2segs = {}, chainid2segs = {};
|
|
@@ -63393,7 +63516,7 @@ class Dssp {
|
|
|
63393
63516
|
let minResidues = 20;
|
|
63394
63517
|
|
|
63395
63518
|
for(let i = 0, il = domainidpairArray.length; i < il; ++i) {
|
|
63396
|
-
let queryData = dataArray[i].value; //[0];
|
|
63519
|
+
let queryData = (me.bNode) ? dataArray[i] : dataArray[i].value; //[0];
|
|
63397
63520
|
|
|
63398
63521
|
if(!queryData) {
|
|
63399
63522
|
if(!me.bNode) console.log("The alignment data for " + domainidpairArray[i] + " is unavailable...");
|
|
@@ -63402,12 +63525,14 @@ class Dssp {
|
|
|
63402
63525
|
|
|
63403
63526
|
if(queryData.length == 0) continue;
|
|
63404
63527
|
|
|
63405
|
-
if(queryData[0].score < tmscoreThreshold || queryData[0].num_res < minResidues)
|
|
63528
|
+
if(queryData[0].score < tmscoreThreshold || queryData[0].num_res < minResidues) {
|
|
63529
|
+
continue;
|
|
63530
|
+
}
|
|
63406
63531
|
|
|
63407
63532
|
//let domainid_index = domainidpairArray[i].split(',');
|
|
63408
63533
|
//let domainid = domainid_index[0];
|
|
63409
|
-
let domainid = domainidpairArray[i].substr(0, domainidpairArray[i].indexOf('
|
|
63410
|
-
let refpdbname = domainidpairArray[i].substr(domainidpairArray[i].indexOf('
|
|
63534
|
+
let domainid = domainidpairArray[i].substr(0, domainidpairArray[i].indexOf('|'));
|
|
63535
|
+
let refpdbname = domainidpairArray[i].substr(domainidpairArray[i].indexOf('|') + 1);
|
|
63411
63536
|
//let chainid = domainid.split('-')[0];
|
|
63412
63537
|
|
|
63413
63538
|
// Ig-like domains: B (2150, 2150a, 2150b), C (3150, 3250), E (7150, 7250), F (8150, 8250) strands
|
|
@@ -63465,6 +63590,10 @@ class Dssp {
|
|
|
63465
63590
|
if(!me.bNode) console.log("Adjusted refpdbname for domainid " + domainid + ": " + refpdbname);
|
|
63466
63591
|
}
|
|
63467
63592
|
|
|
63593
|
+
if(!ic.refpdbHash[refpdbname]) {
|
|
63594
|
+
continue;
|
|
63595
|
+
}
|
|
63596
|
+
|
|
63468
63597
|
for(let k = 0, kl = ic.refpdbHash[refpdbname].length; k < kl; ++k) {
|
|
63469
63598
|
let urlpdb = me.htmlCls.baseUrl + "mmcifparser/mmcifparser.cgi?refpdbid=" + ic.refpdbHash[refpdbname][k];
|
|
63470
63599
|
|
|
@@ -63479,7 +63608,7 @@ class Dssp {
|
|
|
63479
63608
|
let pdb_target = ic.domainid2pdb[domainid];
|
|
63480
63609
|
for(let index = 0, indexl = ic.pdbDataArray.length; index < indexl; ++index) {
|
|
63481
63610
|
let struct2 = ic.defaultPdbId + index;
|
|
63482
|
-
let pdb_query = ic.pdbDataArray[index].value; //[0];
|
|
63611
|
+
let pdb_query = (me.bNode) ? ic.pdbDataArray[index] : ic.pdbDataArray[index].value; //[0];
|
|
63483
63612
|
let header = 'HEADER ' + struct2 + '\n';
|
|
63484
63613
|
pdb_query = header + pdb_query;
|
|
63485
63614
|
|
|
@@ -63488,7 +63617,7 @@ class Dssp {
|
|
|
63488
63617
|
ajaxArray.push(alignAjax);
|
|
63489
63618
|
|
|
63490
63619
|
//domainidpairArray3.push(domainid + "," + refpdbname);
|
|
63491
|
-
domainidpairArray3.push(domainid + "
|
|
63620
|
+
domainidpairArray3.push(domainid + "|" + ic.refpdbHash[refpdbname][index]);
|
|
63492
63621
|
}
|
|
63493
63622
|
}
|
|
63494
63623
|
|
|
@@ -63576,8 +63705,17 @@ class Dssp {
|
|
|
63576
63705
|
|
|
63577
63706
|
// open sequence view
|
|
63578
63707
|
ic.hAtomsRefnum = {};
|
|
63579
|
-
ic.bResetAnno = true;
|
|
63580
|
-
|
|
63708
|
+
//ic.bResetAnno = true;
|
|
63709
|
+
if(ic.bAnnoShown) {
|
|
63710
|
+
for(let chain in ic.protein_chainid) {
|
|
63711
|
+
let chainidBase = ic.protein_chainid[chain];
|
|
63712
|
+
ic.showSeqCls.showSeq(chain, chainidBase, 'protein');
|
|
63713
|
+
}
|
|
63714
|
+
}
|
|
63715
|
+
else {
|
|
63716
|
+
await ic.showAnnoCls.showAnnotations();
|
|
63717
|
+
}
|
|
63718
|
+
|
|
63581
63719
|
ic.annotationCls.setAnnoViewAndDisplay('detailed view');
|
|
63582
63720
|
}
|
|
63583
63721
|
else {
|
|
@@ -63702,7 +63840,7 @@ class Dssp {
|
|
|
63702
63840
|
}
|
|
63703
63841
|
|
|
63704
63842
|
rmStrandFromRefnumlabel(refnumLabel) {
|
|
63705
|
-
return refnumLabel.replace(/'/g, '').replace(/\*/g, '').replace(/\^/g, '').replace(/\+/g, '').replace(/\-/g, '').substr(1); // C', C''
|
|
63843
|
+
return (!refnumLabel) ? refnumLabel : refnumLabel.replace(/'/g, '').replace(/\*/g, '').replace(/\^/g, '').replace(/\+/g, '').replace(/\-/g, '').substr(1); // C', C''
|
|
63706
63844
|
}
|
|
63707
63845
|
}
|
|
63708
63846
|
|
|
@@ -63763,6 +63901,8 @@ class Scap {
|
|
|
63763
63901
|
async retrieveScap(snp, bInteraction, bPdb) { let ic = this.icn3d, me = ic.icn3dui;
|
|
63764
63902
|
let thisClass = this;
|
|
63765
63903
|
|
|
63904
|
+
ic.bScap = true;
|
|
63905
|
+
|
|
63766
63906
|
//snp: 6M0J_E_484_K,6M0J_E_501_Y,6M0J_E_417_N
|
|
63767
63907
|
let snpStr = '';
|
|
63768
63908
|
let snpArray = snp.split(','); //stru_chain_resi_snp
|
|
@@ -71686,7 +71826,7 @@ class iCn3DUI {
|
|
|
71686
71826
|
//even when multiple iCn3D viewers are shown together.
|
|
71687
71827
|
this.pre = this.cfg.divid + "_";
|
|
71688
71828
|
|
|
71689
|
-
this.REVISION = '3.25.
|
|
71829
|
+
this.REVISION = '3.25.3';
|
|
71690
71830
|
|
|
71691
71831
|
// In nodejs, iCn3D defines "window = {navigator: {}}"
|
|
71692
71832
|
this.bNode = (Object.keys(window).length < 2) ? true : false;
|