icn3d 3.25.13 → 3.25.15
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 +255 -133
- package/icn3d.min.js +2 -2
- package/icn3d.module.js +255 -133
- package/package.json +1 -1
package/icn3d.module.js
CHANGED
|
@@ -33064,7 +33064,7 @@ class Alternate {
|
|
|
33064
33064
|
|
|
33065
33065
|
ic.dAtoms = {};
|
|
33066
33066
|
|
|
33067
|
-
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';
|
|
33068
33068
|
|
|
33069
33069
|
for(let i = 0, il = moleculeArray.length; i < il; ++i) {
|
|
33070
33070
|
let structure = moleculeArray[i];
|
|
@@ -36693,7 +36693,12 @@ class AnnoCddSite {
|
|
|
36693
36693
|
|| (Object.keys(ic.structures).length == 2 && me.cfg.align) ) {
|
|
36694
36694
|
let data = {};
|
|
36695
36695
|
try {
|
|
36696
|
-
|
|
36696
|
+
if(me.bNode) {
|
|
36697
|
+
data = await me.getAjaxPromise(url, 'jsonp');
|
|
36698
|
+
}
|
|
36699
|
+
else {
|
|
36700
|
+
data.value = await me.getAjaxPromise(url, 'jsonp');
|
|
36701
|
+
}
|
|
36697
36702
|
|
|
36698
36703
|
thisClass.parseCddData([data], chnidArray);
|
|
36699
36704
|
/// if(ic.deferredAnnoCddSite !== undefined) ic.deferredAnnoCddSite.resolve();
|
|
@@ -36751,7 +36756,9 @@ class AnnoCddSite {
|
|
|
36751
36756
|
|
|
36752
36757
|
for(let i = 0, il = dataArray.length; i < il; ++i) {
|
|
36753
36758
|
//let data = (bSeq) ? dataArray[i][0] : dataArray[i];
|
|
36754
|
-
let data = dataArray[i].value;
|
|
36759
|
+
let data = (me.bNode) ? dataArray[i] : dataArray[i].value;
|
|
36760
|
+
|
|
36761
|
+
if(!data) continue;
|
|
36755
36762
|
|
|
36756
36763
|
for(let chainI = 0, chainLen = data.data.length; chainI < chainLen; ++chainI) {
|
|
36757
36764
|
let cddData = data.data[chainI];
|
|
@@ -39493,49 +39500,48 @@ class Domain3d {
|
|
|
39493
39500
|
let residueArray = Object.keys(residueHash);
|
|
39494
39501
|
let chnid = residueArray[0].substr(0, residueArray[0].lastIndexOf('_'));
|
|
39495
39502
|
|
|
39503
|
+
if(!ic.posid2resid) ic.posid2resid = {};
|
|
39504
|
+
|
|
39496
39505
|
let substructItem = {};
|
|
39497
39506
|
let pos2resi = {};
|
|
39498
39507
|
for(let i = 0; i < residueArray.length; ++i) {
|
|
39499
39508
|
let resid = residueArray[i];
|
|
39500
39509
|
|
|
39501
39510
|
let resi = resid.substr(resid.lastIndexOf('_') + 1);
|
|
39502
|
-
/*
|
|
39503
|
-
if(i == 0) {
|
|
39504
|
-
resiOffset = resi - 1;
|
|
39505
|
-
|
|
39506
|
-
for(let j = 0; j < resiOffset; ++j) {
|
|
39507
|
-
x0.push(undefined);
|
|
39508
|
-
y0.push(undefined);
|
|
39509
|
-
z0.push(undefined);
|
|
39510
|
-
}
|
|
39511
|
-
}
|
|
39512
|
-
*/
|
|
39513
39511
|
|
|
39514
39512
|
//let resid = chnid + "_" + resi;
|
|
39515
39513
|
let atom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid]);
|
|
39516
39514
|
|
|
39517
|
-
if(!atom) continue;
|
|
39518
|
-
/*
|
|
39519
39515
|
if(atom) {
|
|
39520
39516
|
x0.push(atom.coord.x);
|
|
39521
39517
|
y0.push(atom.coord.y);
|
|
39522
39518
|
z0.push(atom.coord.z);
|
|
39523
39519
|
}
|
|
39524
39520
|
else {
|
|
39525
|
-
x0.push(
|
|
39526
|
-
y0.push(
|
|
39527
|
-
z0.push(
|
|
39521
|
+
// x0.push(dummyCoord);
|
|
39522
|
+
// y0.push(dummyCoord);
|
|
39523
|
+
// z0.push(dummyCoord);
|
|
39524
|
+
|
|
39525
|
+
continue;
|
|
39528
39526
|
}
|
|
39529
|
-
|
|
39530
|
-
//if(!atom)
|
|
39531
|
-
|
|
39532
|
-
|
|
39533
|
-
|
|
39534
|
-
|
|
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
|
+
|
|
39535
39536
|
//resiArray.push(resi);
|
|
39536
39537
|
resiArray.push(i+1);
|
|
39537
39538
|
pos2resi[i+1] = resi;
|
|
39538
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
|
+
|
|
39539
39545
|
if(atom.ssend) {
|
|
39540
39546
|
//substructItem.To = parseInt(resi);
|
|
39541
39547
|
substructItem.To = i + 1;
|
|
@@ -39954,8 +39960,8 @@ class Domain3d {
|
|
|
39954
39960
|
ic.tddomains[domainName][resid] = 1;
|
|
39955
39961
|
}
|
|
39956
39962
|
}
|
|
39957
|
-
}
|
|
39958
|
-
|
|
39963
|
+
}
|
|
39964
|
+
|
|
39959
39965
|
return {subdomains: subdomains, substruct: substruct, pos2resi: pos2resi };
|
|
39960
39966
|
} // end c2b_NewSplitChain
|
|
39961
39967
|
|
|
@@ -39973,9 +39979,14 @@ class Domain3d {
|
|
|
39973
39979
|
//the whole structure is also considered as a large domain
|
|
39974
39980
|
//if(subdomains.length == 0) {
|
|
39975
39981
|
//subdomains.push([parseInt(ic.chainsSeq[chnid][0].resi), parseInt(ic.chainsSeq[chnid][ic.chainsSeq[chnid].length - 1].resi)]);
|
|
39976
|
-
|
|
39977
|
-
|
|
39978
|
-
|
|
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
|
+
//}
|
|
39979
39990
|
|
|
39980
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], ...]} ] }
|
|
39981
39992
|
let jsonStr = '{"data": [';
|
|
@@ -39995,6 +40006,10 @@ class Domain3d {
|
|
|
39995
40006
|
let from = pos2resi[substruct[k].From];
|
|
39996
40007
|
let to = pos2resi[substruct[k].To];
|
|
39997
40008
|
|
|
40009
|
+
// 1-based residue numbers
|
|
40010
|
+
let fromPos = substruct[k].From;
|
|
40011
|
+
let toPos = substruct[k].To;
|
|
40012
|
+
|
|
39998
40013
|
let residFrom = chnid + "_" + from;
|
|
39999
40014
|
let atomFrom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[residFrom]);
|
|
40000
40015
|
if(!atomFrom || !ic.hAtoms.hasOwnProperty(atomFrom.serial)) continue;
|
|
@@ -40003,9 +40018,9 @@ class Domain3d {
|
|
|
40003
40018
|
let atomTo = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[residTo]);
|
|
40004
40019
|
if(!atomTo || !ic.hAtoms.hasOwnProperty(atomTo.serial)) continue;
|
|
40005
40020
|
|
|
40006
|
-
if(
|
|
40021
|
+
if(fromPos >= start && toPos <= end) {
|
|
40007
40022
|
if(ssCnt > 0) jsonStr += ', ';
|
|
40008
|
-
jsonStr += '[' + sstype + ',' +
|
|
40023
|
+
jsonStr += '[' + sstype + ',' + fromPos + ',' + toPos + ',' + substruct[k].x1.toFixed(2) + ',' + substruct[k].y1.toFixed(2) + ','
|
|
40009
40024
|
+ substruct[k].z1.toFixed(2) + ',' + substruct[k].x2.toFixed(2) + ',' + substruct[k].y2.toFixed(2) + ',' + substruct[k].z2.toFixed(2) + ']';
|
|
40010
40025
|
++ssCnt;
|
|
40011
40026
|
}
|
|
@@ -40023,7 +40038,10 @@ class Domain3d {
|
|
|
40023
40038
|
for(let k = 0, kl = residueArray.length; k < kl; ++k) {
|
|
40024
40039
|
let resid = residueArray[k];
|
|
40025
40040
|
|
|
40026
|
-
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;
|
|
40027
40045
|
|
|
40028
40046
|
//let resid = chnid + "_" + resi;
|
|
40029
40047
|
let atom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid]);
|
|
@@ -40033,9 +40051,9 @@ class Domain3d {
|
|
|
40033
40051
|
|
|
40034
40052
|
//domain: resi, restype, x, y, z
|
|
40035
40053
|
let restype = me.parasCls.resn2restype[atom.resn];
|
|
40036
|
-
if(restype !== undefined &&
|
|
40054
|
+
if(restype !== undefined && pos >= start && pos <= end) {
|
|
40037
40055
|
if(domainCnt > 0) jsonStr += ', ';
|
|
40038
|
-
jsonStr += '[' +
|
|
40056
|
+
jsonStr += '[' + pos + ',' + restype + ',' + atom.coord.x.toFixed(2) + ','
|
|
40039
40057
|
+ atom.coord.y.toFixed(2) + ',' + atom.coord.z.toFixed(2) + ']';
|
|
40040
40058
|
++domainCnt;
|
|
40041
40059
|
}
|
|
@@ -40865,7 +40883,7 @@ class AddTrack {
|
|
|
40865
40883
|
let bUnion = false, bUpdateHighlight = true;
|
|
40866
40884
|
|
|
40867
40885
|
let strandCnt = 0, loopCnt = 0;
|
|
40868
|
-
let setName, currStrand, prevStrand, prevStrandReal, currType, prevType;
|
|
40886
|
+
let setName, currStrand, prevStrand, prevStrandReal = 'NT', currType, prevType;
|
|
40869
40887
|
|
|
40870
40888
|
// clear selection
|
|
40871
40889
|
ic.hAtoms = {};
|
|
@@ -40932,6 +40950,7 @@ class AddTrack {
|
|
|
40932
40950
|
}
|
|
40933
40951
|
else if(prevType == 'igloop') {
|
|
40934
40952
|
++loopCnt;
|
|
40953
|
+
currStrand = 'CT';
|
|
40935
40954
|
setName = 'Loop-' + prevStrandReal + '_' + currStrand + '-' + chainid + '-' + loopCnt.toString().padStart(3, '0');
|
|
40936
40955
|
setName = setName.replace(/'/g, '`');
|
|
40937
40956
|
if(type == 'igloop') ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
|
|
@@ -43230,6 +43249,8 @@ class ShowSeq {
|
|
|
43230
43249
|
// assign the adjusted reference numbers
|
|
43231
43250
|
ic.resid2refnum[residueid] = refnumLabel;
|
|
43232
43251
|
|
|
43252
|
+
refnumStr = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
|
|
43253
|
+
|
|
43233
43254
|
if(!ic.refnum2residArray.hasOwnProperty(refnumStr)) {
|
|
43234
43255
|
ic.refnum2residArray[refnumStr] = [residueid];
|
|
43235
43256
|
}
|
|
@@ -45411,7 +45432,8 @@ class GetGraph {
|
|
|
45411
45432
|
let complement = firstSetAtoms;
|
|
45412
45433
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
45413
45434
|
let bSaltbridge = false;
|
|
45414
|
-
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 );
|
|
45415
45437
|
resid2ResidhashHbond = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
45416
45438
|
}
|
|
45417
45439
|
|
|
@@ -45428,7 +45450,8 @@ class GetGraph {
|
|
|
45428
45450
|
let complement = firstSetAtoms;
|
|
45429
45451
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
45430
45452
|
let bSaltbridge = false;
|
|
45431
|
-
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 );
|
|
45432
45455
|
resid2Residhash = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
45433
45456
|
}
|
|
45434
45457
|
let ionicStr = this.getGraphLinks(resid2Residhash, resid2Residhash, me.htmlCls.ionicInsideColor, labelType, me.htmlCls.ionicInsideValue);
|
|
@@ -45441,19 +45464,22 @@ class GetGraph {
|
|
|
45441
45464
|
let halogenpiStr = '', threshold;
|
|
45442
45465
|
threshold = parseFloat($("#" + ic.pre + "halogenthreshold" ).val());
|
|
45443
45466
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
45444
|
-
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 );
|
|
45445
45469
|
resid2Residhash = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
45446
45470
|
}
|
|
45447
45471
|
halogenpiStr += this.getGraphLinks(resid2Residhash, resid2Residhash, me.htmlCls.halogenInsideColor, labelType, me.htmlCls.halogenInsideValue);
|
|
45448
45472
|
threshold = parseFloat($("#" + ic.pre + "picationthreshold" ).val());
|
|
45449
45473
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
45450
|
-
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 );
|
|
45451
45476
|
resid2Residhash = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
45452
45477
|
}
|
|
45453
45478
|
halogenpiStr += this.getGraphLinks(resid2Residhash, resid2Residhash, me.htmlCls.picationInsideColor, labelType, me.htmlCls.picationInsideValue);
|
|
45454
45479
|
threshold = parseFloat($("#" + ic.pre + "pistackingthreshold" ).val());
|
|
45455
45480
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
45456
|
-
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 );
|
|
45457
45483
|
resid2Residhash = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
45458
45484
|
}
|
|
45459
45485
|
halogenpiStr += this.getGraphLinks(resid2Residhash, resid2Residhash, me.htmlCls.pistackingInsideColor, labelType, me.htmlCls.pistackingInsideValue);
|
|
@@ -45611,6 +45637,15 @@ class ShowInter {
|
|
|
45611
45637
|
async showInteractions(type) { let ic = this.icn3d, me = ic.icn3dui;
|
|
45612
45638
|
let nameArray = $("#" + ic.pre + "atomsCustomHbond").val();
|
|
45613
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
|
+
|
|
45614
45649
|
if(nameArray2.length == 0) {
|
|
45615
45650
|
alert("Please select the first set");
|
|
45616
45651
|
}
|
|
@@ -45696,7 +45731,8 @@ class ShowInter {
|
|
|
45696
45731
|
ic.firstAtomObjCls.getFirstAtomObj(firstSetAtoms);
|
|
45697
45732
|
|
|
45698
45733
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
45699
|
-
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 );
|
|
45700
45736
|
let commanddesc;
|
|
45701
45737
|
if(bSaltbridge) {
|
|
45702
45738
|
ic.resid2ResidhashSaltbridge = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
@@ -45823,7 +45859,8 @@ class ShowInter {
|
|
|
45823
45859
|
complement = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
|
|
45824
45860
|
ic.firstAtomObjCls.getFirstAtomObj(firstSetAtoms);
|
|
45825
45861
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
45826
|
-
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 );
|
|
45827
45864
|
let commanddesc;
|
|
45828
45865
|
ic.resid2ResidhashSaltbridge = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
45829
45866
|
commanddesc = 'all atoms that have ionic interactions with the selected atoms';
|
|
@@ -45858,7 +45895,8 @@ class ShowInter {
|
|
|
45858
45895
|
complement = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
|
|
45859
45896
|
ic.firstAtomObjCls.getFirstAtomObj(firstSetAtoms);
|
|
45860
45897
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
45861
|
-
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 );
|
|
45862
45900
|
let commanddesc;
|
|
45863
45901
|
if(interactionType == 'halogen') {
|
|
45864
45902
|
ic.resid2ResidhashHalogen = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
@@ -45983,7 +46021,8 @@ class ShowInter {
|
|
|
45983
46021
|
pickCustomSphere_base(radius, atomlistTarget, otherAtoms, bSphereCalc, bInteraction, type, select, bGetPairs, bIncludeTarget) { let ic = this.icn3d, me = ic.icn3dui; // ic.pAtom is set already
|
|
45984
46022
|
let atoms;
|
|
45985
46023
|
if(bInteraction) {
|
|
45986
|
-
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);
|
|
45987
46026
|
ic.resid2ResidhashInteractions = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
45988
46027
|
}
|
|
45989
46028
|
else {
|
|
@@ -47694,8 +47733,8 @@ class AlignParser {
|
|
|
47694
47733
|
let dataArray = await allPromise;
|
|
47695
47734
|
|
|
47696
47735
|
let data2 = data;
|
|
47697
|
-
let data3 = dataArray[0].value; //v3[0];
|
|
47698
|
-
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];
|
|
47699
47738
|
|
|
47700
47739
|
if(data3.atoms !== undefined && data4.atoms !== undefined) {
|
|
47701
47740
|
// ic.deferredOpm = $.Deferred(function() {
|
|
@@ -47857,7 +47896,7 @@ class AlignParser {
|
|
|
47857
47896
|
|
|
47858
47897
|
let bFound = false;
|
|
47859
47898
|
for(let i = 0, il = dataArray.length; i < il; ++i) {
|
|
47860
|
-
let opmdata = dataArray[i].value;
|
|
47899
|
+
let opmdata = (me.bNode) ? dataArray[i] : dataArray[i].value;
|
|
47861
47900
|
|
|
47862
47901
|
if(!opmdata) continue;
|
|
47863
47902
|
|
|
@@ -48017,7 +48056,7 @@ class ChainalignParser {
|
|
|
48017
48056
|
|
|
48018
48057
|
// modify the previous trans and rotation matrix
|
|
48019
48058
|
for(let i = 0, il = dataArray.length; i < il; ++i) {
|
|
48020
|
-
let align = dataArray[i].value;//[0];
|
|
48059
|
+
let align = (me.bNode) ? dataArray[i] : dataArray[i].value;//[0];
|
|
48021
48060
|
|
|
48022
48061
|
let mmdbid_q = struArray[i];
|
|
48023
48062
|
let index = indexArray[i];
|
|
@@ -48095,7 +48134,7 @@ class ChainalignParser {
|
|
|
48095
48134
|
return hAtomsAll;
|
|
48096
48135
|
}
|
|
48097
48136
|
|
|
48098
|
-
downloadChainalignmentPart2bRealign(dataArray, chainidPairArray) { let ic = this.icn3d, me = ic.icn3dui;
|
|
48137
|
+
downloadChainalignmentPart2bRealign(dataArray, chainidPairArray, bReverse) { let ic = this.icn3d, me = ic.icn3dui;
|
|
48099
48138
|
// set trans and rotation matrix
|
|
48100
48139
|
ic.t_trans_add = [];
|
|
48101
48140
|
ic.q_trans_sub = [];
|
|
@@ -48109,7 +48148,7 @@ class ChainalignParser {
|
|
|
48109
48148
|
|
|
48110
48149
|
let bFoundAlignment = false;
|
|
48111
48150
|
for(let i = 0, il = dataArray.length; i < il; ++i) {
|
|
48112
|
-
let align = dataArray[i].value;//[0];
|
|
48151
|
+
let align = (me.bNode) ? dataArray[i] : dataArray[i].value;//[0];
|
|
48113
48152
|
|
|
48114
48153
|
let bEqualMmdbid = false;
|
|
48115
48154
|
let bEqualChain = false;
|
|
@@ -48137,9 +48176,16 @@ class ChainalignParser {
|
|
|
48137
48176
|
}
|
|
48138
48177
|
|
|
48139
48178
|
if(!bFoundAlignment) {
|
|
48140
|
-
|
|
48141
|
-
if(
|
|
48142
|
-
|
|
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
|
+
}
|
|
48143
48189
|
}
|
|
48144
48190
|
|
|
48145
48191
|
// find the max aligned mmdbid as mmdbid_t
|
|
@@ -48494,7 +48540,7 @@ class ChainalignParser {
|
|
|
48494
48540
|
// Each argument is an array with the following structure: [ data, statusText, jqXHR ]
|
|
48495
48541
|
//var data2 = v2[0];
|
|
48496
48542
|
// index = 0: the mmdb data of target
|
|
48497
|
-
let targetData = dataArray[0].value; //[0];
|
|
48543
|
+
let targetData = (me.bNode) ? dataArray[0] : dataArray[0].value; //[0];
|
|
48498
48544
|
let header = 'HEADER ' + mmdbid_t + '\n';
|
|
48499
48545
|
if(isNaN(mmdbid_t) && mmdbid_t.length > 5) targetData = header + targetData;
|
|
48500
48546
|
|
|
@@ -48512,7 +48558,7 @@ class ChainalignParser {
|
|
|
48512
48558
|
let queryDataArray = [];
|
|
48513
48559
|
|
|
48514
48560
|
for(let index = 1, indexl = chainidArray.length; index < indexl; ++index) {
|
|
48515
|
-
let queryData = dataArray[index].value;//[0];
|
|
48561
|
+
let queryData = (me.bNode) ? dataArray[index] : dataArray[index].value;//[0];
|
|
48516
48562
|
|
|
48517
48563
|
let pos = chainidArray[index].indexOf('_');
|
|
48518
48564
|
let mmdbid_q = chainidArray[index].substr(0, pos).toUpperCase();
|
|
@@ -48558,7 +48604,7 @@ class ChainalignParser {
|
|
|
48558
48604
|
ic.qt_start_end[index-1] = undefined;
|
|
48559
48605
|
}
|
|
48560
48606
|
else {
|
|
48561
|
-
let align = dataArray[index2 - missedChainCnt].value;//[0];
|
|
48607
|
+
let align = (me.bNode) ? dataArray[index2 - missedChainCnt] : dataArray[index2 - missedChainCnt].value;//[0];
|
|
48562
48608
|
|
|
48563
48609
|
let bEqualMmdbid = (mmdbid_q == mmdbid_t);
|
|
48564
48610
|
let bEqualChain = (chain_q == chain_t);
|
|
@@ -48776,7 +48822,7 @@ class ChainalignParser {
|
|
|
48776
48822
|
|
|
48777
48823
|
let queryDataArray = [];
|
|
48778
48824
|
for(let index = 0, indexl = structArray.length; index < indexl; ++index) {
|
|
48779
|
-
let queryData = dataArray[index].value;//[0];
|
|
48825
|
+
let queryData = (me.bNode) ? dataArray[index] : dataArray[index].value;//[0];
|
|
48780
48826
|
let header = 'HEADER ' + structArray[index] + '\n';
|
|
48781
48827
|
if(isNaN(structArray[index]) && structArray[index].length > 5) queryData = header + queryData;
|
|
48782
48828
|
|
|
@@ -51228,7 +51274,7 @@ class RealignParser {
|
|
|
51228
51274
|
//var data2 = v2[0];
|
|
51229
51275
|
for(let index = 0, indexl = dataArray.length; index < indexl; ++index) {
|
|
51230
51276
|
// for(let index = 1, indexl = dataArray.length; index < indexl; ++index) {
|
|
51231
|
-
let data = dataArray[index].value;//[0];
|
|
51277
|
+
let data = (me.bNode) ? dataArray[index] : dataArray[index].value;//[0];
|
|
51232
51278
|
if(!data) continue;
|
|
51233
51279
|
|
|
51234
51280
|
let fromStruct = chainidArray[index + 1].substr(0, chainidArray[index + 1].indexOf('_')); //.toUpperCase();
|
|
@@ -51411,7 +51457,7 @@ class RealignParser {
|
|
|
51411
51457
|
await this.realignChainOnSeqAlign(undefined, chainidArray, bRealign);
|
|
51412
51458
|
}
|
|
51413
51459
|
|
|
51414
|
-
async realignOnStructAlign() { let ic = this.icn3d, me = ic.icn3dui;
|
|
51460
|
+
async realignOnStructAlign(bReverse) { let ic = this.icn3d, me = ic.icn3dui;
|
|
51415
51461
|
// each 3D domain should have at least 3 secondary structures
|
|
51416
51462
|
let minSseCnt = (me.cfg.aligntool != 'tmalign') ? 3 : 0;
|
|
51417
51463
|
let struct2domain = {};
|
|
@@ -51438,6 +51484,8 @@ class RealignParser {
|
|
|
51438
51484
|
|
|
51439
51485
|
//let cnt = 0;
|
|
51440
51486
|
let structArray = Object.keys(struct2domain);
|
|
51487
|
+
if(bReverse) structArray = structArray.reverse();
|
|
51488
|
+
|
|
51441
51489
|
for(let s = 0, sl = structArray.length; s < sl; ++s) {
|
|
51442
51490
|
let struct1 = structArray[s];
|
|
51443
51491
|
let chainidArray1 = Object.keys(struct2domain[struct1]);
|
|
@@ -51481,14 +51529,14 @@ class RealignParser {
|
|
|
51481
51529
|
}
|
|
51482
51530
|
|
|
51483
51531
|
let allPromise = Promise.allSettled(ajaxArray);
|
|
51484
|
-
try {
|
|
51532
|
+
// try {
|
|
51485
51533
|
let dataArray = await allPromise;
|
|
51486
51534
|
ic.qt_start_end = []; // reset the alignment
|
|
51487
|
-
await ic.chainalignParserCls.downloadChainalignmentPart2bRealign(dataArray, chainidPairArray);
|
|
51488
|
-
}
|
|
51489
|
-
catch(err) {
|
|
51490
|
-
|
|
51491
|
-
}
|
|
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
|
+
// }
|
|
51492
51540
|
}
|
|
51493
51541
|
|
|
51494
51542
|
async realignOnStructAlignMsa(nameArray) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -51550,7 +51598,7 @@ class RealignParser {
|
|
|
51550
51598
|
}
|
|
51551
51599
|
|
|
51552
51600
|
let allPromise = Promise.allSettled(ajaxArray);
|
|
51553
|
-
try {
|
|
51601
|
+
// try {
|
|
51554
51602
|
let dataArray = await allPromise;
|
|
51555
51603
|
|
|
51556
51604
|
// set trans and rotation matrix
|
|
@@ -51564,10 +51612,10 @@ class RealignParser {
|
|
|
51564
51612
|
|
|
51565
51613
|
await ic.chainalignParserCls.downloadChainalignmentPart2b(undefined, nameArray, undefined, dataArray,
|
|
51566
51614
|
indexArray, struct1, struArray);
|
|
51567
|
-
}
|
|
51568
|
-
catch(err) {
|
|
51569
|
-
|
|
51570
|
-
}
|
|
51615
|
+
// }
|
|
51616
|
+
// catch(err) {
|
|
51617
|
+
// if(ic.bRender) alert("These structures can NOT be aligned to each other...");
|
|
51618
|
+
// }
|
|
51571
51619
|
}
|
|
51572
51620
|
|
|
51573
51621
|
async realignChainOnSeqAlign(chainresiCalphaHash2, chainidArray, bRealign, bPredefined) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -53076,12 +53124,14 @@ class ParserUtils {
|
|
|
53076
53124
|
let allPromise = Promise.allSettled([prms1, prms2]);
|
|
53077
53125
|
let dataArray = await allPromise;
|
|
53078
53126
|
|
|
53127
|
+
// ic.interactionData1 = (me.bNode) ? dataArray[0] : dataArray[0].value;
|
|
53079
53128
|
ic.interactionData1 = dataArray[0].value;
|
|
53080
53129
|
ic.html2ddgm = '';
|
|
53081
53130
|
ic.diagram2dCls.draw2Ddgm(ic.interactionData1, mmdbid1, 0);
|
|
53082
53131
|
if(me.cfg.show2d) me.htmlCls.dialogCls.openDlg('dl_2ddgm', 'Interactions');
|
|
53083
53132
|
|
|
53084
53133
|
|
|
53134
|
+
// ic.interactionData2 = (me.bNode) ? dataArray[1] : dataArray[1].value;
|
|
53085
53135
|
ic.interactionData2 = dataArray[1].value;
|
|
53086
53136
|
ic.diagram2dCls.draw2Ddgm(ic.interactionData2, mmdbid2, 1);
|
|
53087
53137
|
|
|
@@ -53130,6 +53180,7 @@ class ParserUtils {
|
|
|
53130
53180
|
// Each argument is an array with the following structure: [ data, statusText, jqXHR ]
|
|
53131
53181
|
//var data2 = v2[0];
|
|
53132
53182
|
for(let index = 0, indexl = chainidArray.length; index < indexl; ++index) {
|
|
53183
|
+
// let data = (me.bNode) ? dataArray[index] : dataArray[index].value;//[0];
|
|
53133
53184
|
let data = dataArray[index].value;//[0];
|
|
53134
53185
|
let mmdbid = chainidArray[index].substr(0, chainidArray[index].indexOf('_'));
|
|
53135
53186
|
|
|
@@ -54743,7 +54794,8 @@ class SetSeqAlign {
|
|
|
54743
54794
|
return pos;
|
|
54744
54795
|
}
|
|
54745
54796
|
|
|
54746
|
-
getResnFromResi(chainid, resi) { let ic = this.icn3d
|
|
54797
|
+
getResnFromResi(chainid, resi) { let ic = this.icn3d; ic.icn3dui;
|
|
54798
|
+
/*
|
|
54747
54799
|
let pos = this.getPosFromResi(chainid, resi);
|
|
54748
54800
|
if(!pos) return '?';
|
|
54749
54801
|
|
|
@@ -54758,6 +54810,28 @@ class SetSeqAlign {
|
|
|
54758
54810
|
}
|
|
54759
54811
|
|
|
54760
54812
|
return resn;
|
|
54813
|
+
*/
|
|
54814
|
+
|
|
54815
|
+
let resid = chainid + '_' + resi;
|
|
54816
|
+
return ic.residueId2Name[resid];
|
|
54817
|
+
}
|
|
54818
|
+
|
|
54819
|
+
getResiAferAlign(chainid, bRealign, pos) { let ic = this.icn3d, me = ic.icn3dui;
|
|
54820
|
+
let resi;
|
|
54821
|
+
if(bRealign && me.cfg.aligntool == 'tmalign') {
|
|
54822
|
+
resi = pos;
|
|
54823
|
+
}
|
|
54824
|
+
else {
|
|
54825
|
+
if(ic.posid2resid) {
|
|
54826
|
+
let resid = ic.posid2resid[chainid + '_' + pos];
|
|
54827
|
+
resi = resid.substr(resid.lastIndexOf('_') + 1);
|
|
54828
|
+
}
|
|
54829
|
+
else {
|
|
54830
|
+
resi = ic.chainsSeq[chainid][pos].resi;
|
|
54831
|
+
}
|
|
54832
|
+
}
|
|
54833
|
+
|
|
54834
|
+
return resi;
|
|
54761
54835
|
}
|
|
54762
54836
|
|
|
54763
54837
|
setSeqAlignChain(chainid, chainIndex, chainidArray) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -54865,12 +54939,10 @@ class SetSeqAlign {
|
|
|
54865
54939
|
if(!ic.chainsMapping[chainid2]) ic.chainsMapping[chainid2] = {};
|
|
54866
54940
|
|
|
54867
54941
|
let posChain1 = {}, posChain2 = {};
|
|
54868
|
-
console.log("###bRealign: " + bRealign);
|
|
54869
|
-
console.log(ic.qt_start_end[chainIndex]);
|
|
54870
54942
|
|
|
54871
54943
|
for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
|
|
54872
54944
|
let start1, start2, end1, end2;
|
|
54873
|
-
if(bRealign) { // real residue numbers are stored, could be "100a"
|
|
54945
|
+
if(bRealign && me.cfg.aligntool == 'tmalign') { // real residue numbers are stored, could be "100a"
|
|
54874
54946
|
start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start);
|
|
54875
54947
|
start2 = parseInt(ic.qt_start_end[chainIndex][i].q_start);
|
|
54876
54948
|
end1 = parseInt(ic.qt_start_end[chainIndex][i].t_end);
|
|
@@ -54892,7 +54964,7 @@ console.log("###bRealign: " + bRealign);
|
|
|
54892
54964
|
|
|
54893
54965
|
for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
|
|
54894
54966
|
let start1, start2, end1, end2;
|
|
54895
|
-
if(bRealign) { // real residue numbers are stored
|
|
54967
|
+
if(bRealign && me.cfg.aligntool == 'tmalign') { // real residue numbers are stored
|
|
54896
54968
|
start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start);
|
|
54897
54969
|
start2 = parseInt(ic.qt_start_end[chainIndex][i].q_start);
|
|
54898
54970
|
end1 = parseInt(ic.qt_start_end[chainIndex][i].t_end);
|
|
@@ -54914,8 +54986,9 @@ console.log("###bRealign: " + bRealign);
|
|
|
54914
54986
|
|
|
54915
54987
|
if(ic.chainsSeq[chainid1] === undefined || ic.chainsSeq[chainid1][j] === undefined) break;
|
|
54916
54988
|
|
|
54917
|
-
let resi = (bRealign
|
|
54918
|
-
let resn = (bRealign) ? this.getResnFromResi(chainid1, j).toLowerCase() : ic.chainsSeq[chainid1][j].name.toLowerCase();
|
|
54989
|
+
let resi = this.getResiAferAlign(chainid1, bRealign, j + 1);
|
|
54990
|
+
// let resn = (bRealign && me.cfg.aligntool == 'tmalign') ? this.getResnFromResi(chainid1, j).toLowerCase() : ic.chainsSeq[chainid1][j].name.toLowerCase();
|
|
54991
|
+
let resn = this.getResnFromResi(chainid1, resi).toLowerCase();
|
|
54919
54992
|
|
|
54920
54993
|
if(resn == '?') continue;
|
|
54921
54994
|
|
|
@@ -54933,11 +55006,11 @@ console.log("###bRealign: " + bRealign);
|
|
|
54933
55006
|
posChain2[j] = 1;
|
|
54934
55007
|
|
|
54935
55008
|
if(ic.chainsSeq[chainid2] === undefined || ic.chainsSeq[chainid2] === undefined) break;
|
|
54936
|
-
|
|
54937
|
-
|
|
54938
|
-
//let resn = ic.chainsSeq[chainid2][j].name.toLowerCase();
|
|
54939
|
-
let
|
|
54940
|
-
|
|
55009
|
+
|
|
55010
|
+
let resi = this.getResiAferAlign(chainid2, bRealign, j + 1);
|
|
55011
|
+
// let resn = (bRealign && me.cfg.aligntool == 'tmalign') ? this.getResnFromResi(chainid2, j).toLowerCase() : ic.chainsSeq[chainid2][j].name.toLowerCase();
|
|
55012
|
+
let resn = this.getResnFromResi(chainid2, resi).toLowerCase();
|
|
55013
|
+
|
|
54941
55014
|
|
|
54942
55015
|
if(resn == '?') continue;
|
|
54943
55016
|
|
|
@@ -54981,6 +55054,7 @@ console.log("###bRealign: " + bRealign);
|
|
|
54981
55054
|
if(ic.chainsSeq[chainid1] === undefined || ic.chainsSeq[chainid2] === undefined) break;
|
|
54982
55055
|
|
|
54983
55056
|
let resi1, resi2, resn1, resn2;
|
|
55057
|
+
/*
|
|
54984
55058
|
if(bRealign) { // tmalign: just one residue in this for loop
|
|
54985
55059
|
if(me.cfg.aligntool == 'tmalign') {
|
|
54986
55060
|
resi1 = ic.qt_start_end[chainIndex][i].t_start;
|
|
@@ -54994,15 +55068,30 @@ console.log("###bRealign: " + bRealign);
|
|
|
54994
55068
|
resn1 = this.getResnFromResi(chainid1, resi1).toUpperCase();
|
|
54995
55069
|
resn2 = this.getResnFromResi(chainid2, resi2).toUpperCase();
|
|
54996
55070
|
|
|
55071
|
+
if(resn1 == '?' || resn2 == '?') continue;
|
|
55072
|
+
}
|
|
55073
|
+
*/
|
|
55074
|
+
if(bRealign && me.cfg.aligntool == 'tmalign') { // tmalign: just one residue in this for loop
|
|
55075
|
+
resi1 = ic.qt_start_end[chainIndex][i].t_start;
|
|
55076
|
+
resi2 = ic.qt_start_end[chainIndex][i].q_start;
|
|
55077
|
+
|
|
55078
|
+
resn1 = this.getResnFromResi(chainid1, resi1).toUpperCase();
|
|
55079
|
+
resn2 = this.getResnFromResi(chainid2, resi2).toUpperCase();
|
|
55080
|
+
|
|
54997
55081
|
if(resn1 == '?' || resn2 == '?') continue;
|
|
54998
55082
|
}
|
|
54999
55083
|
else {
|
|
55000
55084
|
if(ic.chainsSeq[chainid1][j + start1] === undefined || ic.chainsSeq[chainid2][j + start2] === undefined) continue;
|
|
55001
55085
|
|
|
55002
|
-
resi1 = ic.chainsSeq[chainid1][j + start1].resi;
|
|
55003
|
-
resi2 = ic.chainsSeq[chainid2][j + start2].resi;
|
|
55004
|
-
resn1 = ic.chainsSeq[chainid1][j + start1].name.toUpperCase();
|
|
55005
|
-
resn2 = ic.chainsSeq[chainid2][j + start2].name.toUpperCase();
|
|
55086
|
+
// resi1 = ic.chainsSeq[chainid1][j + start1].resi;
|
|
55087
|
+
// resi2 = ic.chainsSeq[chainid2][j + start2].resi;
|
|
55088
|
+
// resn1 = ic.chainsSeq[chainid1][j + start1].name.toUpperCase();
|
|
55089
|
+
// resn2 = ic.chainsSeq[chainid2][j + start2].name.toUpperCase();
|
|
55090
|
+
|
|
55091
|
+
resi1 = this.getResiAferAlign(chainid1, bRealign, j + start1 + 1);
|
|
55092
|
+
resi2 = this.getResiAferAlign(chainid2, bRealign, j + start2 + 1);
|
|
55093
|
+
resn1 = this.getResnFromResi(chainid1, resi1).toUpperCase();
|
|
55094
|
+
resn2 = this.getResnFromResi(chainid2, resi2).toUpperCase();
|
|
55006
55095
|
}
|
|
55007
55096
|
|
|
55008
55097
|
if(resn1 === resn2) {
|
|
@@ -55305,9 +55394,9 @@ console.log("###bRealign: " + bRealign);
|
|
|
55305
55394
|
return resn;
|
|
55306
55395
|
}
|
|
55307
55396
|
|
|
55308
|
-
getResnFromResid(resid) { let ic = this.icn3d
|
|
55309
|
-
|
|
55310
|
-
}
|
|
55397
|
+
// getResnFromResid(resid) { let ic = this.icn3d, me = ic.icn3dui;
|
|
55398
|
+
// return ic.residueId2Name[resid];
|
|
55399
|
+
// }
|
|
55311
55400
|
|
|
55312
55401
|
getResiPosInTemplate(chainid1, resi_t) { let ic = this.icn3d; ic.icn3dui;
|
|
55313
55402
|
// check the number of gaps before resiStart1 (nGap), and insert 'notAlnLen2 - notAlnLen1 - nGap' gaps
|
|
@@ -55436,7 +55525,7 @@ console.log("###bRealign: " + bRealign);
|
|
|
55436
55525
|
|
|
55437
55526
|
for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
|
|
55438
55527
|
let start1, start2, end1, end2, resiStart1, start1Pos, end1Pos;
|
|
55439
|
-
if(bRealign) { // real residue numbers are stored
|
|
55528
|
+
if(bRealign && me.cfg.aligntool == 'tmalign') { // real residue numbers are stored
|
|
55440
55529
|
start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start);
|
|
55441
55530
|
start2 = parseInt(ic.qt_start_end[chainIndex][i].q_start);
|
|
55442
55531
|
end1 = parseInt(ic.qt_start_end[chainIndex][i].t_end);
|
|
@@ -55520,8 +55609,8 @@ console.log("###bRealign: " + bRealign);
|
|
|
55520
55609
|
else {
|
|
55521
55610
|
let resi1 = (bRealign) ? start1 + k : ic.ParserUtilsCls.getResi(chainid1, start1 + k);
|
|
55522
55611
|
let resi2 = (bRealign) ? start2 + k : ic.ParserUtilsCls.getResi(chainid2, start2 + k);
|
|
55523
|
-
let resn1 = this.
|
|
55524
|
-
let resn2 = this.
|
|
55612
|
+
let resn1 = this.getResnFromResi(chainid1, resi1); //this.getResn(chainid1, start1 + k);
|
|
55613
|
+
let resn2 = this.getResnFromResi(chainid2, resi2); //this.getResn(chainid2, start2 + k);
|
|
55525
55614
|
|
|
55526
55615
|
let bAlign = true;
|
|
55527
55616
|
let resObject = this.getResObject(chainid2, false, bAlign, resi2, resn2, resn1);
|
|
@@ -56784,6 +56873,7 @@ class Vastplus {
|
|
|
56784
56873
|
|
|
56785
56874
|
let queryDataArray = [];
|
|
56786
56875
|
for(let index = 0, indexl = chainidpairArray.length; index < indexl; ++index) {
|
|
56876
|
+
// let queryData = (me.bNode) ? dataArray[index] : dataArray[index].value; //[0];
|
|
56787
56877
|
let queryData = dataArray[index].value; //[0];
|
|
56788
56878
|
|
|
56789
56879
|
queryDataArray.push(queryData);
|
|
@@ -60940,7 +61030,7 @@ class SelectByCommand {
|
|
|
60940
61030
|
let residArray = [];
|
|
60941
61031
|
|
|
60942
61032
|
if(bRefnum) {
|
|
60943
|
-
let residArrayTmp = (ic.refnum2residArray[k]) ? ic.refnum2residArray[k] : [];
|
|
61033
|
+
let residArrayTmp = (ic.refnum2residArray[k.toString()]) ? ic.refnum2residArray[k.toString()] : [];
|
|
60944
61034
|
for(let m = 0, ml = residArrayTmp.length; m < ml; ++m) {
|
|
60945
61035
|
let residueId = residArrayTmp[m];
|
|
60946
61036
|
if(residueId.substr(0, residueId.lastIndexOf('_')) == molecule_chain) {
|
|
@@ -62998,14 +63088,14 @@ class Dssp {
|
|
|
62998
63088
|
}
|
|
62999
63089
|
}
|
|
63000
63090
|
|
|
63001
|
-
async parseDsspData(dataArray, struArray, bAppend) { let ic = this.icn3d
|
|
63091
|
+
async parseDsspData(dataArray, struArray, bAppend) { let ic = this.icn3d, me = ic.icn3dui;
|
|
63002
63092
|
//var dataArray =(struArray.length == 1) ? [data] : data;
|
|
63003
63093
|
|
|
63004
63094
|
// Each argument is an array with the following structure: [ data, statusText, jqXHR ]
|
|
63005
63095
|
//var data2 = v2[0];
|
|
63006
63096
|
for(let index = 0, indexl = dataArray.length; index < indexl; ++index) {
|
|
63007
63097
|
//let ssHash = dataArray[index][0];
|
|
63008
|
-
let ssHash = dataArray[index].value;
|
|
63098
|
+
let ssHash = (me.bNode) ? dataArray[index] : dataArray[index].value;
|
|
63009
63099
|
|
|
63010
63100
|
if(ssHash !== undefined && JSON.stringify(ssHash).indexOf('Oops there was a problem') === -1) {
|
|
63011
63101
|
for(let chainNum in ic.chainsSeq) {
|
|
@@ -63131,8 +63221,19 @@ class Dssp {
|
|
|
63131
63221
|
ic.bShowRefnum = false;
|
|
63132
63222
|
|
|
63133
63223
|
ic.hAtoms = {};
|
|
63134
|
-
ic.bResetAnno = true;
|
|
63135
|
-
|
|
63224
|
+
//ic.bResetAnno = true;
|
|
63225
|
+
|
|
63226
|
+
// await ic.showAnnoCls.showAnnotations();
|
|
63227
|
+
if(ic.bAnnoShown) {
|
|
63228
|
+
for(let chain in ic.protein_chainid) {
|
|
63229
|
+
let chainidBase = ic.protein_chainid[chain];
|
|
63230
|
+
ic.showSeqCls.showSeq(chain, chainidBase, 'protein');
|
|
63231
|
+
}
|
|
63232
|
+
}
|
|
63233
|
+
else {
|
|
63234
|
+
await ic.showAnnoCls.showAnnotations();
|
|
63235
|
+
}
|
|
63236
|
+
|
|
63136
63237
|
ic.hlUpdateCls.updateHlAll();
|
|
63137
63238
|
}
|
|
63138
63239
|
|
|
@@ -63169,7 +63270,7 @@ class Dssp {
|
|
|
63169
63270
|
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'];
|
|
63170
63271
|
|
|
63171
63272
|
// round 2
|
|
63172
|
-
ic.refpdbHash = {};
|
|
63273
|
+
ic.refpdbHash = {};
|
|
63173
63274
|
ic.refpdbHash['NaCaExchanger_2fwuA_dog_n2'] = ['NaCaExchanger_2fwuA_dog_n2', 'ORF7a_1xakA_virus', 'ECadherin_4zt1A_human_n2', 'NaKATPaseTransporterBeta_2zxeB_spurdogshark'];
|
|
63174
63275
|
ic.refpdbHash['C3_2qkiD_human_n1'] = ['C3_2qkiD_human_n1', 'RBPJ_6py8C_human_Unk-n1', 'BArrestin1_4jqiA_rat_n1'];
|
|
63175
63276
|
ic.refpdbHash['Siglec3_5j0bB_human_C2-n2'] = ['Siglec3_5j0bB_human_C2-n2', 'CD2_1hnfA_human_C2-n2', 'GHR_1axiB_human_FN3-n1'];
|
|
@@ -63358,15 +63459,16 @@ class Dssp {
|
|
|
63358
63459
|
domainAtomsArray.push(domainAtoms);
|
|
63359
63460
|
}
|
|
63360
63461
|
}
|
|
63361
|
-
|
|
63462
|
+
|
|
63362
63463
|
for(let k = 0, kl = domainAtomsArray.length; k < kl; ++k) {
|
|
63363
63464
|
let pdb_target = ic.saveFileCls.getAtomPDB(domainAtomsArray[k], undefined, undefined, undefined, undefined, struct);
|
|
63364
|
-
|
|
63465
|
+
// ig strand for any subset will have the same k, use the number of residue to separate them
|
|
63466
|
+
let domainid = chainid + '-' + k + '_' + domainAtomsArray[k].length;
|
|
63365
63467
|
ic.domainid2pdb[domainid] = pdb_target;
|
|
63366
63468
|
|
|
63367
63469
|
for(let index = 0, indexl = dataArray.length; index < indexl; ++index) {
|
|
63368
63470
|
let struct2 = ic.defaultPdbId + index;
|
|
63369
|
-
let pdb_query = dataArray[index].value; //[0];
|
|
63471
|
+
let pdb_query = (me.bNode) ? dataArray[index] : dataArray[index].value; //[0];
|
|
63370
63472
|
let header = 'HEADER ' + struct2 + '\n';
|
|
63371
63473
|
pdb_query = header + pdb_query;
|
|
63372
63474
|
|
|
@@ -63405,20 +63507,20 @@ console.log("###subdomains.length: " + subdomains.length + " domainAtomsArray.le
|
|
|
63405
63507
|
// find the best alignment for each chain
|
|
63406
63508
|
let domainid2score = {}, domainid2segs = {}, chainid2segs = {};
|
|
63407
63509
|
|
|
63408
|
-
|
|
63409
|
-
|
|
63410
|
-
|
|
63411
|
-
|
|
63510
|
+
if(!ic.chainid2refpdbname) ic.chainid2refpdbname = {};
|
|
63511
|
+
if(!ic.domainid2refpdbname) ic.domainid2refpdbname = {};
|
|
63512
|
+
if(!ic.domainid2ig2kabat) ic.domainid2ig2kabat = {};
|
|
63513
|
+
if(!ic.domainid2ig2imgt) ic.domainid2ig2imgt = {};
|
|
63412
63514
|
|
|
63413
|
-
ic.chainid2refpdbname = {};
|
|
63414
|
-
ic.domainid2refpdbname = {};
|
|
63415
|
-
ic.domainid2ig2kabat = {};
|
|
63416
|
-
ic.domainid2ig2imgt = {};
|
|
63515
|
+
// ic.chainid2refpdbname = {};
|
|
63516
|
+
// ic.domainid2refpdbname = {};
|
|
63517
|
+
// ic.domainid2ig2kabat = {};
|
|
63518
|
+
// ic.domainid2ig2imgt = {};
|
|
63417
63519
|
|
|
63418
63520
|
let minResidues = 20;
|
|
63419
63521
|
|
|
63420
63522
|
for(let i = 0, il = domainidpairArray.length; i < il; ++i) {
|
|
63421
|
-
let queryData = dataArray[i].value; //[0];
|
|
63523
|
+
let queryData = (me.bNode) ? dataArray[i] : dataArray[i].value; //[0];
|
|
63422
63524
|
|
|
63423
63525
|
if(!queryData) {
|
|
63424
63526
|
if(!me.bNode) console.log("The alignment data for " + domainidpairArray[i] + " is unavailable...");
|
|
@@ -63493,7 +63595,6 @@ console.log("###subdomains.length: " + subdomains.length + " domainAtomsArray.le
|
|
|
63493
63595
|
}
|
|
63494
63596
|
|
|
63495
63597
|
if(!ic.refpdbHash[refpdbname]) {
|
|
63496
|
-
console.log("### refpdbname: " + refpdbname);
|
|
63497
63598
|
continue;
|
|
63498
63599
|
}
|
|
63499
63600
|
|
|
@@ -63511,7 +63612,7 @@ console.log("###subdomains.length: " + subdomains.length + " domainAtomsArray.le
|
|
|
63511
63612
|
let pdb_target = ic.domainid2pdb[domainid];
|
|
63512
63613
|
for(let index = 0, indexl = ic.pdbDataArray.length; index < indexl; ++index) {
|
|
63513
63614
|
let struct2 = ic.defaultPdbId + index;
|
|
63514
|
-
let pdb_query = ic.pdbDataArray[index].value; //[0];
|
|
63615
|
+
let pdb_query = (me.bNode) ? ic.pdbDataArray[index] : ic.pdbDataArray[index].value; //[0];
|
|
63515
63616
|
let header = 'HEADER ' + struct2 + '\n';
|
|
63516
63617
|
pdb_query = header + pdb_query;
|
|
63517
63618
|
|
|
@@ -63608,8 +63709,17 @@ console.log("###subdomains.length: " + subdomains.length + " domainAtomsArray.le
|
|
|
63608
63709
|
|
|
63609
63710
|
// open sequence view
|
|
63610
63711
|
ic.hAtomsRefnum = {};
|
|
63611
|
-
ic.bResetAnno = true;
|
|
63612
|
-
|
|
63712
|
+
//ic.bResetAnno = true;
|
|
63713
|
+
if(ic.bAnnoShown) {
|
|
63714
|
+
for(let chain in ic.protein_chainid) {
|
|
63715
|
+
let chainidBase = ic.protein_chainid[chain];
|
|
63716
|
+
ic.showSeqCls.showSeq(chain, chainidBase, 'protein');
|
|
63717
|
+
}
|
|
63718
|
+
}
|
|
63719
|
+
else {
|
|
63720
|
+
await ic.showAnnoCls.showAnnotations();
|
|
63721
|
+
}
|
|
63722
|
+
|
|
63613
63723
|
ic.annotationCls.setAnnoViewAndDisplay('detailed view');
|
|
63614
63724
|
}
|
|
63615
63725
|
else {
|
|
@@ -63734,7 +63844,7 @@ console.log("###subdomains.length: " + subdomains.length + " domainAtomsArray.le
|
|
|
63734
63844
|
}
|
|
63735
63845
|
|
|
63736
63846
|
rmStrandFromRefnumlabel(refnumLabel) {
|
|
63737
|
-
return refnumLabel.replace(/'/g, '').replace(/\*/g, '').replace(/\^/g, '').replace(/\+/g, '').replace(/\-/g, '').substr(1); // C', C''
|
|
63847
|
+
return (!refnumLabel) ? refnumLabel : refnumLabel.replace(/'/g, '').replace(/\*/g, '').replace(/\^/g, '').replace(/\+/g, '').replace(/\-/g, '').substr(1); // C', C''
|
|
63738
63848
|
}
|
|
63739
63849
|
}
|
|
63740
63850
|
|
|
@@ -63795,6 +63905,8 @@ class Scap {
|
|
|
63795
63905
|
async retrieveScap(snp, bInteraction, bPdb) { let ic = this.icn3d, me = ic.icn3dui;
|
|
63796
63906
|
let thisClass = this;
|
|
63797
63907
|
|
|
63908
|
+
ic.bScap = true;
|
|
63909
|
+
|
|
63798
63910
|
//snp: 6M0J_E_484_K,6M0J_E_501_Y,6M0J_E_417_N
|
|
63799
63911
|
let snpStr = '';
|
|
63800
63912
|
let snpArray = snp.split(','); //stru_chain_resi_snp
|
|
@@ -71718,7 +71830,7 @@ class iCn3DUI {
|
|
|
71718
71830
|
//even when multiple iCn3D viewers are shown together.
|
|
71719
71831
|
this.pre = this.cfg.divid + "_";
|
|
71720
71832
|
|
|
71721
|
-
this.REVISION = '3.25.
|
|
71833
|
+
this.REVISION = '3.25.3';
|
|
71722
71834
|
|
|
71723
71835
|
// In nodejs, iCn3D defines "window = {navigator: {}}"
|
|
71724
71836
|
this.bNode = (Object.keys(window).length < 2) ? true : false;
|
|
@@ -72046,25 +72158,35 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
|
|
|
72046
72158
|
let data = await me.getAjaxPromise(url, 'json', false, 'The RID ' + me.cfg.rid + ' may have expired...');
|
|
72047
72159
|
|
|
72048
72160
|
for(let q = 0, ql = data.BlastOutput2.length; q < ql; ++q) {
|
|
72049
|
-
|
|
72050
|
-
let hitArray
|
|
72161
|
+
|
|
72162
|
+
let hitArray;
|
|
72163
|
+
if(data.BlastOutput2[q].report.results.iterations) { // psi-blast may have "iterations". Use the last iteration.
|
|
72164
|
+
let nIterations = data.BlastOutput2[q].report.results.iterations.length;
|
|
72165
|
+
if(data.BlastOutput2[q].report.results.iterations[nIterations - 1].search.query_id != me.cfg.query_id) continue;
|
|
72166
|
+
hitArray = data.BlastOutput2[q].report.results.iterations[nIterations - 1].search.hits;
|
|
72167
|
+
}
|
|
72168
|
+
else { // blastp may not have "iterations"
|
|
72169
|
+
if(data.BlastOutput2[q].report.results.search.query_id != me.cfg.query_id) continue;
|
|
72170
|
+
hitArray = data.BlastOutput2[q].report.results.search.hits;
|
|
72171
|
+
}
|
|
72172
|
+
|
|
72051
72173
|
let qseq = undefined;
|
|
72052
72174
|
for(let i = 0, il = hitArray.length; i < il; ++i) {
|
|
72053
|
-
|
|
72054
|
-
|
|
72055
|
-
|
|
72056
|
-
|
|
72057
|
-
|
|
72058
|
-
|
|
72059
|
-
|
|
72175
|
+
let hit = hitArray[i];
|
|
72176
|
+
let bFound = false;
|
|
72177
|
+
for(let j = 0, jl = hit.description.length; j < jl; ++j) {
|
|
72178
|
+
let acc = hit.description[j].accession;
|
|
72179
|
+
if(acc == me.cfg.blast_rep_id) {
|
|
72180
|
+
bFound = true;
|
|
72181
|
+
break;
|
|
72182
|
+
}
|
|
72183
|
+
}
|
|
72184
|
+
if(bFound) {
|
|
72185
|
+
qseq = hit.hsps[0].qseq;
|
|
72186
|
+
//remove gap '-'
|
|
72187
|
+
qseq = qseq.replace(/-/g, '');
|
|
72188
|
+
break;
|
|
72060
72189
|
}
|
|
72061
|
-
}
|
|
72062
|
-
if(bFound) {
|
|
72063
|
-
qseq = hit.hsps[0].qseq;
|
|
72064
|
-
//remove gap '-'
|
|
72065
|
-
qseq = qseq.replace(/-/g, '');
|
|
72066
|
-
break;
|
|
72067
|
-
}
|
|
72068
72190
|
}
|
|
72069
72191
|
if(qseq !== undefined) me.cfg.query_id = qseq;
|
|
72070
72192
|
ic.inputid = me.cfg.query_id + '_' + me.cfg.blast_rep_id;
|