icn3d 3.12.8 → 3.13.2
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/css/lib/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- package/css/lib/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- package/css/lib/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- package/css/lib/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- package/css/lib/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- package/css/lib/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- package/css/lib/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- package/css/lib/images/ui-icons_222222_256x240.png +0 -0
- package/css/lib/images/ui-icons_228ef1_256x240.png +0 -0
- package/css/lib/images/ui-icons_ef8c08_256x240.png +0 -0
- package/css/lib/images/ui-icons_ffd27a_256x240.png +0 -0
- package/css/lib/images/ui-icons_ffffff_256x240.png +0 -0
- package/icn3d.js +423 -128
- package/icn3d.min.js +1 -1
- package/icn3d.module.js +423 -128
- package/package.json +1 -1
package/icn3d.js
CHANGED
|
@@ -4227,7 +4227,11 @@ class UtilsCls {
|
|
|
4227
4227
|
let dz = atom0.coord.z - atom1.coord.z;
|
|
4228
4228
|
let distSq = dx*dx + dy*dy + dz*dz;
|
|
4229
4229
|
|
|
4230
|
-
|
|
4230
|
+
// r(N) = 0.71, r(H) = 0.31, N-H in residues are about 1.5
|
|
4231
|
+
// factor = (1.5 / 1.02) * (1.5 / 1.02) = 2.16
|
|
4232
|
+
let factor = ((atom0.elem == 'N' && atom1.elem.substr(0,1) == 'H') || (atom1.elem == 'N' && atom0.elem.substr(0,1) == 'H')) ? 2.2 : 1.3;
|
|
4233
|
+
|
|
4234
|
+
return distSq < factor * r * r;
|
|
4231
4235
|
}
|
|
4232
4236
|
|
|
4233
4237
|
//Convert a three-letter residue name to a one-letter residue abbreviation, e.g., 'LYS' to 'K', or ' A' to 'A' for nucleotides.
|
|
@@ -17450,7 +17454,7 @@ class ShowInter {
|
|
|
17450
17454
|
for(let j = 0, jl = ic.atoms[atom.serial].bonds.length; j < jl; ++j) {
|
|
17451
17455
|
let serial = ic.atoms[atom.serial].bonds[j];
|
|
17452
17456
|
//if(ic.atoms[serial].name === 'H') {
|
|
17453
|
-
if(
|
|
17457
|
+
if(ic.atoms[serial].elem.substr(0, 1) === 'H') {
|
|
17454
17458
|
ic.dAtoms[serial] = 1;
|
|
17455
17459
|
ic.hAtoms[serial] = 1;
|
|
17456
17460
|
}
|
|
@@ -17459,11 +17463,29 @@ class ShowInter {
|
|
|
17459
17463
|
}
|
|
17460
17464
|
}
|
|
17461
17465
|
else {
|
|
17466
|
+
// for(let serial in ic.atoms) {
|
|
17467
|
+
// ic.dAtoms[serial] = 1;
|
|
17468
|
+
// ic.hAtoms[serial] = 1;
|
|
17469
|
+
// }
|
|
17470
|
+
|
|
17471
|
+
// add bonds in heavy atoms
|
|
17472
|
+
//for(let serial in ic.hAtoms) {
|
|
17462
17473
|
for(let serial in ic.atoms) {
|
|
17463
|
-
ic.
|
|
17464
|
-
|
|
17465
|
-
|
|
17474
|
+
let atom = ic.atoms[serial];
|
|
17475
|
+
//if(atom.name === 'H') {
|
|
17476
|
+
if(atom.elem.substr(0, 1) === 'H') {
|
|
17477
|
+
if(ic.atoms[serial].bonds.length > 0) {
|
|
17478
|
+
let otherSerial = ic.atoms[serial].bonds[0];
|
|
17479
|
+
ic.atoms[otherSerial].bonds.push(atom.serial);
|
|
17480
|
+
if(ic.atoms[otherSerial].bondOrder) ic.atoms[otherSerial].bondOrder.push(1);
|
|
17481
|
+
}
|
|
17482
|
+
|
|
17483
|
+
ic.dAtoms[serial] = 1;
|
|
17484
|
+
}
|
|
17485
|
+
}
|
|
17466
17486
|
}
|
|
17487
|
+
|
|
17488
|
+
ic.bShowHighlight = false;
|
|
17467
17489
|
}
|
|
17468
17490
|
|
|
17469
17491
|
hideHydrogens() { let ic = this.icn3d; ic.icn3dui;
|
|
@@ -18944,7 +18966,7 @@ class Delphi {
|
|
|
18944
18966
|
|
|
18945
18967
|
ic.loadPhiFrom = 'delphi';
|
|
18946
18968
|
|
|
18947
|
-
let url =
|
|
18969
|
+
let url = me.htmlCls.baseUrl + "delphi/delphi.cgi";
|
|
18948
18970
|
let pdbid =(me.cfg.cid) ? me.cfg.cid : Object.keys(ic.structures).toString();
|
|
18949
18971
|
let dataObj = {};
|
|
18950
18972
|
|
|
@@ -19756,7 +19778,7 @@ class Symd {
|
|
|
19756
19778
|
let thisClass = this;
|
|
19757
19779
|
|
|
19758
19780
|
//var url = "https://data.rcsb.org/rest/v1/core/assembly/" + pdbid + "/1";
|
|
19759
|
-
let url =
|
|
19781
|
+
let url = me.htmlCls.baseUrl + "symd/symd.cgi";
|
|
19760
19782
|
|
|
19761
19783
|
let atomHash = me.hashUtilsCls.intHash(ic.dAtoms, ic.hAtoms);
|
|
19762
19784
|
|
|
@@ -20903,7 +20925,7 @@ class LoadPDB {
|
|
|
20903
20925
|
}
|
|
20904
20926
|
|
|
20905
20927
|
if(!(curChain === atom.chain && curResi === atom.resi)) {
|
|
20906
|
-
// a new residue, add the residue-residue bond
|
|
20928
|
+
// a new residue, add the residue-residue bond besides the regular bonds
|
|
20907
20929
|
this.refreshBonds(curResAtoms, prevCarbonArray[0]);
|
|
20908
20930
|
|
|
20909
20931
|
prevCarbonArray.splice(0, 1); // remove the first carbon
|
|
@@ -23918,13 +23940,13 @@ class OpmParser {
|
|
|
23918
23940
|
});
|
|
23919
23941
|
}
|
|
23920
23942
|
|
|
23921
|
-
loadOpmData(data, pdbid, bFull, type, pdbid2) { let
|
|
23943
|
+
loadOpmData(data, pdbid, bFull, type, pdbid2) { let ic = this.icn3d, me = ic.icn3dui;
|
|
23922
23944
|
let thisClass = this;
|
|
23923
23945
|
let url, dataType;
|
|
23924
23946
|
|
|
23925
23947
|
if(!pdbid) pdbid = 'stru';
|
|
23926
23948
|
|
|
23927
|
-
url =
|
|
23949
|
+
url = me.htmlCls.baseUrl + "mmdb/mmdb_strview.cgi?v=2&program=icn3d&opm&uid=" + pdbid.toLowerCase();
|
|
23928
23950
|
dataType = "jsonp";
|
|
23929
23951
|
|
|
23930
23952
|
$.ajax({
|
|
@@ -24787,6 +24809,7 @@ class RealignParser {
|
|
|
24787
24809
|
|
|
24788
24810
|
let ajaxArray = [], chainidPairArray = [];
|
|
24789
24811
|
let urlalign = me.htmlCls.baseUrl + "vastdyn/vastdyn.cgi";
|
|
24812
|
+
let urltmalign = me.htmlCls.baseUrl + "tmalign/tmalign.cgi";
|
|
24790
24813
|
let structArray = Object.keys(struct2domain);
|
|
24791
24814
|
for(let s = 0, sl = structArray.length; s < sl; ++s) {
|
|
24792
24815
|
let struct1 = structArray[s];
|
|
@@ -24802,16 +24825,32 @@ class RealignParser {
|
|
|
24802
24825
|
for(let j = 0, jl = chainidArray2.length; j < jl; ++j) {
|
|
24803
24826
|
let chainid2 = chainidArray2[j];
|
|
24804
24827
|
|
|
24805
|
-
let
|
|
24806
|
-
|
|
24807
|
-
|
|
24808
|
-
|
|
24809
|
-
|
|
24810
|
-
|
|
24811
|
-
|
|
24812
|
-
|
|
24813
|
-
|
|
24814
|
-
|
|
24828
|
+
let alignAjax;
|
|
24829
|
+
|
|
24830
|
+
if(me.cfg.aligntool != 'tmalign') {
|
|
24831
|
+
let jsonStr_t = ic.domain3dCls.getDomainJsonForAlign(struct2domain[struct1][chainid1]);
|
|
24832
|
+
let jsonStr_q = ic.domain3dCls.getDomainJsonForAlign(struct2domain[struct2][chainid2]);
|
|
24833
|
+
|
|
24834
|
+
alignAjax = $.ajax({
|
|
24835
|
+
url: urlalign,
|
|
24836
|
+
type: 'POST',
|
|
24837
|
+
data: {'domains1': jsonStr_q, 'domains2': jsonStr_t},
|
|
24838
|
+
dataType: 'jsonp',
|
|
24839
|
+
cache: true
|
|
24840
|
+
});
|
|
24841
|
+
}
|
|
24842
|
+
else {
|
|
24843
|
+
let pdb_target = ic.saveFileCls.getAtomPDB(struct2domain[struct1][chainid1]);
|
|
24844
|
+
let pdb_query = ic.saveFileCls.getAtomPDB(struct2domain[struct2][chainid2]);
|
|
24845
|
+
|
|
24846
|
+
alignAjax = $.ajax({
|
|
24847
|
+
url: urltmalign,
|
|
24848
|
+
type: 'POST',
|
|
24849
|
+
data: {'pdb_query': pdb_query, 'pdb_target': pdb_target},
|
|
24850
|
+
dataType: 'jsonp',
|
|
24851
|
+
cache: true
|
|
24852
|
+
});
|
|
24853
|
+
}
|
|
24815
24854
|
|
|
24816
24855
|
ajaxArray.push(alignAjax);
|
|
24817
24856
|
chainidPairArray.push(chainid1 + ',' + chainid2); // chainid2 is target
|
|
@@ -25183,6 +25222,8 @@ class ChainalignParser {
|
|
|
25183
25222
|
// dynamicly align pairs in ic.afChainIndexHash
|
|
25184
25223
|
let ajaxArray = [], indexArray = [], struArray = [];
|
|
25185
25224
|
let urlalign = me.htmlCls.baseUrl + "vastdyn/vastdyn.cgi";
|
|
25225
|
+
let urltmalign = me.htmlCls.baseUrl + "tmalign/tmalign.cgi";
|
|
25226
|
+
//let urltmalign = "https://test.ncbi.nlm.nih.gov/Structure/tmalign/tmalign.cgi";
|
|
25186
25227
|
|
|
25187
25228
|
for(let index in ic.afChainIndexHash) {
|
|
25188
25229
|
let idArray = ic.afChainIndexHash[index].split('_');
|
|
@@ -25191,17 +25232,31 @@ class ChainalignParser {
|
|
|
25191
25232
|
mmdbid_t = idArray[2];
|
|
25192
25233
|
let chain_t = idArray[3];
|
|
25193
25234
|
|
|
25194
|
-
let
|
|
25195
|
-
|
|
25196
|
-
|
|
25197
|
-
|
|
25198
|
-
|
|
25199
|
-
|
|
25200
|
-
|
|
25201
|
-
|
|
25202
|
-
|
|
25203
|
-
|
|
25204
|
-
|
|
25235
|
+
let alignAjax;
|
|
25236
|
+
if(me.cfg.aligntool != 'tmalign') {
|
|
25237
|
+
let jsonStr_q = ic.domain3dCls.getDomainJsonForAlign(ic.chains[mmdbid_q + '_' + chain_q]);
|
|
25238
|
+
let jsonStr_t = ic.domain3dCls.getDomainJsonForAlign(ic.chains[mmdbid_t + '_' + chain_t]);
|
|
25239
|
+
|
|
25240
|
+
alignAjax = $.ajax({
|
|
25241
|
+
url: urlalign,
|
|
25242
|
+
type: 'POST',
|
|
25243
|
+
data: {'domains1': jsonStr_q, 'domains2': jsonStr_t},
|
|
25244
|
+
dataType: 'jsonp',
|
|
25245
|
+
cache: true
|
|
25246
|
+
});
|
|
25247
|
+
}
|
|
25248
|
+
else {
|
|
25249
|
+
let pdb_query = ic.saveFileCls.getAtomPDB(ic.chains[mmdbid_q + '_' + chain_q]);
|
|
25250
|
+
let pdb_target= ic.saveFileCls.getAtomPDB(ic.chains[mmdbid_t + '_' + chain_t]);
|
|
25251
|
+
|
|
25252
|
+
alignAjax = $.ajax({
|
|
25253
|
+
url: urltmalign,
|
|
25254
|
+
type: 'POST',
|
|
25255
|
+
data: {'pdb_query': pdb_query, 'pdb_target': pdb_target},
|
|
25256
|
+
dataType: 'jsonp',
|
|
25257
|
+
cache: true
|
|
25258
|
+
});
|
|
25259
|
+
}
|
|
25205
25260
|
|
|
25206
25261
|
ajaxArray.push(alignAjax);
|
|
25207
25262
|
indexArray.push(index - 1);
|
|
@@ -25333,6 +25388,9 @@ class ChainalignParser {
|
|
|
25333
25388
|
// set trans and rotation matrix
|
|
25334
25389
|
ic.t_trans_add = [];
|
|
25335
25390
|
ic.q_trans_sub = [];
|
|
25391
|
+
|
|
25392
|
+
if(me.cfg.aligntool == 'tmalign') ic.q_trans_add = [];
|
|
25393
|
+
|
|
25336
25394
|
ic.q_rotation = [];
|
|
25337
25395
|
ic.qt_start_end = [];
|
|
25338
25396
|
|
|
@@ -25477,30 +25535,37 @@ class ChainalignParser {
|
|
|
25477
25535
|
for(let i = 0, il = chainidArray.length; i < il; ++i) {
|
|
25478
25536
|
for(let serial in ic.chains[chainidArray[i]]) {
|
|
25479
25537
|
let atm = ic.atoms[serial];
|
|
25480
|
-
//
|
|
25481
|
-
if(ic.q_rotation !== undefined &&
|
|
25538
|
+
//if(ic.q_rotation !== undefined && ic.t_trans_add.length > 0 && !me.cfg.resnum && !me.cfg.resdef) {
|
|
25539
|
+
if(ic.q_rotation !== undefined && !me.cfg.resnum && !me.cfg.resdef) {
|
|
25482
25540
|
atm = this.transformAtom(atm, index, alignType);
|
|
25483
25541
|
}
|
|
25484
25542
|
}
|
|
25485
25543
|
}
|
|
25486
|
-
|
|
25487
|
-
|
|
25488
25544
|
}
|
|
25489
25545
|
|
|
25490
|
-
transformAtom(atm, index, alignType) { let
|
|
25546
|
+
transformAtom(atm, index, alignType) { let ic = this.icn3d, me = ic.icn3dui;
|
|
25491
25547
|
if(alignType === 'target') ;
|
|
25492
25548
|
else if(alignType === 'query') {
|
|
25493
|
-
|
|
25494
|
-
|
|
25495
|
-
|
|
25549
|
+
if(me.cfg.aligntool != 'tmalign') {
|
|
25550
|
+
atm.coord.x -= ic.q_trans_sub[index].x;
|
|
25551
|
+
atm.coord.y -= ic.q_trans_sub[index].y;
|
|
25552
|
+
atm.coord.z -= ic.q_trans_sub[index].z;
|
|
25553
|
+
}
|
|
25496
25554
|
|
|
25497
25555
|
let x = atm.coord.x * ic.q_rotation[index].x1 + atm.coord.y * ic.q_rotation[index].y1 + atm.coord.z * ic.q_rotation[index].z1;
|
|
25498
25556
|
let y = atm.coord.x * ic.q_rotation[index].x2 + atm.coord.y * ic.q_rotation[index].y2 + atm.coord.z * ic.q_rotation[index].z2;
|
|
25499
25557
|
let z = atm.coord.x * ic.q_rotation[index].x3 + atm.coord.y * ic.q_rotation[index].y3 + atm.coord.z * ic.q_rotation[index].z3;
|
|
25500
25558
|
|
|
25501
|
-
|
|
25502
|
-
|
|
25503
|
-
|
|
25559
|
+
if(me.cfg.aligntool != 'tmalign') {
|
|
25560
|
+
x -= ic.t_trans_add[index].x;
|
|
25561
|
+
y -= ic.t_trans_add[index].y;
|
|
25562
|
+
z -= ic.t_trans_add[index].z;
|
|
25563
|
+
}
|
|
25564
|
+
else {
|
|
25565
|
+
x += ic.q_trans_add[index].x;
|
|
25566
|
+
y += ic.q_trans_add[index].y;
|
|
25567
|
+
z += ic.q_trans_add[index].z;
|
|
25568
|
+
}
|
|
25504
25569
|
|
|
25505
25570
|
atm.coord.x = x;
|
|
25506
25571
|
atm.coord.y = y;
|
|
@@ -25685,7 +25750,8 @@ class ChainalignParser {
|
|
|
25685
25750
|
let chainalignFinal = ic.mmdbid_q + "_" + ic.chain_q + "," + ic.mmdbid_t + "_" + ic.chain_t;
|
|
25686
25751
|
let domainalign = (domainArray.length > 0) ? domainArray[index] + "," + domainArray[0] : undefined;
|
|
25687
25752
|
|
|
25688
|
-
|
|
25753
|
+
// TM-align (me.cfg.aligntool == 'tmalign') needs to input PDB
|
|
25754
|
+
if(me.cfg.aligntool != 'tmalign' && ic.mmdbid_t.length == 4 && ic.mmdbid_q.length == 4) {
|
|
25689
25755
|
let urlalign;
|
|
25690
25756
|
|
|
25691
25757
|
if(domainArray.length > 0) {
|
|
@@ -25719,7 +25785,8 @@ class ChainalignParser {
|
|
|
25719
25785
|
thisClass.parseChainAlignData(dataArray, alignArray, ic.mmdbid_t, ic.chain_t);
|
|
25720
25786
|
})
|
|
25721
25787
|
.fail(function() {
|
|
25722
|
-
|
|
25788
|
+
let serverName = (me.cfg.aligntool == 'tmalign') ? 'TM-align' : 'VAST';
|
|
25789
|
+
var aaa = 1; //alert("These chains can not be aligned by " + serverName + ". You can specify the residue range and try it again...");
|
|
25723
25790
|
// thisClass.parseChainAlignData(arguments, alignArray, ic.mmdbid_t, ic.chain_t);
|
|
25724
25791
|
});
|
|
25725
25792
|
}
|
|
@@ -25737,6 +25804,9 @@ class ChainalignParser {
|
|
|
25737
25804
|
|
|
25738
25805
|
ic.t_trans_add = [];
|
|
25739
25806
|
ic.q_trans_sub = [];
|
|
25807
|
+
|
|
25808
|
+
if(me.cfg.aligntool == 'tmalign') ic.q_trans_add = [];
|
|
25809
|
+
|
|
25740
25810
|
ic.q_rotation = [];
|
|
25741
25811
|
ic.qt_start_end = [];
|
|
25742
25812
|
|
|
@@ -25782,6 +25852,9 @@ class ChainalignParser {
|
|
|
25782
25852
|
// need to pass C-alpha coords and get transformation matrix from backend
|
|
25783
25853
|
ic.t_trans_add[index-1] = {"x":0, "y":0, "z":0};
|
|
25784
25854
|
ic.q_trans_sub[index-1] = {"x":0, "y":0, "z":0};
|
|
25855
|
+
|
|
25856
|
+
if(me.cfg.aligntool == 'tmalign') ic.q_trans_add[index-1] = {"x":0, "y":0, "z":0};
|
|
25857
|
+
|
|
25785
25858
|
ic.q_rotation[index-1] = {"x1":1, "y1":0, "z1":0, "x2":0, "y2":1, "z2":0, "x3":0, "y3":0, "z3":1};
|
|
25786
25859
|
ic.qt_start_end[index-1] = undefined;
|
|
25787
25860
|
}
|
|
@@ -25804,7 +25877,8 @@ class ChainalignParser {
|
|
|
25804
25877
|
processAlign(align, index, queryData, bEqualMmdbid, bEqualChain, bNoAlert) { let ic = this.icn3d, me = ic.icn3dui;
|
|
25805
25878
|
let bAligned = false;
|
|
25806
25879
|
if((!align || align.length == 0) && !bNoAlert) {
|
|
25807
|
-
|
|
25880
|
+
let serverName = (me.cfg.aligntool == 'tmalign') ? 'TM-align' : 'VAST';
|
|
25881
|
+
var aaa = 1; //alert("These chains can not be aligned by " + serverName + ".");
|
|
25808
25882
|
return bAligned;
|
|
25809
25883
|
}
|
|
25810
25884
|
|
|
@@ -25837,13 +25911,20 @@ class ChainalignParser {
|
|
|
25837
25911
|
*/
|
|
25838
25912
|
ic.t_trans_add[index] = align[0].t_trans_add;
|
|
25839
25913
|
ic.q_trans_sub[index] = align[0].q_trans_sub;
|
|
25914
|
+
|
|
25915
|
+
if(me.cfg.aligntool == 'tmalign') ic.q_trans_add[index] = align[0].q_trans_add;
|
|
25916
|
+
|
|
25840
25917
|
ic.q_rotation[index] = align[0].q_rotation;
|
|
25841
25918
|
ic.qt_start_end[index] = align[0].segs;
|
|
25842
25919
|
|
|
25843
25920
|
let rmsd = align[0].super_rmsd;
|
|
25844
25921
|
|
|
25845
|
-
|
|
25846
|
-
|
|
25922
|
+
let logStr = "alignment RMSD: " + rmsd.toPrecision(4);
|
|
25923
|
+
if(me.cfg.aligntool == 'tmalign') logStr += "; TM-score: " + align[0].score.toPrecision(4);
|
|
25924
|
+
me.htmlCls.clickMenuCls.setLogCmd(logStr, false);
|
|
25925
|
+
let html = "<br><b>Alignment RMSD</b>: " + rmsd.toPrecision(4) + " Å<br>";
|
|
25926
|
+
if(me.cfg.aligntool == 'tmalign') html += "<b>TM-score</b>: " + align[0].score.toPrecision(4) + "<br><br>";
|
|
25927
|
+
$("#" + ic.pre + "dl_rmsd").html(html);
|
|
25847
25928
|
if(!me.cfg.bSidebyside) me.htmlCls.dialogCls.openDlg('dl_rmsd', 'RMSD of alignment');
|
|
25848
25929
|
|
|
25849
25930
|
bAligned = true;
|
|
@@ -27729,6 +27810,24 @@ class LoadScript {
|
|
|
27729
27810
|
|
|
27730
27811
|
return;
|
|
27731
27812
|
}
|
|
27813
|
+
else if(ic.commands[i].trim().indexOf('realign on tmalign') == 0) {
|
|
27814
|
+
let strArray = ic.commands[i].split("|||");
|
|
27815
|
+
let command = strArray[0].trim();
|
|
27816
|
+
|
|
27817
|
+
let paraArray = command.split(' | ');
|
|
27818
|
+
if(paraArray.length == 2) {
|
|
27819
|
+
let nameArray = paraArray[1].split(',');
|
|
27820
|
+
ic.hAtoms = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
|
|
27821
|
+
}
|
|
27822
|
+
|
|
27823
|
+
me.cfg.aligntool = 'tmalign';
|
|
27824
|
+
|
|
27825
|
+
$.when(thisClass.applyCommandRealignByStruct(command)).then(function() {
|
|
27826
|
+
thisClass.execCommandsBase(i + 1, end, steps);
|
|
27827
|
+
});
|
|
27828
|
+
|
|
27829
|
+
return;
|
|
27830
|
+
}
|
|
27732
27831
|
else if(ic.commands[i].trim().indexOf('graph interaction pairs') == 0) {
|
|
27733
27832
|
let strArray = ic.commands[i].split("|||");
|
|
27734
27833
|
let command = strArray[0].trim();
|
|
@@ -27917,6 +28016,17 @@ class LoadScript {
|
|
|
27917
28016
|
}
|
|
27918
28017
|
thisClass.applyCommandRealignByStruct(lastCommand);
|
|
27919
28018
|
}
|
|
28019
|
+
else if(lastCommand.indexOf('realign on tmalign') == 0) {
|
|
28020
|
+
let paraArray = lastCommand.split(' | ');
|
|
28021
|
+
if(paraArray.length == 2) {
|
|
28022
|
+
let nameArray = paraArray[1].split(',');
|
|
28023
|
+
ic.hAtoms = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
|
|
28024
|
+
}
|
|
28025
|
+
|
|
28026
|
+
me.cfg.aligntool = 'tmalign';
|
|
28027
|
+
|
|
28028
|
+
thisClass.applyCommandRealignByStruct(lastCommand);
|
|
28029
|
+
}
|
|
27920
28030
|
else if(lastCommand.indexOf('graph interaction pairs') == 0) {
|
|
27921
28031
|
thisClass.applyCommandGraphinteraction(lastCommand);
|
|
27922
28032
|
}
|
|
@@ -28048,14 +28158,20 @@ class LoadScript {
|
|
|
28048
28158
|
ic.alignParserCls.downloadAlignment(id);
|
|
28049
28159
|
}
|
|
28050
28160
|
else if(command.indexOf('load chainalignment') !== -1) {
|
|
28051
|
-
//load chainalignment [id] | resnum [resnum] | parameters [inpara]
|
|
28161
|
+
//load chainalignment [id] | resnum [resnum] | resdef [resnum] | aligntool [aligntool] | parameters [inpara]
|
|
28052
28162
|
let urlArray = command.split(" | ");
|
|
28053
|
-
if(urlArray[1].indexOf('resnum') != -1) {
|
|
28054
|
-
|
|
28163
|
+
if(urlArray.length > 1 && urlArray[1].indexOf('resnum') != -1) {
|
|
28164
|
+
me.cfg.resnum = urlArray[1].substr(urlArray[1].indexOf('resnum') + 7);
|
|
28165
|
+
}
|
|
28166
|
+
if(urlArray.length > 2 && urlArray[2].indexOf('resdef') != -1) {
|
|
28167
|
+
me.cfg.resdef = urlArray[2].substr(urlArray[1].indexOf('resdef') + 7);
|
|
28168
|
+
}
|
|
28169
|
+
if(urlArray.length > 3 && urlArray[3].indexOf('aligntool') != -1) {
|
|
28170
|
+
me.cfg.aligntool = urlArray[3].substr(urlArray[1].indexOf('aligntool') + 10);
|
|
28055
28171
|
}
|
|
28056
28172
|
|
|
28057
28173
|
me.cfg.chainalign = id;
|
|
28058
|
-
ic.chainalignParserCls.downloadChainalignment(id, me.cfg.resnum);
|
|
28174
|
+
ic.chainalignParserCls.downloadChainalignment(id, me.cfg.resnum, me.cfg.resdef);
|
|
28059
28175
|
}
|
|
28060
28176
|
else if(command.indexOf('load url') !== -1) {
|
|
28061
28177
|
let typeStr = load_parameters[1]; // type pdb
|
|
@@ -28647,7 +28763,7 @@ class ResizeCanvas {
|
|
|
28647
28763
|
//let itemArray = ['dl_selectannotations', 'dl_alignment', 'dl_2ddgm', 'dl_definedsets', 'dl_graph',
|
|
28648
28764
|
// 'dl_linegraph', 'dl_scatterplot', 'dl_contactmap', 'dl_allinteraction', 'dl_copyurl',
|
|
28649
28765
|
// 'dl_symmetry', 'dl_symd', 'dl_rmsd', 'dl_legend', 'dl_disttable'];
|
|
28650
|
-
let itemArray = ['dl_2ddgm', 'dl_2dctn', 'dl_alignment', 'dl_sequence2', 'dl_definedsets', 'dl_setsmenu', 'dl_command', 'dl_setoperations', 'dl_vast', 'dl_foldseek', 'dl_mmtfid', 'dl_pdbid', 'dl_afid', 'dl_opmid', 'dl_pdbfile', 'dl_pdbfile_app', 'dl_rescolorfile', 'dl_customcolor', 'dl_align', 'dl_alignaf', 'dl_chainalign', 'dl_mutation', 'dl_mol2file', 'dl_sdffile', 'dl_xyzfile', 'dl_afmapfile', 'dl_urlfile', 'dl_mmciffile', 'dl_mmcifid', 'dl_mmdbid', 'dl_mmdbafid', 'dl_blast_rep_id', 'dl_yournote', 'dl_gi', 'dl_uniprotid', 'dl_cid', 'dl_pngimage', 'dl_state', 'dl_fixedversion', 'dl_selection', 'dl_dsn6', 'dl_dsn6url', 'dl_clr', 'dl_symmetry', 'dl_symd', 'dl_contact', 'dl_hbonds', 'dl_realign', 'dl_realignbystruct', 'dl_allinteraction', 'dl_interactionsorted', 'dl_linegraph', 'dl_linegraphcolor', 'dl_scatterplot', 'dl_scatterplotcolor', 'dl_contactmap', 'dl_alignerrormap', 'dl_elecmap2fofc', 'dl_elecmapfofc', 'dl_emmap', 'dl_aroundsphere', 'dl_adjustmem', 'dl_selectplane', 'dl_addlabel', 'dl_addlabelselection', 'dl_labelColor', 'dl_distance', 'dl_stabilizer', 'dl_disttwosets', 'dl_distmanysets', 'dl_stabilizer_rm', 'dl_thickness', 'dl_thickness2', 'dl_addtrack', 'dl_addtrack_tabs', 'dl_saveselection', 'dl_copyurl', 'dl_selectannotations', 'dl_annotations_tabs', 'dl_anno_view_tabs', 'dl_annotations', 'dl_graph', 'dl_svgcolor', 'dl_area', 'dl_colorbyarea', 'dl_rmsd', 'dl_buriedarea', 'dl_propbypercentout', 'dl_propbybfactor', 'dl_legend', 'dl_disttable'];
|
|
28766
|
+
let itemArray = ['dl_2ddgm', 'dl_2dctn', 'dl_alignment', 'dl_sequence2', 'dl_definedsets', 'dl_setsmenu', 'dl_command', 'dl_setoperations', 'dl_vast', 'dl_foldseek', 'dl_mmtfid', 'dl_pdbid', 'dl_afid', 'dl_opmid', 'dl_pdbfile', 'dl_pdbfile_app', 'dl_rescolorfile', 'dl_customcolor', 'dl_align', 'dl_alignaf', 'dl_chainalign', 'dl_chainalign2', 'dl_chainalign3', 'dl_mutation', 'dl_mol2file', 'dl_sdffile', 'dl_xyzfile', 'dl_afmapfile', 'dl_urlfile', 'dl_mmciffile', 'dl_mmcifid', 'dl_mmdbid', 'dl_mmdbafid', 'dl_blast_rep_id', 'dl_yournote', 'dl_gi', 'dl_uniprotid', 'dl_cid', 'dl_pngimage', 'dl_state', 'dl_fixedversion', 'dl_selection', 'dl_dsn6', 'dl_dsn6url', 'dl_clr', 'dl_symmetry', 'dl_symd', 'dl_contact', 'dl_hbonds', 'dl_realign', 'dl_realignbystruct', 'dl_allinteraction', 'dl_interactionsorted', 'dl_linegraph', 'dl_linegraphcolor', 'dl_scatterplot', 'dl_scatterplotcolor', 'dl_contactmap', 'dl_alignerrormap', 'dl_elecmap2fofc', 'dl_elecmapfofc', 'dl_emmap', 'dl_aroundsphere', 'dl_adjustmem', 'dl_selectplane', 'dl_addlabel', 'dl_addlabelselection', 'dl_labelColor', 'dl_distance', 'dl_stabilizer', 'dl_disttwosets', 'dl_distmanysets', 'dl_stabilizer_rm', 'dl_thickness', 'dl_thickness2', 'dl_addtrack', 'dl_addtrack_tabs', 'dl_saveselection', 'dl_copyurl', 'dl_selectannotations', 'dl_annotations_tabs', 'dl_anno_view_tabs', 'dl_annotations', 'dl_graph', 'dl_svgcolor', 'dl_area', 'dl_colorbyarea', 'dl_rmsd', 'dl_buriedarea', 'dl_propbypercentout', 'dl_propbybfactor', 'dl_legend', 'dl_disttable'];
|
|
28651
28767
|
|
|
28652
28768
|
for(let i in itemArray) {
|
|
28653
28769
|
let item = itemArray[i];
|
|
@@ -31684,7 +31800,7 @@ class AnnoCddSite {
|
|
|
31684
31800
|
let chnidArray = Object.keys(ic.protein_chainid);
|
|
31685
31801
|
// show conserved domains and binding sites
|
|
31686
31802
|
// live search
|
|
31687
|
-
let url = me.htmlCls.baseUrl + "cdannots/cdannots.fcgi?fmt&frclive&live=lcl&queries=" + chnidBaseArray;
|
|
31803
|
+
let url = me.htmlCls.baseUrl + "cdannots/cdannots.fcgi?fmt&frclive&live=lcl&queries=" + chnidBaseArray;
|
|
31688
31804
|
// precalculated
|
|
31689
31805
|
//let url = me.htmlCls.baseUrl + "cdannots/cdannots.fcgi?fmt&live=lcl&queries=" + chnidBaseArray;
|
|
31690
31806
|
// live search for AlphaFold structures
|
|
@@ -31730,7 +31846,7 @@ class AnnoCddSite {
|
|
|
31730
31846
|
|
|
31731
31847
|
//url = me.htmlCls.baseUrl + "cdannots/cdannots.fcgi?fmt&live=lcl&queries=" + ic.giSeq[chnidArray[0]].join('');
|
|
31732
31848
|
// live searchE
|
|
31733
|
-
url = me.htmlCls.baseUrl + "cdannots/cdannots.fcgi?fmt&frclive&live=lcl&queries=" + seq;
|
|
31849
|
+
url = me.htmlCls.baseUrl + "cdannots/cdannots.fcgi?fmt&frclive&live=lcl&queries=" + seq;
|
|
31734
31850
|
// precalculated
|
|
31735
31851
|
//url = me.htmlCls.baseUrl + "cdannots/cdannots.fcgi?fmt&live=lcl&queries=" + seq;
|
|
31736
31852
|
|
|
@@ -35512,11 +35628,15 @@ class SetSeqAlign {
|
|
|
35512
35628
|
// start and end of MSA
|
|
35513
35629
|
let start_t = 9999, end_t = -1;
|
|
35514
35630
|
|
|
35631
|
+
let baseResi = ic.chainsSeq[chainid1][0].resi - 1;
|
|
35632
|
+
|
|
35515
35633
|
for(let index = 1, indexl = chainidArray.length; index < indexl; ++index) {
|
|
35516
35634
|
let chainIndex = index - 1;
|
|
35635
|
+
if(!ic.qt_start_end[chainIndex]) continue;
|
|
35636
|
+
|
|
35517
35637
|
for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
|
|
35518
35638
|
let start1, end1;
|
|
35519
|
-
if(bRealign) { //
|
|
35639
|
+
if(bRealign) { // real residue numbers are stored
|
|
35520
35640
|
start1 = ic.qt_start_end[chainIndex][i].t_start;
|
|
35521
35641
|
end1 = ic.qt_start_end[chainIndex][i].t_end;
|
|
35522
35642
|
}
|
|
@@ -35524,9 +35644,9 @@ class SetSeqAlign {
|
|
|
35524
35644
|
start1 = ic.qt_start_end[chainIndex][i].t_start - 1;
|
|
35525
35645
|
end1 = ic.qt_start_end[chainIndex][i].t_end - 1;
|
|
35526
35646
|
}
|
|
35527
|
-
|
|
35528
35647
|
for(let j = start1; j <= end1; ++j) {
|
|
35529
|
-
let
|
|
35648
|
+
let resiPos = j - baseResi;
|
|
35649
|
+
let resi = this.getResi(chainidArray[0], resiPos, bRealign);
|
|
35530
35650
|
resi2range_t[resi] = 1;
|
|
35531
35651
|
if(j < start_t) start_t = j;
|
|
35532
35652
|
if(j > end_t) end_t = j;
|
|
@@ -35534,6 +35654,9 @@ class SetSeqAlign {
|
|
|
35534
35654
|
}
|
|
35535
35655
|
}
|
|
35536
35656
|
|
|
35657
|
+
// TM-align should use "start1 = ic.qt_start_end[chainIndex][i].t_start - 1", but the rest are the same as ""bRealign"
|
|
35658
|
+
if(me.cfg.aligntool == 'tmalign') bRealign = true; // real residue numbers are stored
|
|
35659
|
+
|
|
35537
35660
|
let resi2rangeArray = Object.keys(resi2range_t);
|
|
35538
35661
|
resi2rangeArray.sort(function(a, b) {
|
|
35539
35662
|
return parseInt(a) - parseInt(b);
|
|
@@ -35580,7 +35703,7 @@ class SetSeqAlign {
|
|
|
35580
35703
|
for(let j = 0, jl = ic.chainsSeq[chainid1].length; j < jl; ++j) {
|
|
35581
35704
|
let resi = ic.chainsSeq[chainid1][j].resi;
|
|
35582
35705
|
|
|
35583
|
-
if((j < start_t || j > end_t) ) {
|
|
35706
|
+
if((j + baseResi < start_t || j + baseResi > end_t) ) {
|
|
35584
35707
|
continue;
|
|
35585
35708
|
}
|
|
35586
35709
|
|
|
@@ -36199,7 +36322,7 @@ class ParserUtils {
|
|
|
36199
36322
|
|
|
36200
36323
|
if(rmsd) {
|
|
36201
36324
|
me.htmlCls.clickMenuCls.setLogCmd("realignment RMSD: " + rmsd.toPrecision(4), false);
|
|
36202
|
-
$("#" + ic.pre + "
|
|
36325
|
+
$("#" + ic.pre + "dl_rmsd").html("<br><b>Realignment RMSD</b>: " + rmsd.toPrecision(4) + " Å<br><br>");
|
|
36203
36326
|
if(!me.cfg.bSidebyside) me.htmlCls.dialogCls.openDlg('dl_rmsd', 'Realignment RMSD');
|
|
36204
36327
|
}
|
|
36205
36328
|
|
|
@@ -36569,7 +36692,7 @@ class ParserUtils {
|
|
|
36569
36692
|
let rmsd = ic.rmsd_supr.rmsd;
|
|
36570
36693
|
|
|
36571
36694
|
me.htmlCls.clickMenuCls.setLogCmd("RMSD of alignment to OPM: " + rmsd.toPrecision(4), false);
|
|
36572
|
-
$("#" + ic.pre + "
|
|
36695
|
+
$("#" + ic.pre + "dl_rmsd").html("<br><b>RMSD of alignment to OPM</b>: " + rmsd.toPrecision(4) + " Å<br><br>");
|
|
36573
36696
|
if(!me.cfg.bSidebyside) me.htmlCls.dialogCls.openDlg('dl_rmsd', 'RMSD of alignment to OPM');
|
|
36574
36697
|
|
|
36575
36698
|
let dxymaxsq = 0;
|
|
@@ -36818,7 +36941,7 @@ class ParserUtils {
|
|
|
36818
36941
|
if(me.cfg.showanno) {
|
|
36819
36942
|
let cmd = "view annotations";
|
|
36820
36943
|
me.htmlCls.clickMenuCls.setLogCmd(cmd, true);
|
|
36821
|
-
ic.showAnnoCls.showAnnotations();
|
|
36944
|
+
ic.showAnnoCls.showAnnotations();
|
|
36822
36945
|
}
|
|
36823
36946
|
if(me.cfg.closepopup) {
|
|
36824
36947
|
ic.resizeCanvasCls.closeDialogs();
|
|
@@ -37824,9 +37947,11 @@ class ShowAnno {
|
|
|
37824
37947
|
}
|
|
37825
37948
|
|
|
37826
37949
|
let nucleotide_chainid = {}, chemical_chainid = {}, chemical_set = {};
|
|
37827
|
-
ic.protein_chainid = {};
|
|
37950
|
+
//ic.protein_chainid = {};
|
|
37828
37951
|
|
|
37829
37952
|
if(ic.bAnnoShown === undefined || !ic.bAnnoShown || ic.bResetAnno) { // ic.bResetAnno when loading another structure
|
|
37953
|
+
ic.protein_chainid = {};
|
|
37954
|
+
|
|
37830
37955
|
let chainArray = Object.keys(ic.chains);
|
|
37831
37956
|
|
|
37832
37957
|
if(ic.giSeq === undefined) ic.giSeq = {};
|
|
@@ -37867,6 +37992,7 @@ class ShowAnno {
|
|
|
37867
37992
|
chainidBase = chainArray[i];
|
|
37868
37993
|
}
|
|
37869
37994
|
//if(me.cfg.mmdbid !== undefined) { // protein and chemicals/ions are in different chains
|
|
37995
|
+
|
|
37870
37996
|
if(ic.proteins.hasOwnProperty(atom.serial) && ic.chainsSeq[chainArray[i]].length > 1) {
|
|
37871
37997
|
ic.protein_chainid[chainArray[i]] = chainidBase;
|
|
37872
37998
|
}
|
|
@@ -38136,7 +38262,7 @@ class ShowAnno {
|
|
|
38136
38262
|
return;
|
|
38137
38263
|
}
|
|
38138
38264
|
thisClass.enableHlSeq();
|
|
38139
|
-
console.log( "No data were found for the protein " + chnidBaseArray + "..." );
|
|
38265
|
+
if(!me.bNode) console.log( "No data were found for the protein " + chnidBaseArray + "..." );
|
|
38140
38266
|
for(let chnid in ic.protein_chainid) {
|
|
38141
38267
|
let chnidBase = ic.protein_chainid[chnid];
|
|
38142
38268
|
ic.showSeqCls.setAlternativeSeq(chnid, chnidBase);
|
|
@@ -38262,7 +38388,7 @@ class ShowAnno {
|
|
|
38262
38388
|
}
|
|
38263
38389
|
}
|
|
38264
38390
|
else {
|
|
38265
|
-
console.log( "No data were found for the protein " + chnid + "..." );
|
|
38391
|
+
if(!me.bNode) console.log( "No data were found for the protein " + chnid + "..." );
|
|
38266
38392
|
ic.showSeqCls.setAlternativeSeq(chnid, chnidBase);
|
|
38267
38393
|
}
|
|
38268
38394
|
if(me.cfg.blast_rep_id != chnid) {
|
|
@@ -39655,11 +39781,11 @@ class AnnoSnpClinVar {
|
|
|
39655
39781
|
if(ic.deferredClinvar !== undefined) ic.deferredClinvar.resolve();
|
|
39656
39782
|
}
|
|
39657
39783
|
}
|
|
39658
|
-
showClinvarPart2(chnid, chnidBase, gi) { let ic = this.icn3d
|
|
39784
|
+
showClinvarPart2(chnid, chnidBase, gi) { let ic = this.icn3d, me = ic.icn3dui;
|
|
39659
39785
|
let thisClass = this;
|
|
39660
39786
|
//var url = "https://www.ncbi.nlm.nih.gov/projects/SNP/beVarSearch_mt.cgi?appname=iCn3D&format=bed&report=pdb2bed&acc=" + chnidBase;
|
|
39661
39787
|
//var url = "https://www.ncbi.nlm.nih.gov/Structure/icn3d/clinvar.txt";
|
|
39662
|
-
let url =
|
|
39788
|
+
let url = me.htmlCls.baseUrl + "vastdyn/vastdyn.cgi?chainid_clinvar=" + chnidBase;
|
|
39663
39789
|
if(ic.chainsGene[chnid] && ic.chainsGene[chnid].geneSymbol) {
|
|
39664
39790
|
url += "&gene=" + ic.chainsGene[chnid].geneSymbol;
|
|
39665
39791
|
}
|
|
@@ -39694,7 +39820,7 @@ class AnnoSnpClinVar {
|
|
|
39694
39820
|
});
|
|
39695
39821
|
}
|
|
39696
39822
|
|
|
39697
|
-
showSnpPart2(chnid, chnidBase, gi) { let ic = this.icn3d
|
|
39823
|
+
showSnpPart2(chnid, chnidBase, gi) { let ic = this.icn3d, me = ic.icn3dui;
|
|
39698
39824
|
let thisClass = this;
|
|
39699
39825
|
if(gi !== undefined) {
|
|
39700
39826
|
/*
|
|
@@ -39713,7 +39839,7 @@ class AnnoSnpClinVar {
|
|
|
39713
39839
|
} //if(data3 != "") {
|
|
39714
39840
|
else {
|
|
39715
39841
|
*/
|
|
39716
|
-
let url4 =
|
|
39842
|
+
let url4 = me.htmlCls.baseUrl + "vastdyn/vastdyn.cgi?chainid_snp=" + chnidBase;
|
|
39717
39843
|
if(ic.chainsGene[chnid] && ic.chainsGene[chnid].geneSymbol) {
|
|
39718
39844
|
url4 += "&gene=" + ic.chainsGene[chnid].geneSymbol;
|
|
39719
39845
|
}
|
|
@@ -44519,7 +44645,8 @@ class VRButton {
|
|
|
44519
44645
|
button.style.display = '';
|
|
44520
44646
|
|
|
44521
44647
|
button.style.cursor = 'pointer';
|
|
44522
|
-
button.style.left = 'calc(50% - 50px)';
|
|
44648
|
+
//button.style.left = 'calc(50% - 50px)';
|
|
44649
|
+
button.style.left = 'calc(33% - 50px)';
|
|
44523
44650
|
button.style.width = '100px';
|
|
44524
44651
|
|
|
44525
44652
|
button.textContent = 'ENTER VR';
|
|
@@ -44573,7 +44700,7 @@ class VRButton {
|
|
|
44573
44700
|
button.style.display = '';
|
|
44574
44701
|
|
|
44575
44702
|
button.style.cursor = 'auto';
|
|
44576
|
-
button.style.left = 'calc(50% - 75px)';
|
|
44703
|
+
button.style.left = 'calc(33% - 75px)'; //'calc(50% - 75px)';
|
|
44577
44704
|
button.style.width = '150px';
|
|
44578
44705
|
|
|
44579
44706
|
button.onmouseenter = null;
|
|
@@ -44766,7 +44893,8 @@ class ARButton {
|
|
|
44766
44893
|
button.style.display = '';
|
|
44767
44894
|
|
|
44768
44895
|
button.style.cursor = 'pointer';
|
|
44769
|
-
button.style.left = 'calc(50% - 50px)';
|
|
44896
|
+
//button.style.left = 'calc(50% - 50px)';
|
|
44897
|
+
button.style.left = 'calc(66% - 50px)';
|
|
44770
44898
|
button.style.width = '100px';
|
|
44771
44899
|
|
|
44772
44900
|
button.textContent = 'START AR';
|
|
@@ -44814,7 +44942,7 @@ class ARButton {
|
|
|
44814
44942
|
button.style.display = '';
|
|
44815
44943
|
|
|
44816
44944
|
button.style.cursor = 'auto';
|
|
44817
|
-
button.style.left = 'calc(50% - 75px)';
|
|
44945
|
+
button.style.left = 'calc(66% - 50px)'; //'calc(50% - 75px)';
|
|
44818
44946
|
button.style.width = '150px';
|
|
44819
44947
|
|
|
44820
44948
|
button.onmouseenter = null;
|
|
@@ -44911,7 +45039,7 @@ class ARButton {
|
|
|
44911
45039
|
|
|
44912
45040
|
}
|
|
44913
45041
|
|
|
44914
|
-
message.style.left = 'calc(50% - 90px)';
|
|
45042
|
+
message.style.left = 'calc(66% - 90px)'; //'calc(50% - 90px)';
|
|
44915
45043
|
message.style.width = '180px';
|
|
44916
45044
|
message.style.textDecoration = 'none';
|
|
44917
45045
|
|
|
@@ -53293,9 +53421,17 @@ class ClickMenu {
|
|
|
53293
53421
|
// },
|
|
53294
53422
|
// clkMn1_chainalign: function() {
|
|
53295
53423
|
me.myEventCls.onIds("#" + me.pre + "mn1_chainalign", "click", function(e) { me.icn3d;
|
|
53296
|
-
me.htmlCls.dialogCls.openDlg('dl_chainalign', 'Align multiple chains
|
|
53424
|
+
me.htmlCls.dialogCls.openDlg('dl_chainalign', 'Align multiple chains by structure alignment');
|
|
53297
53425
|
});
|
|
53298
53426
|
|
|
53427
|
+
me.myEventCls.onIds("#" + me.pre + "mn1_chainalign2", "click", function(e) { me.icn3d;
|
|
53428
|
+
me.htmlCls.dialogCls.openDlg('dl_chainalign2', 'Align multiple chains by sequence alignment');
|
|
53429
|
+
});
|
|
53430
|
+
|
|
53431
|
+
me.myEventCls.onIds("#" + me.pre + "mn1_chainalign3", "click", function(e) { me.icn3d;
|
|
53432
|
+
me.htmlCls.dialogCls.openDlg('dl_chainalign3', 'Align multiple chains residue by residue');
|
|
53433
|
+
});
|
|
53434
|
+
|
|
53299
53435
|
me.myEventCls.onIds("#" + me.pre + "mn1_mutation", "click", function(e) { me.icn3d;
|
|
53300
53436
|
me.htmlCls.dialogCls.openDlg('dl_mutation', 'Show the mutations in 3D');
|
|
53301
53437
|
});
|
|
@@ -53474,6 +53610,12 @@ class ClickMenu {
|
|
|
53474
53610
|
thisClass.setLogCmd("export pqr", true);
|
|
53475
53611
|
});
|
|
53476
53612
|
|
|
53613
|
+
me.myEventCls.onIds(["#" + me.pre + "delphipdbh", "#" + me.pre + "phipqr", "#" + me.pre + "phiurlpqr"], "click", function(e) { me.icn3d;
|
|
53614
|
+
let bPdb = true;
|
|
53615
|
+
me.htmlCls.setHtmlCls.exportPqr(bPdb);
|
|
53616
|
+
thisClass.setLogCmd("export pdbh", false);
|
|
53617
|
+
});
|
|
53618
|
+
|
|
53477
53619
|
// clkMn1_exportStl: function() {
|
|
53478
53620
|
me.myEventCls.onIds("#" + me.pre + "mn1_exportStl", "click", function(e) { let ic = me.icn3d;
|
|
53479
53621
|
thisClass.setLogCmd("export stl file", false);
|
|
@@ -55639,10 +55781,10 @@ class SetMenu {
|
|
|
55639
55781
|
return "<div style='margin:3px 0px 0px 10px;'><button style='-webkit-appearance:" + buttonStyle + "; height:36px;" + bkgdColor + "' id='" + me.pre + id + "'><span style='white-space:nowrap;" + color + "' class='icn3d-commandTitle' title='" + title + "'>" + text + "</span></button></div>";
|
|
55640
55782
|
}
|
|
55641
55783
|
|
|
55642
|
-
setIcon(iconType, id, title, iconStyle, url, bText) { let me = this.icn3dui;
|
|
55784
|
+
setIcon(iconType, id, title, iconStyle, url, bText, bHighlight) { let me = this.icn3dui;
|
|
55643
55785
|
if(me.bNode) return '';
|
|
55644
55786
|
|
|
55645
|
-
let color = 'color:#1c94c4; ';
|
|
55787
|
+
let color = (bHighlight) ? 'color:#f8b84e; ' : 'color:#1c94c4; ';
|
|
55646
55788
|
let bkgdColor = ' background-color:#EEE; ';
|
|
55647
55789
|
let cssCursor = (iconType == 'text') ? '' : 'cursor:pointer;';
|
|
55648
55790
|
|
|
@@ -55689,7 +55831,7 @@ class SetMenu {
|
|
|
55689
55831
|
// View menu
|
|
55690
55832
|
html += tdStrBorder + this.setIcon(iconType, 'show_selected', 'View Selection', 'eye') + "</td>";
|
|
55691
55833
|
html += tdStr + this.setIcon(iconType, 'tool_selectedcenter', 'Zoom in Selection', 'search-plus') + "</td>";
|
|
55692
|
-
html += tdStr + this.setIcon(iconType, 'alternate', "Alternate the Structures by keying the letter 'a'", 'a', undefined, true) + "</td>";
|
|
55834
|
+
html += tdStr + this.setIcon(iconType, 'alternate', "Alternate the Structures by keying the letter 'a'", 'a', undefined, true, true) + "</td>";
|
|
55693
55835
|
html += tdStr + this.setIcon(iconType, 'tool_resetOrientation', 'Reset Orientation', 'undo-alt') + "</td>";
|
|
55694
55836
|
|
|
55695
55837
|
// Style menu
|
|
@@ -55888,22 +56030,31 @@ class SetMenu {
|
|
|
55888
56030
|
html += "</li>";
|
|
55889
56031
|
html += "<li><span>Align</span>";
|
|
55890
56032
|
html += "<ul>";
|
|
55891
|
-
|
|
55892
|
-
|
|
56033
|
+
|
|
56034
|
+
html += "<li><span>Multiple Chains</span>";
|
|
56035
|
+
html += "<ul>";
|
|
56036
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn1_chainalignRad', 'mn1_chainalign', 'by Structure Alignment ' + me.htmlCls.wifiStr);
|
|
56037
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn1_chainalignRad', 'mn1_chainalign2', 'by Sequence Alignment ' + me.htmlCls.wifiStr);
|
|
56038
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn1_chainalignRad', 'mn1_chainalign3', 'Residue by Residue');
|
|
56039
|
+
html += "</ul>";
|
|
56040
|
+
html += "</li>";
|
|
56041
|
+
|
|
55893
56042
|
html += "<li><span>Structure to Structure</span>";
|
|
55894
56043
|
html += "<ul>";
|
|
55895
56044
|
html += me.htmlCls.setHtmlCls.getLink('mn1_align', 'Two PDB Structures ' + me.htmlCls.wifiStr);
|
|
55896
56045
|
html += me.htmlCls.setHtmlCls.getLink('mn1_alignaf', 'Two AlphaFold Structures ' + me.htmlCls.wifiStr);
|
|
55897
56046
|
html += "</ul>";
|
|
55898
56047
|
|
|
55899
|
-
html += me.htmlCls.setHtmlCls.getLink('
|
|
56048
|
+
html += me.htmlCls.setHtmlCls.getLink('mn1_blast_rep_id', 'Sequence to Structure');
|
|
55900
56049
|
|
|
55901
56050
|
html += "</ul>";
|
|
55902
56051
|
html += "</li>";
|
|
55903
56052
|
|
|
55904
56053
|
html += "<li id='" + me.pre + "mn2_realignWrap'><span>Realign Selection</span>";
|
|
55905
56054
|
html += "<ul>";
|
|
55906
|
-
|
|
56055
|
+
|
|
56056
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn2_realign', 'mn2_realignonstruct', 'by Structure Alignment ' + me.htmlCls.wifiStr);
|
|
56057
|
+
|
|
55907
56058
|
html += me.htmlCls.setHtmlCls.getRadio('mn2_realign', 'mn2_realignonseqalign', 'by Sequence Alignment ' + me.htmlCls.wifiStr);
|
|
55908
56059
|
html += me.htmlCls.setHtmlCls.getRadio('mn2_realign', 'mn2_realignresbyres', 'Residue by Residue');
|
|
55909
56060
|
html += "</ul>";
|
|
@@ -55970,6 +56121,7 @@ class SetMenu {
|
|
|
55970
56121
|
*/
|
|
55971
56122
|
|
|
55972
56123
|
html += me.htmlCls.setHtmlCls.getLink('mn1_exportPdbRes', 'PDB');
|
|
56124
|
+
html += me.htmlCls.setHtmlCls.getLink('delphipdbh', 'PDB with Hydrogens');
|
|
55973
56125
|
|
|
55974
56126
|
if(me.cfg.cid === undefined) {
|
|
55975
56127
|
html += me.htmlCls.setHtmlCls.getLink('mn1_exportSecondary', 'Secondary Structure');
|
|
@@ -57687,10 +57839,10 @@ class Dialog {
|
|
|
57687
57839
|
height = 500;
|
|
57688
57840
|
}
|
|
57689
57841
|
else if(id === me.pre + 'dl_rmsd') {
|
|
57690
|
-
position ={ my: "
|
|
57842
|
+
position ={ my: "left bottom", at: "left+20 bottom-20", of: "#" + me.pre + "canvas", collision: "none" };
|
|
57691
57843
|
}
|
|
57692
57844
|
else if(id === me.pre + 'dl_legend') {
|
|
57693
|
-
position ={ my: "
|
|
57845
|
+
position ={ my: "left bottom", at: "left+20 bottom-20", of: "#" + me.pre + "canvas", collision: "none" };
|
|
57694
57846
|
}
|
|
57695
57847
|
else if(id === me.pre + 'dl_symd') {
|
|
57696
57848
|
position ={ my: "left top", at: "right-200 bottom-200", of: "#" + me.pre + "canvas", collision: "none" };
|
|
@@ -58000,29 +58152,43 @@ class SetDialog {
|
|
|
58000
58152
|
|
|
58001
58153
|
html += me.htmlCls.divStr + "dl_alignaf' class='" + dialogClass + "'>";
|
|
58002
58154
|
html += "Enter two <a href='https://alphafold.ebi.ac.uk/' target='_blank'>AlphaFold Uniprot</a> IDs: <br/><br/>ID1: " + me.htmlCls.inputTextStr + "id='" + me.pre + "alignafid1' value='P41327' size=8>" + me.htmlCls.space3 + me.htmlCls.space3 + "ID2: " + me.htmlCls.inputTextStr + "id='" + me.pre + "alignafid2' value='P41331' size=8><br/><br/>";
|
|
58003
|
-
html += me.htmlCls.buttonStr + "reload_alignaf'>Align</button>";
|
|
58155
|
+
html += me.htmlCls.buttonStr + "reload_alignaf_tmalign'>Align with TM-align</button>" + me.htmlCls.buttonStr + "reload_alignaf' style='margin-left:30px'>Align with VAST</button>";
|
|
58004
58156
|
html += "</div>";
|
|
58005
58157
|
|
|
58006
58158
|
html += me.htmlCls.divStr + "dl_chainalign' class='" + dialogClass + "'>";
|
|
58007
|
-
/*
|
|
58008
|
-
html += "Enter the PDB chain IDs in the form of pdbid_chain(e.g., 1HHO_A, case sensitive): <br/><br/>ID1: " + me.htmlCls.inputTextStr + "id='" + me.pre + "chainalignid1' value='1HHO_A' size=8>" + me.htmlCls.space3 + me.htmlCls.space3 + "ID2: " + me.htmlCls.inputTextStr + "id='" + me.pre + "chainalignid2' value='4N7N_A' size=8><br/><br/>";
|
|
58009
|
-
html += me.htmlCls.buttonStr + "reload_chainalign'>Align</button><br/><br/>";
|
|
58010
|
-
html += "<div style='width:450px'>(Note: To align chains in custom PDB files, you could concatenate PDB files in a single PDB file with the separation line \"ENDMDL\". Then load it in \"Open File > PDB File\" in the \"File\" menu and click \"View Sequences & Annotations\" in the \"Window\" menu. Finally select two chains in the sequence window and click \"Realign Selection\" in the \"File\" menu.)</div>";
|
|
58011
|
-
html += "</div>";
|
|
58012
|
-
*/
|
|
58013
58159
|
html += "<div style='width:550px'>";
|
|
58014
58160
|
html += "All chains will be aligned to the first chain in the comma-separated chain IDs. Each chain ID has the form of PDBID_chain (e.g., 1HHO_A, case sensitive) or UniprotID (e.g., P69905 for AlphaFold structures).<br/><br/>";
|
|
58015
58161
|
html += "<b>Chain IDs</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "chainalignids' value='P69905,P01942,1HHO_A' size=50><br/><br/>";
|
|
58016
|
-
html += "
|
|
58017
|
-
|
|
58018
|
-
html += "
|
|
58019
|
-
html +=
|
|
58162
|
+
html += me.htmlCls.buttonStr + "reload_chainalign_tmalign'><b>Align with TM-align</b></button>" + me.htmlCls.buttonStr + "reload_chainalign_asym' style='margin-left:30px'><b>Align with VAST</b></button><br/><br/>";
|
|
58163
|
+
|
|
58164
|
+
html += "(Note: To align chains in custom PDB files, you could load them in \"File > Open File > PDB Files (appendable)\" and click \"Analysis > Defined Sets\". Finally select multiple chains in Defined Sets and click \"File > Realign Selection\".)<br><br>";
|
|
58165
|
+
html += "</div></div>";
|
|
58166
|
+
|
|
58167
|
+
html += me.htmlCls.divStr + "dl_chainalign2' class='" + dialogClass + "'>";
|
|
58168
|
+
html += "<div style='width:550px'>";
|
|
58169
|
+
html += "All chains will be aligned to the first chain in the comma-separated chain IDs. Each chain ID has the form of PDBID_chain (e.g., 1HHO_A, case sensitive) or UniprotID (e.g., P69905 for AlphaFold structures).<br/><br/>";
|
|
58170
|
+
html += "<b>Chain IDs</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "chainalignids2' value='P69905,P01942,1HHO_A' size=50><br/><br/>";
|
|
58171
|
+
|
|
58172
|
+
html += "The sequence alignment (followed by structure alignemnt) is based on residue numbers in the First/Master chain: <br>" + me.htmlCls.inputTextStr + "id='" + me.pre + "resalignids' value='1,5,10-50' size=50><br/>";
|
|
58173
|
+
html += me.htmlCls.buttonStr + "reload_chainalign_asym2' style='margin-top:3px;'><b>Align by Sequence Alignment</b></button><br/><br/>";
|
|
58174
|
+
|
|
58175
|
+
html += "(Note: To align chains in custom PDB files, you could load them in \"File > Open File > PDB Files (appendable)\" and click \"Analysis > Defined Sets\". Finally select multiple chains in Defined Sets and click \"File > Realign Selection\".)<br><br>";
|
|
58176
|
+
html += "</div></div>";
|
|
58177
|
+
|
|
58178
|
+
html += me.htmlCls.divStr + "dl_chainalign3' class='" + dialogClass + "'>";
|
|
58179
|
+
html += "<div style='width:550px'>";
|
|
58180
|
+
html += "All chains will be aligned to the first chain in the comma-separated chain IDs. Each chain ID has the form of PDBID_chain (e.g., 1HHO_A, case sensitive) or UniprotID (e.g., P69905 for AlphaFold structures).<br/><br/>";
|
|
58181
|
+
html += "<b>Chain IDs</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "chainalignids3' value='P69905,P01942,1HHO_A' size=50><br/><br/>";
|
|
58182
|
+
|
|
58183
|
+
html += "Each alignment is defined as \" | \"-separated residue lists in one line. \"10-50\" means a range of residues from 10 to 50.<br><textarea id='" + me.pre + "predefinedres' rows='5' style='width: 100%; height: " +(me.htmlCls.LOG_HEIGHT) + "px; padding: 0px; border: 0px;'>1,5,10-50 | 1,5,10-50 \n2,6,11-51 | 1,5,10-50</textarea><br/>";
|
|
58184
|
+
html += me.htmlCls.buttonStr + "reload_chainalign_asym3'><b>Align Residue by Residue</b></button><br/><br/>";
|
|
58185
|
+
|
|
58020
58186
|
html += "(Note: To align chains in custom PDB files, you could load them in \"File > Open File > PDB Files (appendable)\" and click \"Analysis > Defined Sets\". Finally select multiple chains in Defined Sets and click \"File > Realign Selection\".)<br><br>";
|
|
58021
58187
|
html += "</div></div>";
|
|
58022
58188
|
|
|
58023
58189
|
html += me.htmlCls.divStr + "dl_mutation' class='" + dialogClass + "'>";
|
|
58024
58190
|
html += "<div style='width:500px'>";
|
|
58025
|
-
html += 'Please specify the mutations with a comma separated mutation list. Each mutation can be specified as "[PDB ID]_[Chain ID]_[Residue Number]_[One Letter Mutatnt Residue]". E.g., the mutation of N501Y in the E chain of PDB 6M0J can be specified as "6M0J_E_501_Y".
|
|
58191
|
+
html += 'Please specify the mutations with a comma separated mutation list. Each mutation can be specified as "[PDB ID or AlphaFold UniProt ID]_[Chain ID]_[Residue Number]_[One Letter Mutatnt Residue]". E.g., the mutation of N501Y in the E chain of PDB 6M0J can be specified as "6M0J_E_501_Y". For AlphaFold structures, the "Chain ID" is "A".<br/><br/>';
|
|
58026
58192
|
html += "<div style='display:inline-block; width:110px'>Mutations: </div>" + me.htmlCls.inputTextStr + "id='" + me.pre + "mutationids' value='6M0J_E_484_K,6M0J_E_501_Y,6M0J_E_417_N' size=50><br/><br/>";
|
|
58027
58193
|
|
|
58028
58194
|
html += "<b>Data Source</b>: <select id='" + me.pre + "idsource'>";
|
|
@@ -58362,7 +58528,7 @@ class SetDialog {
|
|
|
58362
58528
|
html += "<div style='text-indent:1.1em'><select id='" + me.pre + "atomsCustomRealignByStruct' multiple size='5' style='min-width:130px;'>";
|
|
58363
58529
|
html += "</select></div>";
|
|
58364
58530
|
|
|
58365
|
-
html += "<div>2. " + me.htmlCls.buttonStr + "applyRealignByStruct'>Realign
|
|
58531
|
+
html += "<div>2. " + me.htmlCls.buttonStr + "applyRealignByStruct_tmalign'>Realign with TM-align</button>" + me.htmlCls.buttonStr + "applyRealignByStruct' style='margin-left:30px'>Realign with VAST</button></div><br>";
|
|
58366
58532
|
html += "</div>";
|
|
58367
58533
|
|
|
58368
58534
|
|
|
@@ -58820,7 +58986,7 @@ class SetDialog {
|
|
|
58820
58986
|
html += "</div>";
|
|
58821
58987
|
|
|
58822
58988
|
html += me.htmlCls.divStr + "dl_rmsd' class='" + dialogClass + "'>";
|
|
58823
|
-
|
|
58989
|
+
|
|
58824
58990
|
html += "</div>";
|
|
58825
58991
|
|
|
58826
58992
|
html += me.htmlCls.divStr + "dl_buriedarea' class='" + dialogClass + "'>";
|
|
@@ -59006,7 +59172,7 @@ class Events {
|
|
|
59006
59172
|
|
|
59007
59173
|
saveHtml(id) { let me = this.icn3dui, ic = me.icn3d;
|
|
59008
59174
|
let html = '';
|
|
59009
|
-
html += '<link rel="stylesheet" href="https:///structure.ncbi.nlm.nih.gov/icn3d/lib/jquery-ui-1.
|
|
59175
|
+
html += '<link rel="stylesheet" href="https:///structure.ncbi.nlm.nih.gov/icn3d/lib/jquery-ui-1.13.2.min.css">\n';
|
|
59010
59176
|
html += '<link rel="stylesheet" href="https:///structure.ncbi.nlm.nih.gov/icn3d/icn3d_full_ui.css">\n';
|
|
59011
59177
|
html += $("#" + id).html();
|
|
59012
59178
|
let idArray = id.split('_');
|
|
@@ -59172,6 +59338,8 @@ class Events {
|
|
|
59172
59338
|
// },
|
|
59173
59339
|
// clickRealignonseqalign: function() {
|
|
59174
59340
|
me.myEventCls.onIds("#" + me.pre + "mn2_realignonseqalign", "click", function(e) { let ic = me.icn3d;
|
|
59341
|
+
if(ic.bRender) me.htmlCls.dialogCls.openDlg('dl_realign', 'Please select two sets to realign');
|
|
59342
|
+
|
|
59175
59343
|
if(Object.keys(ic.structures).length < 2) {
|
|
59176
59344
|
var aaa = 1; //alert("At least two structuresare required for alignment...");
|
|
59177
59345
|
return;
|
|
@@ -59187,15 +59355,14 @@ class Events {
|
|
|
59187
59355
|
if($("#" + me.pre + "atomsCustomRealign").length) {
|
|
59188
59356
|
$("#" + me.pre + "atomsCustomRealign").html(definedAtomsHtml);
|
|
59189
59357
|
}
|
|
59190
|
-
|
|
59191
|
-
// $("#" + me.pre + "atomsCustomRealign2").html(definedAtomsHtml);
|
|
59192
|
-
//}
|
|
59193
|
-
if(ic.bRender) me.htmlCls.dialogCls.openDlg('dl_realign', 'Please select two sets to realign');
|
|
59358
|
+
|
|
59194
59359
|
$("#" + me.pre + "atomsCustomRealign").resizable();
|
|
59195
59360
|
//$("#" + me.pre + "atomsCustomRealign2").resizable();
|
|
59196
59361
|
});
|
|
59197
59362
|
|
|
59198
59363
|
me.myEventCls.onIds("#" + me.pre + "mn2_realignonstruct", "click", function(e) { let ic = me.icn3d;
|
|
59364
|
+
if(ic.bRender) me.htmlCls.dialogCls.openDlg('dl_realignbystruct', 'Please select two sets to realign');
|
|
59365
|
+
|
|
59199
59366
|
if(Object.keys(ic.structures).length < 2) {
|
|
59200
59367
|
var aaa = 1; //alert("At least two structuresare required for alignment...");
|
|
59201
59368
|
return;
|
|
@@ -59210,10 +59377,7 @@ class Events {
|
|
|
59210
59377
|
if($("#" + me.pre + "atomsCustomRealignByStruct").length) {
|
|
59211
59378
|
$("#" + me.pre + "atomsCustomRealignByStruct").html(definedAtomsHtml);
|
|
59212
59379
|
}
|
|
59213
|
-
|
|
59214
|
-
// $("#" + me.pre + "atomsCustomRealign2").html(definedAtomsHtml);
|
|
59215
|
-
//}
|
|
59216
|
-
if(ic.bRender) me.htmlCls.dialogCls.openDlg('dl_realignbystruct', 'Please select two sets to realign');
|
|
59380
|
+
|
|
59217
59381
|
$("#" + me.pre + "atomsCustomRealignByStruct").resizable();
|
|
59218
59382
|
//$("#" + me.pre + "atomsCustomRealign2").resizable();
|
|
59219
59383
|
});
|
|
@@ -59263,6 +59427,25 @@ class Events {
|
|
|
59263
59427
|
me.htmlCls.clickMenuCls.setLogCmd("realign on structure align", true);
|
|
59264
59428
|
}
|
|
59265
59429
|
});
|
|
59430
|
+
|
|
59431
|
+
me.myEventCls.onIds("#" + me.pre + "applyRealignByStruct_tmalign", "click", function(e) { let ic = me.icn3d;
|
|
59432
|
+
e.preventDefault();
|
|
59433
|
+
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
59434
|
+
let nameArray = $("#" + me.pre + "atomsCustomRealignByStruct").val();
|
|
59435
|
+
if(nameArray.length > 0) {
|
|
59436
|
+
ic.hAtoms = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
|
|
59437
|
+
}
|
|
59438
|
+
|
|
59439
|
+
me.cfg.aligntool = 'tmalign';
|
|
59440
|
+
|
|
59441
|
+
ic.realignParserCls.realignOnStructAlign();
|
|
59442
|
+
if(nameArray.length > 0) {
|
|
59443
|
+
me.htmlCls.clickMenuCls.setLogCmd("realign on tmalign | " + nameArray, true);
|
|
59444
|
+
}
|
|
59445
|
+
else {
|
|
59446
|
+
me.htmlCls.clickMenuCls.setLogCmd("realign on tmalign", true);
|
|
59447
|
+
}
|
|
59448
|
+
});
|
|
59266
59449
|
// },
|
|
59267
59450
|
|
|
59268
59451
|
me.myEventCls.onIds("#" + me.pre + "applyColorSpectrumBySets", "click", function(e) { let ic = me.icn3d;
|
|
@@ -59486,19 +59669,28 @@ class Events {
|
|
|
59486
59669
|
window.open(hostUrl + '?align=' + alignment + '&showalignseq=1&atype=0&bu=1', '_blank');
|
|
59487
59670
|
});
|
|
59488
59671
|
|
|
59489
|
-
|
|
59672
|
+
me.myEventCls.onIds("#" + me.pre + "reload_alignaf", "click", function(e) { me.icn3d;
|
|
59490
59673
|
e.preventDefault();
|
|
59491
59674
|
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
59492
59675
|
let alignment = $("#" + me.pre + "alignafid1").val() + "_A," + $("#" + me.pre + "alignafid2").val() + "_A";
|
|
59493
59676
|
me.htmlCls.clickMenuCls.setLogCmd("load chains " + alignment + " | residues | resdef ", false);
|
|
59494
59677
|
window.open(hostUrl + '?chainalign=' + alignment + '&resnum=&resdef=&showalignseq=1', '_blank');
|
|
59495
59678
|
});
|
|
59679
|
+
|
|
59680
|
+
me.myEventCls.onIds("#" + me.pre + "reload_alignaf_tmalign", "click", function(e) { me.icn3d;
|
|
59681
|
+
e.preventDefault();
|
|
59682
|
+
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
59683
|
+
let alignment = $("#" + me.pre + "alignafid1").val() + "_A," + $("#" + me.pre + "alignafid2").val() + "_A";
|
|
59684
|
+
me.htmlCls.clickMenuCls.setLogCmd("load chains " + alignment + " | residues | resdef | align tmalign", false);
|
|
59685
|
+
window.open(hostUrl + '?chainalign=' + alignment + '&aligntool=tmalign&resnum=&resdef=&showalignseq=1', '_blank');
|
|
59686
|
+
});
|
|
59496
59687
|
// },
|
|
59497
59688
|
// clickReload_chainalign: function() {
|
|
59498
|
-
|
|
59689
|
+
/*
|
|
59690
|
+
me.myEventCls.onIds("#" + me.pre + "reload_chainalign", "click", function(e) { let ic = me.icn3d;
|
|
59499
59691
|
e.preventDefault();
|
|
59500
59692
|
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
59501
|
-
|
|
59693
|
+
|
|
59502
59694
|
let alignment = $("#" + me.pre + "chainalignids").val();
|
|
59503
59695
|
let idArray = alignment.split(',');
|
|
59504
59696
|
let alignment_final = '';
|
|
@@ -59508,21 +59700,20 @@ class Events {
|
|
|
59508
59700
|
}
|
|
59509
59701
|
let resalign = $("#" + me.pre + "resalignids").val();
|
|
59510
59702
|
let predefinedres = $("#" + me.pre + "predefinedres").val().trim().replace(/\n/g, '; ');
|
|
59511
|
-
|
|
59512
59703
|
if(predefinedres && alignment_final.split(',').length - 1 != predefinedres.split('; ').length) {
|
|
59513
59704
|
var aaa = 1; //alert("Please make sure the number of chains and the lines of predefined residues are the same...");
|
|
59514
59705
|
return;
|
|
59515
59706
|
}
|
|
59516
59707
|
|
|
59517
59708
|
me.htmlCls.clickMenuCls.setLogCmd("load chains " + alignment_final + " | residues " + resalign + " | resdef " + predefinedres, false);
|
|
59518
|
-
//window.open(me.htmlCls.baseUrl + 'icn3d/full.html?chainalign=' + alignment + '&resnum=' + resalign + '&resdef=' + predefinedres + '&showalignseq=1', '_blank');
|
|
59519
59709
|
window.open(hostUrl + '?chainalign=' + alignment_final + '&resnum=' + resalign + '&resdef=' + predefinedres + '&showalignseq=1', '_blank');
|
|
59520
59710
|
});
|
|
59711
|
+
*/
|
|
59521
59712
|
|
|
59522
59713
|
me.myEventCls.onIds("#" + me.pre + "reload_chainalign_asym", "click", function(e) { me.icn3d;
|
|
59523
59714
|
e.preventDefault();
|
|
59524
59715
|
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
59525
|
-
|
|
59716
|
+
|
|
59526
59717
|
let alignment = $("#" + me.pre + "chainalignids").val();
|
|
59527
59718
|
let idArray = alignment.split(',');
|
|
59528
59719
|
let alignment_final = '';
|
|
@@ -59530,18 +59721,66 @@ class Events {
|
|
|
59530
59721
|
alignment_final += (idArray[i].indexOf('_') != -1) ? idArray[i] : idArray[i] + '_A'; // AlphaFold ID
|
|
59531
59722
|
if(i < il - 1) alignment_final += ',';
|
|
59532
59723
|
}
|
|
59533
|
-
let resalign = $("#" + me.pre + "resalignids").val();
|
|
59534
|
-
let predefinedres = $("#" + me.pre + "predefinedres").val().trim().replace(/\n/g, '; ');
|
|
59535
|
-
if(predefinedres && alignment_final.split(',').length - 1 != predefinedres.split('; ').length) {
|
|
59536
|
-
var aaa = 1; //alert("Please make sure the number of chains and the lines of predefined residues are the same...");
|
|
59537
|
-
return;
|
|
59538
|
-
}
|
|
59539
59724
|
|
|
59540
|
-
me.htmlCls.clickMenuCls.setLogCmd("load chains " + alignment_final + " on asymmetric unit | residues
|
|
59541
|
-
|
|
59542
|
-
window.open(hostUrl + '?chainalign=' + alignment_final + '&resnum=' + resalign + '&resdef=' + predefinedres + '&showalignseq=1&bu=0', '_blank');
|
|
59725
|
+
me.htmlCls.clickMenuCls.setLogCmd("load chains " + alignment_final + " on asymmetric unit | residues | resdef ", false);
|
|
59726
|
+
window.open(hostUrl + '?chainalign=' + alignment_final + '&resnum=&resdef=&showalignseq=1&bu=0', '_blank');
|
|
59543
59727
|
});
|
|
59544
59728
|
|
|
59729
|
+
me.myEventCls.onIds("#" + me.pre + "reload_chainalign_asym2", "click", function(e) { me.icn3d;
|
|
59730
|
+
e.preventDefault();
|
|
59731
|
+
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
59732
|
+
|
|
59733
|
+
let alignment = $("#" + me.pre + "chainalignids2").val();
|
|
59734
|
+
let idArray = alignment.split(',');
|
|
59735
|
+
let alignment_final = '';
|
|
59736
|
+
for(let i = 0, il = idArray.length; i < il; ++i) {
|
|
59737
|
+
alignment_final += (idArray[i].indexOf('_') != -1) ? idArray[i] : idArray[i] + '_A'; // AlphaFold ID
|
|
59738
|
+
if(i < il - 1) alignment_final += ',';
|
|
59739
|
+
}
|
|
59740
|
+
let resalign = $("#" + me.pre + "resalignids").val();
|
|
59741
|
+
|
|
59742
|
+
me.htmlCls.clickMenuCls.setLogCmd("load chains " + alignment_final + " on asymmetric unit | residues " + resalign + " | resdef ", false);
|
|
59743
|
+
window.open(hostUrl + '?chainalign=' + alignment_final + '&resnum=' + resalign + '&resdef=&showalignseq=1&bu=0', '_blank');
|
|
59744
|
+
});
|
|
59745
|
+
|
|
59746
|
+
me.myEventCls.onIds("#" + me.pre + "reload_chainalign_asym3", "click", function(e) { me.icn3d;
|
|
59747
|
+
e.preventDefault();
|
|
59748
|
+
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
59749
|
+
|
|
59750
|
+
let alignment = $("#" + me.pre + "chainalignids3").val();
|
|
59751
|
+
let idArray = alignment.split(',');
|
|
59752
|
+
let alignment_final = '';
|
|
59753
|
+
for(let i = 0, il = idArray.length; i < il; ++i) {
|
|
59754
|
+
alignment_final += (idArray[i].indexOf('_') != -1) ? idArray[i] : idArray[i] + '_A'; // AlphaFold ID
|
|
59755
|
+
if(i < il - 1) alignment_final += ',';
|
|
59756
|
+
}
|
|
59757
|
+
|
|
59758
|
+
let predefinedres = $("#" + me.pre + "predefinedres").val().trim().replace(/\n/g, '; ');
|
|
59759
|
+
if(predefinedres && alignment_final.split(',').length - 1 != predefinedres.split('; ').length) {
|
|
59760
|
+
var aaa = 1; //alert("Please make sure the number of chains and the lines of predefined residues are the same...");
|
|
59761
|
+
return;
|
|
59762
|
+
}
|
|
59763
|
+
|
|
59764
|
+
me.htmlCls.clickMenuCls.setLogCmd("load chains " + alignment_final + " on asymmetric unit | residues | resdef " + predefinedres, false);
|
|
59765
|
+
window.open(hostUrl + '?chainalign=' + alignment_final + '&resnum=&resdef=' + predefinedres + '&showalignseq=1&bu=0', '_blank');
|
|
59766
|
+
});
|
|
59767
|
+
|
|
59768
|
+
me.myEventCls.onIds("#" + me.pre + "reload_chainalign_tmalign", "click", function(e) { me.icn3d;
|
|
59769
|
+
e.preventDefault();
|
|
59770
|
+
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
59771
|
+
|
|
59772
|
+
let alignment = $("#" + me.pre + "chainalignids").val();
|
|
59773
|
+
let idArray = alignment.split(',');
|
|
59774
|
+
let alignment_final = '';
|
|
59775
|
+
for(let i = 0, il = idArray.length; i < il; ++i) {
|
|
59776
|
+
alignment_final += (idArray[i].indexOf('_') != -1) ? idArray[i] : idArray[i] + '_A'; // AlphaFold ID
|
|
59777
|
+
if(i < il - 1) alignment_final += ',';
|
|
59778
|
+
}
|
|
59779
|
+
|
|
59780
|
+
me.htmlCls.clickMenuCls.setLogCmd("load chains " + alignment_final + " on asymmetric unit | residues | resdef | align tmalign", false);
|
|
59781
|
+
window.open(hostUrl + '?chainalign=' + alignment_final + '&aligntool=tmalign&resnum=&resdef=&showalignseq=1&bu=0', '_blank');
|
|
59782
|
+
});
|
|
59783
|
+
|
|
59545
59784
|
me.myEventCls.onIds("#" + me.pre + "reload_mutation_3d", "click", function(e) { me.icn3d;
|
|
59546
59785
|
e.preventDefault();
|
|
59547
59786
|
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
@@ -60646,6 +60885,27 @@ class Events {
|
|
|
60646
60885
|
let color = $("#" + me.pre + "colorcustom").val();
|
|
60647
60886
|
picker.set('#' + color).enter();
|
|
60648
60887
|
});
|
|
60888
|
+
|
|
60889
|
+
let picker2 = new CP(document.querySelector("#" + me.pre + "labelcolorall"));
|
|
60890
|
+
picker2.on("change", function(color) {
|
|
60891
|
+
this.target.value = color;
|
|
60892
|
+
});
|
|
60893
|
+
me.myEventCls.onIds("#" + me.pre + "labelcolorall", "input", function() {
|
|
60894
|
+
let color = $("#" + me.pre + "labelcolorall").val();
|
|
60895
|
+
picker2.set('#' + color).enter();
|
|
60896
|
+
});
|
|
60897
|
+
me.myEventCls.onIds("#" + me.pre + "labelcolorall", "keyup", function() {
|
|
60898
|
+
let color = $("#" + me.pre + "labelcolorall").val();
|
|
60899
|
+
picker2.set('#' + color).enter();
|
|
60900
|
+
});
|
|
60901
|
+
me.myEventCls.onIds("#" + me.pre + "labelcolorall", "paste", function() {
|
|
60902
|
+
let color = $("#" + me.pre + "labelcolorall").val();
|
|
60903
|
+
picker2.set('#' + color).enter();
|
|
60904
|
+
});
|
|
60905
|
+
me.myEventCls.onIds("#" + me.pre + "labelcolorall", "cut", function() {
|
|
60906
|
+
let color = $("#" + me.pre + "labelcolorall").val();
|
|
60907
|
+
picker2.set('#' + color).enter();
|
|
60908
|
+
});
|
|
60649
60909
|
// },
|
|
60650
60910
|
// clickApplypick_stabilizer_rm: function() {
|
|
60651
60911
|
me.myEventCls.onIds("#" + me.pre + "applypick_stabilizer_rm", "click", function(e) { let ic = me.icn3d;
|
|
@@ -61920,7 +62180,7 @@ class SetHtml {
|
|
|
61920
62180
|
return html;
|
|
61921
62181
|
}
|
|
61922
62182
|
|
|
61923
|
-
exportPqr() { let me = this.icn3dui, ic = me.icn3d;
|
|
62183
|
+
exportPqr(bPdb) { let me = this.icn3dui, ic = me.icn3d;
|
|
61924
62184
|
let ionHash = {};
|
|
61925
62185
|
let atomHash = {};
|
|
61926
62186
|
/*
|
|
@@ -61952,13 +62212,15 @@ class SetHtml {
|
|
|
61952
62212
|
}
|
|
61953
62213
|
}
|
|
61954
62214
|
|
|
62215
|
+
let fileExt = (bPdb) ? 'pdb' : 'pqr';
|
|
61955
62216
|
if(me.cfg.cid) {
|
|
61956
62217
|
let pqrStr = '';
|
|
61957
62218
|
/// pqrStr += ic.saveFileCls.getPDBHeader();
|
|
61958
|
-
|
|
62219
|
+
let bPqr = (bPdb) ? false : true;
|
|
62220
|
+
pqrStr += ic.saveFileCls.getAtomPDB(atomHash, bPqr) + ic.saveFileCls.getAtomPDB(ionHash, bPqr);
|
|
61959
62221
|
|
|
61960
62222
|
let file_pref =(ic.inputid) ? ic.inputid : "custom";
|
|
61961
|
-
ic.saveFileCls.saveFile(file_pref + '_icn3d.
|
|
62223
|
+
ic.saveFileCls.saveFile(file_pref + '_icn3d.' + fileExt, 'text', [pqrStr]);
|
|
61962
62224
|
}
|
|
61963
62225
|
else {
|
|
61964
62226
|
let bCalphaOnly = me.utilsCls.isCalphaPhosOnly(me.hashUtilsCls.hash2Atoms(atomHash, ic.atoms));
|
|
@@ -61994,8 +62256,40 @@ class SetHtml {
|
|
|
61994
62256
|
success: function(data) {
|
|
61995
62257
|
let pqrStr = data;
|
|
61996
62258
|
|
|
62259
|
+
if(bPdb) {
|
|
62260
|
+
let lineArray = pqrStr.split('\n');
|
|
62261
|
+
|
|
62262
|
+
let pdbStr = '';
|
|
62263
|
+
for(let i = 0, il = lineArray.length; i < il; ++i) {
|
|
62264
|
+
let line = lineArray[i];
|
|
62265
|
+
if(line.substr(0, 6) == 'ATOM ' || line.substr(0, 6) == 'HETATM') {
|
|
62266
|
+
let atomName = line.substr(12, 4).trim();
|
|
62267
|
+
let elem;
|
|
62268
|
+
if(line.substr(0, 6) == 'ATOM ') {
|
|
62269
|
+
elem = atomName.substr(0, 1);
|
|
62270
|
+
}
|
|
62271
|
+
else {
|
|
62272
|
+
let twochar = atomName.substr(0, 2);
|
|
62273
|
+
if(me.parasCls.vdwRadii.hasOwnProperty(twochar)) {
|
|
62274
|
+
elem = twochar;
|
|
62275
|
+
}
|
|
62276
|
+
else {
|
|
62277
|
+
elem = atomName.substr(0, 1);
|
|
62278
|
+
}
|
|
62279
|
+
}
|
|
62280
|
+
|
|
62281
|
+
pdbStr += line.substr(0, 54) + ' ' + elem.padStart(2, ' ') + '\n';
|
|
62282
|
+
}
|
|
62283
|
+
else {
|
|
62284
|
+
pdbStr += line + '\n';
|
|
62285
|
+
}
|
|
62286
|
+
}
|
|
62287
|
+
|
|
62288
|
+
pqrStr = pdbStr;
|
|
62289
|
+
}
|
|
62290
|
+
|
|
61997
62291
|
let file_pref =(ic.inputid) ? ic.inputid : "custom";
|
|
61998
|
-
ic.saveFileCls.saveFile(file_pref + '_icn3d_residues.
|
|
62292
|
+
ic.saveFileCls.saveFile(file_pref + '_icn3d_residues.' + fileExt, 'text', [pqrStr]);
|
|
61999
62293
|
},
|
|
62000
62294
|
error : function(xhr, textStatus, errorThrown ) {
|
|
62001
62295
|
this.tryCount++;
|
|
@@ -62360,7 +62654,8 @@ class Html {
|
|
|
62360
62654
|
this.simulation = undefined;
|
|
62361
62655
|
|
|
62362
62656
|
//this.baseUrl = "https://structure.ncbi.nlm.nih.gov/";
|
|
62363
|
-
this.baseUrl =
|
|
62657
|
+
this.baseUrl = (window && window.location && window.location.hostname == 'structure.ncbi.nlm.nih.gov')
|
|
62658
|
+
? "https://structure.ncbi.nlm.nih.gov/Structure/" : "https://www.ncbi.nlm.nih.gov/Structure/";
|
|
62364
62659
|
this.divStr = "<div id='" + this.icn3dui.pre;
|
|
62365
62660
|
this.divNowrapStr = "<div style='white-space:nowrap'>";
|
|
62366
62661
|
this.spanNowrapStr = "<span style='white-space:nowrap'>";
|
|
@@ -65848,7 +66143,7 @@ class iCn3DUI {
|
|
|
65848
66143
|
//even when multiple iCn3D viewers are shown together.
|
|
65849
66144
|
this.pre = this.cfg.divid + "_";
|
|
65850
66145
|
|
|
65851
|
-
this.REVISION = '3.
|
|
66146
|
+
this.REVISION = '3.13.2';
|
|
65852
66147
|
|
|
65853
66148
|
// In nodejs, iCn3D defines "window = {navigator: {}}"
|
|
65854
66149
|
this.bNode = (Object.keys(window).length < 2) ? true : false;
|
|
@@ -66258,7 +66553,7 @@ iCn3DUI.prototype.show3DStructure = function(pdbStr) { let me = this;
|
|
|
66258
66553
|
|
|
66259
66554
|
ic.bChainAlign = true;
|
|
66260
66555
|
ic.inputid = me.cfg.chainalign;
|
|
66261
|
-
ic.loadCmd = 'load chainalignment ' + me.cfg.chainalign + ' | resnum ' + me.cfg.resnum + ' | resdef ' + me.cfg.resdef + ' | parameters ' + me.cfg.inpara;
|
|
66556
|
+
ic.loadCmd = 'load chainalignment ' + me.cfg.chainalign + ' | resnum ' + me.cfg.resnum + ' | resdef ' + me.cfg.resdef + ' | aligntool ' + me.cfg.aligntool + ' | parameters ' + me.cfg.inpara;
|
|
66262
66557
|
me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
|
|
66263
66558
|
ic.chainalignParserCls.downloadChainalignment(me.cfg.chainalign, me.cfg.resnum, me.cfg.resdef);
|
|
66264
66559
|
}
|