icn3d 3.4.12 → 3.5.0
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 +1171 -405
- package/package.json +1 -1
package/icn3d.js
CHANGED
|
@@ -4113,6 +4113,7 @@ class ParasCls {
|
|
|
4113
4113
|
}
|
|
4114
4114
|
|
|
4115
4115
|
thr(color) { this.icn3dui;
|
|
4116
|
+
if(color == '#0') color = '#000';
|
|
4116
4117
|
return new THREE.Color(color);
|
|
4117
4118
|
}
|
|
4118
4119
|
}
|
|
@@ -7258,7 +7259,8 @@ class Strand {
|
|
|
7258
7259
|
let atomsAdjust = {};
|
|
7259
7260
|
|
|
7260
7261
|
//if( (bHighlight === 1 || bHighlight === 2) && !ic.bAllAtoms) {
|
|
7261
|
-
if( !ic.bAllAtoms) {
|
|
7262
|
+
//if( !ic.bAllAtoms) {
|
|
7263
|
+
if( Object.keys(atoms).length < Object.keys(ic.atoms).length) {
|
|
7262
7264
|
atomsAdjust = this.getSSExpandedAtoms(atoms);
|
|
7263
7265
|
}
|
|
7264
7266
|
else {
|
|
@@ -11947,7 +11949,7 @@ class ShareLink {
|
|
|
11947
11949
|
}
|
|
11948
11950
|
|
|
11949
11951
|
statefile = statefile.replace(/!/g, Object.keys(ic.structures)[0] + '_');
|
|
11950
|
-
if((ic.bInputfile && !ic.bInputUrlfile) || url.length > 4000) url = statefile;
|
|
11952
|
+
if((ic.bInputfile && !ic.bInputUrlfile) || (ic.bInputUrlfile && ic.bAppend) || url.length > 4000) url = statefile;
|
|
11951
11953
|
let id;
|
|
11952
11954
|
if(ic.structures !== undefined && Object.keys(ic.structures).length == 1 && ic.inputid !== undefined) {
|
|
11953
11955
|
id = Object.keys(ic.structures)[0];
|
|
@@ -11967,22 +11969,27 @@ class ShareLink {
|
|
|
11967
11969
|
|
|
11968
11970
|
let text = "";
|
|
11969
11971
|
if(ic.bInputfile) {
|
|
11970
|
-
url = this.shareLinkUrl(bAllCommands); // output state file if ic.bInputfile is true or the URL is
|
|
11972
|
+
url = this.shareLinkUrl(bAllCommands); // output state file if ic.bInputfile is true or the URL is more than 4000 chars
|
|
11971
11973
|
|
|
11972
|
-
|
|
11973
|
-
|
|
11974
|
-
|
|
11974
|
+
if(url.substr(0,4) == 'http') {
|
|
11975
|
+
text += "\nShare Link: " + url;
|
|
11976
|
+
}
|
|
11977
|
+
else {
|
|
11978
|
+
text += "\nStart of type file======\n";
|
|
11979
|
+
text += ic.InputfileType + "\n";
|
|
11980
|
+
text += "End of type file======\n";
|
|
11975
11981
|
|
|
11976
|
-
|
|
11977
|
-
|
|
11978
|
-
/// text += ic.saveFileCls.getPDBHeader();
|
|
11979
|
-
|
|
11982
|
+
text += "Start of data file======\n";
|
|
11983
|
+
//text += ic.InputfileData;
|
|
11984
|
+
/// text += ic.saveFileCls.getPDBHeader();
|
|
11985
|
+
text += ic.saveFileCls.getAtomPDB(ic.atoms);
|
|
11980
11986
|
|
|
11981
|
-
|
|
11987
|
+
text += "End of data file======\n";
|
|
11982
11988
|
|
|
11983
|
-
|
|
11984
|
-
|
|
11985
|
-
|
|
11989
|
+
text += "Start of state file======\n";
|
|
11990
|
+
text += url + "\n";
|
|
11991
|
+
text += "End of state file======\n";
|
|
11992
|
+
}
|
|
11986
11993
|
}
|
|
11987
11994
|
else {
|
|
11988
11995
|
url = this.shareLinkUrl();
|
|
@@ -11992,7 +11999,7 @@ class ShareLink {
|
|
|
11992
11999
|
|
|
11993
12000
|
text += "\nStart of state file======\n";
|
|
11994
12001
|
|
|
11995
|
-
text += url;
|
|
12002
|
+
text += url + "\n";
|
|
11996
12003
|
text += "End of state file======\n";
|
|
11997
12004
|
}
|
|
11998
12005
|
else {
|
|
@@ -12018,11 +12025,14 @@ class HlObjects {
|
|
|
12018
12025
|
//Show the highlight for the selected atoms: hAtoms.
|
|
12019
12026
|
addHlObjects(color, bRender, atomsHash) { let ic = this.icn3d, me = ic.icn3dui;
|
|
12020
12027
|
if(color === undefined) color = ic.hColor;
|
|
12021
|
-
if(atomsHash === undefined) atomsHash = ic.hAtoms;
|
|
12028
|
+
//if(atomsHash === undefined) atomsHash = ic.hAtoms;
|
|
12029
|
+
let atomsHashDisplay = (atomsHash) ? me.hashUtilsCls.intHash(atomsHash, ic.dAtoms) : me.hashUtilsCls.intHash(ic.hAtoms, ic.dAtoms);
|
|
12022
12030
|
|
|
12023
|
-
ic.applyDisplayCls.applyDisplayOptions(ic.opts,
|
|
12031
|
+
ic.applyDisplayCls.applyDisplayOptions(ic.opts, atomsHashDisplay, ic.bHighlight);
|
|
12024
12032
|
|
|
12025
|
-
if( (bRender) || (ic.bRender) )
|
|
12033
|
+
if( (bRender) || (ic.bRender) ) {
|
|
12034
|
+
ic.drawCls.render();
|
|
12035
|
+
}
|
|
12026
12036
|
};
|
|
12027
12037
|
|
|
12028
12038
|
//Remove the highlight. The atom selection does not change.
|
|
@@ -14311,6 +14321,9 @@ class HBond {
|
|
|
14311
14321
|
break;
|
|
14312
14322
|
}
|
|
14313
14323
|
}
|
|
14324
|
+
|
|
14325
|
+
if(!C_atom) continue;
|
|
14326
|
+
|
|
14314
14327
|
let inAcceptorC = C_atom.coord;
|
|
14315
14328
|
let inAcceptorO = inAcceptor.coord;
|
|
14316
14329
|
|
|
@@ -15468,7 +15481,7 @@ class GetGraph {
|
|
|
15468
15481
|
let strokecolor = '#000';
|
|
15469
15482
|
let strokewidth = '1';
|
|
15470
15483
|
let textcolor = '#000';
|
|
15471
|
-
let fontsize = '6';
|
|
15484
|
+
let fontsize = '6px'; // '6';
|
|
15472
15485
|
let html = "<g class='icn3d-node' resid='" + resid + "' >";
|
|
15473
15486
|
html += "<title>" + node.id + "</title>";
|
|
15474
15487
|
if(bVertical) {
|
|
@@ -18359,7 +18372,7 @@ class ResidueLabels {
|
|
|
18359
18372
|
if(me.bNode) return;
|
|
18360
18373
|
|
|
18361
18374
|
let size = 18;
|
|
18362
|
-
let background = "#CCCCCC";
|
|
18375
|
+
let background = "#FFFFFF"; //"#CCCCCC";
|
|
18363
18376
|
|
|
18364
18377
|
let atomsHash = me.hashUtilsCls.intHash(ic.hAtoms, atoms);
|
|
18365
18378
|
|
|
@@ -18399,7 +18412,8 @@ class ResidueLabels {
|
|
|
18399
18412
|
label.factor = 0.3;
|
|
18400
18413
|
|
|
18401
18414
|
let atomColorStr = atom.color.getHexString().toUpperCase();
|
|
18402
|
-
label.color = (atomColorStr === "CCCCCC" || atomColorStr === "C8C8C8") ? "#888888" : "#" + atomColorStr;
|
|
18415
|
+
label.color = (ic.opts.background == 'white' || ic.opts.background == 'gray') ? ic.colorWhitebkgd : ic.colorBlackbkgd; //(atomColorStr === "CCCCCC" || atomColorStr === "C8C8C8") ? "#888888" : "#" + atomColorStr;
|
|
18416
|
+
if(bSchematic) label.color = (atomColorStr === "CCCCCC" || atomColorStr === "C8C8C8") ? "#888888" : "#" + atomColorStr;
|
|
18403
18417
|
label.background = background;
|
|
18404
18418
|
//label.alpha = alpha; // ic.labelCls.hideLabels() didn't work. Remove this line for now
|
|
18405
18419
|
|
|
@@ -18443,7 +18457,7 @@ class ResidueLabels {
|
|
|
18443
18457
|
label.text = atom.elem;
|
|
18444
18458
|
label.size = size;
|
|
18445
18459
|
|
|
18446
|
-
label.color =
|
|
18460
|
+
label.color = (ic.opts.background == 'white' || ic.opts.background == 'gray') ? ic.colorWhitebkgd : atom.color.getHexString();
|
|
18447
18461
|
label.background = background;
|
|
18448
18462
|
|
|
18449
18463
|
ic.labels['schematic'].push(label);
|
|
@@ -18481,7 +18495,8 @@ class ResidueLabels {
|
|
|
18481
18495
|
}
|
|
18482
18496
|
|
|
18483
18497
|
let atomColorStr = atom.color.getHexString().toUpperCase();
|
|
18484
|
-
label.color = (atomColorStr === "CCCCCC" || atomColorStr === "C8C8C8") ? "#888888" : "#" + atomColorStr;
|
|
18498
|
+
label.color = (ic.opts.background == 'white' || ic.opts.background == 'gray') ? ic.colorWhitebkgd : ic.colorBlackbkgd; //(atomColorStr === "CCCCCC" || atomColorStr === "C8C8C8") ? "#888888" : "#" + atomColorStr;
|
|
18499
|
+
if(bElement) label.color = (atomColorStr === "CCCCCC" || atomColorStr === "C8C8C8") ? "#888888" : "#" + atomColorStr;
|
|
18485
18500
|
label.background = background;
|
|
18486
18501
|
|
|
18487
18502
|
ic.labels['residue'].push(label);
|
|
@@ -19908,7 +19923,6 @@ class LoadPDB {
|
|
|
19908
19923
|
// modified from iview (http://istar.cse.cuhk.edu.hk/iview/)
|
|
19909
19924
|
//This PDB parser feeds the viewer with the content of a PDB file, pdbData.
|
|
19910
19925
|
loadPDB(src, pdbid, bOpm, bVector, bMutation, bAppend) { let ic = this.icn3d, me = ic.icn3dui;
|
|
19911
|
-
let helices = [], sheets = [];
|
|
19912
19926
|
//ic.atoms = {}
|
|
19913
19927
|
let lines = src.split('\n');
|
|
19914
19928
|
|
|
@@ -19948,20 +19962,23 @@ class LoadPDB {
|
|
|
19948
19962
|
serial = (ic.atoms) ? Object.keys(ic.atoms).length : 0;
|
|
19949
19963
|
}
|
|
19950
19964
|
|
|
19951
|
-
let
|
|
19965
|
+
//let helices = [], sheets = [];
|
|
19966
|
+
let sheetArray = [], sheetStart = [], sheetEnd = [], helixArray = [], helixStart = [], helixEnd = [];
|
|
19952
19967
|
|
|
19953
19968
|
let chainNum, residueNum, oriResidueNum;
|
|
19954
19969
|
let prevChainNum = '', prevResidueNum = '', prevOriResidueNum = '';
|
|
19955
19970
|
|
|
19956
19971
|
let oriSerial2NewSerial = {};
|
|
19957
19972
|
|
|
19958
|
-
let chainMissingResidueArray = {}
|
|
19973
|
+
//let chainMissingResidueArray = {}
|
|
19959
19974
|
|
|
19960
19975
|
let id = (pdbid) ? pdbid : 'stru';
|
|
19961
19976
|
|
|
19962
|
-
let
|
|
19977
|
+
let prevMissingChain = '';
|
|
19963
19978
|
let CSerial, prevCSerial, OSerial, prevOSerial;
|
|
19964
19979
|
|
|
19980
|
+
let structure = "stru";
|
|
19981
|
+
|
|
19965
19982
|
for (let i in lines) {
|
|
19966
19983
|
let line = lines[i];
|
|
19967
19984
|
let record = line.substr(0, 6);
|
|
@@ -19982,6 +19999,12 @@ class LoadPDB {
|
|
|
19982
19999
|
}
|
|
19983
20000
|
}
|
|
19984
20001
|
|
|
20002
|
+
structure = id;
|
|
20003
|
+
|
|
20004
|
+
if(id == 'stru' || bMutation || (bAppend && id.length != 4)) { // bMutation: side chain prediction
|
|
20005
|
+
structure = (moleculeNum === 1) ? id : id + moleculeNum.toString();
|
|
20006
|
+
}
|
|
20007
|
+
|
|
19985
20008
|
ic.molTitle = '';
|
|
19986
20009
|
|
|
19987
20010
|
} else if (record === 'TITLE ') {
|
|
@@ -19996,22 +20019,23 @@ class LoadPDB {
|
|
|
19996
20019
|
let startResi = parseInt(line.substr(21, 4));
|
|
19997
20020
|
let endResi = parseInt(line.substr(33, 4));
|
|
19998
20021
|
|
|
19999
|
-
let chain_resi;
|
|
20000
20022
|
for(let j = startResi; j <= endResi; ++j) {
|
|
20001
|
-
|
|
20002
|
-
helixArray.push(
|
|
20023
|
+
let resid = structure + "_" + startChain + "_" + j;
|
|
20024
|
+
helixArray.push(resid);
|
|
20003
20025
|
|
|
20004
|
-
if(j === startResi) helixStart.push(
|
|
20005
|
-
if(j === endResi) helixEnd.push(
|
|
20026
|
+
if(j === startResi) helixStart.push(resid);
|
|
20027
|
+
if(j === endResi) helixEnd.push(resid);
|
|
20006
20028
|
}
|
|
20007
|
-
|
|
20029
|
+
/*
|
|
20008
20030
|
helices.push({
|
|
20031
|
+
structure: structure,
|
|
20009
20032
|
chain: startChain,
|
|
20010
20033
|
initialResidue: startResi,
|
|
20011
20034
|
initialInscode: line.substr(25, 1),
|
|
20012
20035
|
terminalResidue: endResi,
|
|
20013
20036
|
terminalInscode: line.substr(37, 1),
|
|
20014
20037
|
});
|
|
20038
|
+
*/
|
|
20015
20039
|
} else if (record === 'SHEET ') {
|
|
20016
20040
|
//ic.bSecondaryStructure = true;
|
|
20017
20041
|
if(bOpm === undefined || !bOpm) ic.bSecondaryStructure = true;
|
|
@@ -20022,20 +20046,22 @@ class LoadPDB {
|
|
|
20022
20046
|
let endResi = parseInt(line.substr(33, 4));
|
|
20023
20047
|
|
|
20024
20048
|
for(let j = startResi; j <= endResi; ++j) {
|
|
20025
|
-
let
|
|
20026
|
-
sheetArray.push(
|
|
20049
|
+
let resid = structure + "_" + startChain + "_" + j;
|
|
20050
|
+
sheetArray.push(resid);
|
|
20027
20051
|
|
|
20028
|
-
if(j === startResi) sheetStart.push(
|
|
20029
|
-
if(j === endResi) sheetEnd.push(
|
|
20052
|
+
if(j === startResi) sheetStart.push(resid);
|
|
20053
|
+
if(j === endResi) sheetEnd.push(resid);
|
|
20030
20054
|
}
|
|
20031
|
-
|
|
20055
|
+
/*
|
|
20032
20056
|
sheets.push({
|
|
20057
|
+
structure: structure,
|
|
20033
20058
|
chain: startChain,
|
|
20034
20059
|
initialResidue: startResi,
|
|
20035
20060
|
initialInscode: line.substr(26, 1),
|
|
20036
20061
|
terminalResidue: endResi,
|
|
20037
20062
|
terminalInscode: line.substr(37, 1),
|
|
20038
20063
|
});
|
|
20064
|
+
*/
|
|
20039
20065
|
} else if (record === 'HBOND ') {
|
|
20040
20066
|
if(bOpm === undefined || !bOpm) ic.bSecondaryStructure = true;
|
|
20041
20067
|
/*
|
|
@@ -20098,7 +20124,8 @@ class LoadPDB {
|
|
|
20098
20124
|
let resn = line.substr(15, 3);
|
|
20099
20125
|
//let chain = line.substr(19, 1);
|
|
20100
20126
|
let chain = line.substr(18, 2).trim();
|
|
20101
|
-
let resi = parseInt(line.substr(21, 5));
|
|
20127
|
+
//let resi = parseInt(line.substr(21, 5));
|
|
20128
|
+
let resi = line.substr(21, 5);
|
|
20102
20129
|
|
|
20103
20130
|
//var structure = parseInt(line.substr(13, 1));
|
|
20104
20131
|
//if(line.substr(13, 1) == ' ') structure = 1;
|
|
@@ -20106,20 +20133,15 @@ class LoadPDB {
|
|
|
20106
20133
|
//var chainNum = structure + '_' + chain;
|
|
20107
20134
|
let chainNum = id + '_' + chain;
|
|
20108
20135
|
|
|
20109
|
-
if(chainMissingResidueArray[chainNum] === undefined) chainMissingResidueArray[chainNum] = [];
|
|
20136
|
+
if(ic.chainMissingResidueArray[chainNum] === undefined) ic.chainMissingResidueArray[chainNum] = [];
|
|
20110
20137
|
let resObject = {};
|
|
20111
20138
|
resObject.resi = resi;
|
|
20112
20139
|
resObject.name = me.utilsCls.residueName2Abbr(resn).toLowerCase();
|
|
20113
20140
|
|
|
20114
|
-
if(chain != prevMissingChain) {
|
|
20115
|
-
maxMissingResi = 0;
|
|
20116
|
-
}
|
|
20117
|
-
|
|
20118
20141
|
// not all listed residues are considered missing, e.g., PDB ID 4OR2, only the firts four residues are considered missing
|
|
20119
|
-
if(!isNaN(resi) && (prevMissingChain == '' || (chain != prevMissingChain) || (chain == prevMissingChain && resi > maxMissingResi)) ) {
|
|
20120
|
-
|
|
20121
|
-
|
|
20122
|
-
maxMissingResi = resi;
|
|
20142
|
+
//if(!isNaN(resi) && (prevMissingChain == '' || (chain != prevMissingChain) || (chain == prevMissingChain && resi > maxMissingResi)) ) {
|
|
20143
|
+
if(prevMissingChain == '' || (chain != prevMissingChain) || (chain == prevMissingChain) ) {
|
|
20144
|
+
ic.chainMissingResidueArray[chainNum].push(resObject);
|
|
20123
20145
|
prevMissingChain = chain;
|
|
20124
20146
|
}
|
|
20125
20147
|
|
|
@@ -20135,21 +20157,25 @@ class LoadPDB {
|
|
|
20135
20157
|
} else if (record === 'ENDMDL') {
|
|
20136
20158
|
++moleculeNum;
|
|
20137
20159
|
id = 'stru';
|
|
20160
|
+
|
|
20161
|
+
structure = id;
|
|
20162
|
+
if(id == 'stru' || bMutation || (bAppend && id.length != 4)) { // bMutation: side chain prediction
|
|
20163
|
+
structure = (moleculeNum === 1) ? id : id + moleculeNum.toString();
|
|
20164
|
+
}
|
|
20165
|
+
|
|
20166
|
+
//helices = [];
|
|
20167
|
+
//sheets = [];
|
|
20168
|
+
sheetArray = [];
|
|
20169
|
+
sheetStart = [];
|
|
20170
|
+
sheetEnd = [];
|
|
20171
|
+
helixArray = [];
|
|
20172
|
+
helixStart = [];
|
|
20173
|
+
helixEnd = [];
|
|
20138
20174
|
} else if (record === 'JRNL ') {
|
|
20139
20175
|
if(line.substr(12, 4) === 'PMID') {
|
|
20140
20176
|
ic.pmid = line.substr(19).trim();
|
|
20141
20177
|
}
|
|
20142
20178
|
} else if (record === 'ATOM ' || record === 'HETATM') {
|
|
20143
|
-
//if(id == 'stru' && bOpm) {
|
|
20144
|
-
// id = pdbid;
|
|
20145
|
-
//}
|
|
20146
|
-
|
|
20147
|
-
let structure = id;
|
|
20148
|
-
//if(id == 'stru' || bMutation || (bAppend && id == 'stru')) { // bMutation: side chain prediction
|
|
20149
|
-
if(id == 'stru' || bMutation || (bAppend)) { // bMutation: side chain prediction
|
|
20150
|
-
structure = (moleculeNum === 1) ? id : id + moleculeNum.toString();
|
|
20151
|
-
}
|
|
20152
|
-
|
|
20153
20179
|
let alt = line.substr(16, 1);
|
|
20154
20180
|
//if (alt !== " " && alt !== "A") continue;
|
|
20155
20181
|
|
|
@@ -20191,7 +20217,7 @@ class LoadPDB {
|
|
|
20191
20217
|
|
|
20192
20218
|
residueNum = chainNum + "_" + resi;
|
|
20193
20219
|
|
|
20194
|
-
let chain_resi = chain + "_" + resi;
|
|
20220
|
+
//let chain_resi = chain + "_" + resi;
|
|
20195
20221
|
|
|
20196
20222
|
let x = parseFloat(line.substr(30, 8));
|
|
20197
20223
|
let y = parseFloat(line.substr(38, 8));
|
|
@@ -20242,27 +20268,27 @@ class LoadPDB {
|
|
|
20242
20268
|
|
|
20243
20269
|
// Assign secondary structures from the input
|
|
20244
20270
|
// if a residue is assigned both sheet and helix, it is assigned as sheet
|
|
20245
|
-
if($.inArray(
|
|
20271
|
+
if($.inArray(residueNum, sheetArray) !== -1) {
|
|
20246
20272
|
ic.atoms[serial].ss = 'sheet';
|
|
20247
20273
|
|
|
20248
|
-
if($.inArray(
|
|
20274
|
+
if($.inArray(residueNum, sheetStart) !== -1) {
|
|
20249
20275
|
ic.atoms[serial].ssbegin = true;
|
|
20250
20276
|
}
|
|
20251
20277
|
|
|
20252
20278
|
// do not use else if. Some residues are both start and end of secondary structure
|
|
20253
|
-
if($.inArray(
|
|
20279
|
+
if($.inArray(residueNum, sheetEnd) !== -1) {
|
|
20254
20280
|
ic.atoms[serial].ssend = true;
|
|
20255
20281
|
}
|
|
20256
20282
|
}
|
|
20257
|
-
else if($.inArray(
|
|
20283
|
+
else if($.inArray(residueNum, helixArray) !== -1) {
|
|
20258
20284
|
ic.atoms[serial].ss = 'helix';
|
|
20259
20285
|
|
|
20260
|
-
if($.inArray(
|
|
20286
|
+
if($.inArray(residueNum, helixStart) !== -1) {
|
|
20261
20287
|
ic.atoms[serial].ssbegin = true;
|
|
20262
20288
|
}
|
|
20263
20289
|
|
|
20264
20290
|
// do not use else if. Some residues are both start and end of secondary structure
|
|
20265
|
-
if($.inArray(
|
|
20291
|
+
if($.inArray(residueNum, helixEnd) !== -1) {
|
|
20266
20292
|
ic.atoms[serial].ssend = true;
|
|
20267
20293
|
}
|
|
20268
20294
|
}
|
|
@@ -20360,7 +20386,7 @@ class LoadPDB {
|
|
|
20360
20386
|
if(ic.chains[chainNum] === undefined) ic.chains[chainNum] = {};
|
|
20361
20387
|
ic.chains[chainNum] = me.hashUtilsCls.unionHash2Atoms(ic.chains[chainNum], chainsTmp, ic.atoms);
|
|
20362
20388
|
|
|
20363
|
-
if(!bMutation) this.adjustSeq(chainMissingResidueArray);
|
|
20389
|
+
if(!bMutation) this.adjustSeq(ic.chainMissingResidueArray);
|
|
20364
20390
|
|
|
20365
20391
|
// ic.missingResidues = [];
|
|
20366
20392
|
// for(let chainid in chainMissingResidueArray) {
|
|
@@ -20545,10 +20571,11 @@ class LoadPDB {
|
|
|
20545
20571
|
for(let chainNum in ic.chainsSeq) {
|
|
20546
20572
|
if(chainMissingResidueArray[chainNum] === undefined) continue;
|
|
20547
20573
|
|
|
20548
|
-
let A = ic.chainsSeq[chainNum];
|
|
20549
|
-
//
|
|
20550
|
-
|
|
20551
|
-
let
|
|
20574
|
+
//let A = ic.chainsSeq[chainNum];
|
|
20575
|
+
//let B = chainMissingResidueArray[chainNum];
|
|
20576
|
+
|
|
20577
|
+
let A = chainMissingResidueArray[chainNum];
|
|
20578
|
+
let B = ic.chainsSeq[chainNum];
|
|
20552
20579
|
|
|
20553
20580
|
let m = A.length;
|
|
20554
20581
|
let n = B.length;
|
|
@@ -20566,7 +20593,7 @@ class LoadPDB {
|
|
|
20566
20593
|
j = 0;
|
|
20567
20594
|
k = 0;
|
|
20568
20595
|
while (i < m && j < n) {
|
|
20569
|
-
if (A[i].resi <= B[j].resi) {
|
|
20596
|
+
if (parseInt(A[i].resi) <= parseInt(B[j].resi)) {
|
|
20570
20597
|
C[k] = A[i];
|
|
20571
20598
|
//C2[k] = A2[i];
|
|
20572
20599
|
//C3[k] = A3[i];
|
|
@@ -22341,7 +22368,7 @@ class PdbParser {
|
|
|
22341
22368
|
|
|
22342
22369
|
//Load structures from a "URL". Due to the same domain policy of Ajax call, the URL should be in the same
|
|
22343
22370
|
//domain. "type" could be "pdb", "mol2", "sdf", or "xyz" for pdb file, mol2file, sdf file, and xyz file, respectively.
|
|
22344
|
-
downloadUrl(url, type) { let ic = this.icn3d, me = ic.icn3dui;
|
|
22371
|
+
downloadUrl(url, type, command) { let ic = this.icn3d, me = ic.icn3dui;
|
|
22345
22372
|
let thisClass = this;
|
|
22346
22373
|
|
|
22347
22374
|
let pos = url.lastIndexOf('/');
|
|
@@ -22378,6 +22405,7 @@ class PdbParser {
|
|
|
22378
22405
|
|
|
22379
22406
|
if(type === 'pdb') {
|
|
22380
22407
|
thisClass.loadPdbData(data);
|
|
22408
|
+
ic.loadScriptCls.loadScript(command);
|
|
22381
22409
|
}
|
|
22382
22410
|
else if(type === 'mol2') {
|
|
22383
22411
|
ic.mol2ParserCls.loadMol2Data(data);
|
|
@@ -22393,7 +22421,7 @@ class PdbParser {
|
|
|
22393
22421
|
}
|
|
22394
22422
|
else if(type === 'icn3dpng') {
|
|
22395
22423
|
ic.mmcifParserCls.loadMmcifData(data);
|
|
22396
|
-
me.htmlCls.setHtmlCls.loadPng(data);
|
|
22424
|
+
me.htmlCls.setHtmlCls.loadPng(data, command);
|
|
22397
22425
|
}
|
|
22398
22426
|
},
|
|
22399
22427
|
error : function(xhr, textStatus, errorThrown ) {
|
|
@@ -23004,13 +23032,13 @@ class AlignParser {
|
|
|
23004
23032
|
|
|
23005
23033
|
request
|
|
23006
23034
|
.fail(function() {
|
|
23007
|
-
var aaa = 1; //alert("These two MMDB IDs " + alignArray + " do not have 3D alignment data.");
|
|
23035
|
+
var aaa = 1; //alert("These two MMDB IDs " + alignArray + " do not have 3D alignment data in the VAST+ database. You can try the VAST alignment by visiting the VAST+ page https://www.ncbi.nlm.nih.gov/Structure/vastplus/vastplus.cgi?uid=[PDB ID] (e.g., uid=1KQ2), and clicking \"Original VAST\"");
|
|
23008
23036
|
return false;
|
|
23009
23037
|
})
|
|
23010
23038
|
.then(function( data ) {
|
|
23011
23039
|
seqalign = data.seqalign;
|
|
23012
23040
|
if(seqalign === undefined) {
|
|
23013
|
-
var aaa = 1; //alert("These two MMDB IDs " + alignArray + " do not have 3D alignment data.");
|
|
23041
|
+
var aaa = 1; //alert("These two MMDB IDs " + alignArray + " do not have 3D alignment data in the VAST+ database. You can try the VAST alignment by visiting the VAST+ page https://www.ncbi.nlm.nih.gov/Structure/vastplus/vastplus.cgi?uid=[PDB ID] (e.g., uid=1KQ2), and clicking \"Original VAST\"");
|
|
23014
23042
|
return false;
|
|
23015
23043
|
}
|
|
23016
23044
|
|
|
@@ -26625,9 +26653,14 @@ class LoadScript {
|
|
|
26625
26653
|
me.cfg.gi = id;
|
|
26626
26654
|
ic.mmdbParserCls.downloadGi(id);
|
|
26627
26655
|
}
|
|
26628
|
-
else if(command.indexOf('load seq_struct_ids') !== -1) {
|
|
26656
|
+
else if(command.indexOf('load seq_struct_ids ') !== -1) {
|
|
26657
|
+
ic.bSmithwm = false;
|
|
26629
26658
|
ic.mmdbParserCls.downloadBlast_rep_id(id);
|
|
26630
26659
|
}
|
|
26660
|
+
else if(command.indexOf('load seq_struct_ids_smithwm ') !== -1) {
|
|
26661
|
+
ic.bSmithwm = true;
|
|
26662
|
+
ic.mmdbParserCls.downloadBlast_rep_id(id);
|
|
26663
|
+
}
|
|
26631
26664
|
else if(command.indexOf('load cid') !== -1) {
|
|
26632
26665
|
me.cfg.cid = id;
|
|
26633
26666
|
ic.sdfParserCls.downloadCid(id);
|
|
@@ -27249,7 +27282,9 @@ class ShowSeq {
|
|
|
27249
27282
|
}
|
|
27250
27283
|
}
|
|
27251
27284
|
giSeq = giSeqTmp;
|
|
27252
|
-
let divLength = me.htmlCls.RESIDUE_WIDTH * ic.giSeq[chnid].length + 200;
|
|
27285
|
+
//let divLength = me.htmlCls.RESIDUE_WIDTH * ic.giSeq[chnid].length + 200;
|
|
27286
|
+
let divLength = me.htmlCls.RESIDUE_WIDTH * (ic.giSeq[chnid].length + ic.nTotalGap) + 200;
|
|
27287
|
+
|
|
27253
27288
|
let seqLength = ic.giSeq[chnid].length;
|
|
27254
27289
|
if(seqLength > ic.maxAnnoLength) {
|
|
27255
27290
|
ic.maxAnnoLength = seqLength;
|
|
@@ -27402,7 +27437,7 @@ class ShowSeq {
|
|
|
27402
27437
|
html += '</div>'; // corresponds to above: html += '<div class="icn3d-dl_sequence">';
|
|
27403
27438
|
html3 += '</div></div>';
|
|
27404
27439
|
if(me.cfg.blast_rep_id === chnid) {
|
|
27405
|
-
htmlTmp = '<div id="' + ic.pre + 'giseq_sequence" class="icn3d-dl_sequence" style="border: solid 1px #000
|
|
27440
|
+
htmlTmp = '<div id="' + ic.pre + 'giseq_sequence" class="icn3d-dl_sequence" style="border: solid 1px #000">';
|
|
27406
27441
|
}
|
|
27407
27442
|
else {
|
|
27408
27443
|
htmlTmp = '<div id="' + ic.pre + 'giseq_sequence" class="icn3d-dl_sequence">';
|
|
@@ -28876,7 +28911,7 @@ class Analysis {
|
|
|
28876
28911
|
//Display chain name in the 3D structure display for the chains intersecting with the atoms in "atomHash".
|
|
28877
28912
|
addChainLabels(atoms) {var ic = this.icn3d, me = ic.icn3dui;
|
|
28878
28913
|
let size = 18;
|
|
28879
|
-
let background = "#CCCCCC";
|
|
28914
|
+
let background = "#FFFFFF"; //"#CCCCCC";
|
|
28880
28915
|
let atomsHash = me.hashUtilsCls.intHash(ic.hAtoms, atoms);
|
|
28881
28916
|
if(ic.labels['chain'] === undefined) ic.labels['chain'] = [];
|
|
28882
28917
|
let chainHash = ic.firstAtomObjCls.getChainsFromAtoms(atomsHash);
|
|
@@ -28889,8 +28924,8 @@ class Analysis {
|
|
|
28889
28924
|
if(proteinName.length > 20) proteinName = proteinName.substr(0, 20) + '...';
|
|
28890
28925
|
label.text = 'Chain ' + chainName + ': ' + proteinName;
|
|
28891
28926
|
label.size = size;
|
|
28892
|
-
|
|
28893
|
-
label.color =(atomColorStr === "CCCCCC" || atomColorStr === "C8C8C8") ? "#888888" : "#" + atomColorStr;
|
|
28927
|
+
ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.chains[chainid]).color.getHexString().toUpperCase();
|
|
28928
|
+
label.color = (ic.opts.background == 'white' || ic.opts.background == 'gray') ? ic.colorWhitebkgd : ic.colorBlackbkgd; //(atomColorStr === "CCCCCC" || atomColorStr === "C8C8C8") ? "#888888" : "#" + atomColorStr;
|
|
28894
28929
|
label.background = background;
|
|
28895
28930
|
ic.labels['chain'].push(label);
|
|
28896
28931
|
}
|
|
@@ -28900,7 +28935,7 @@ class Analysis {
|
|
|
28900
28935
|
//as "N-" and "C-". The termini of nucleotides are labeled as "5'" and "3'".
|
|
28901
28936
|
addTerminiLabels(atoms) {var ic = this.icn3d, me = ic.icn3dui;
|
|
28902
28937
|
let size = 18;
|
|
28903
|
-
let background = "#CCCCCC";
|
|
28938
|
+
let background = "#FFFFFF"; //"#CCCCCC";
|
|
28904
28939
|
let protNucl;
|
|
28905
28940
|
protNucl = me.hashUtilsCls.unionHash(protNucl, ic.proteins);
|
|
28906
28941
|
protNucl = me.hashUtilsCls.unionHash(protNucl, ic.nucleotides);
|
|
@@ -28926,8 +28961,8 @@ class Analysis {
|
|
|
28926
28961
|
labelC.size = size;
|
|
28927
28962
|
let atomNColorStr = firstAtom.color.getHexString().toUpperCase();
|
|
28928
28963
|
let atomCColorStr = lastAtom.color.getHexString().toUpperCase();
|
|
28929
|
-
labelN.color =(atomNColorStr === "CCCCCC" || atomNColorStr === "C8C8C8") ? "#888888" : "#" + atomNColorStr;
|
|
28930
|
-
labelC.color =(atomCColorStr === "CCCCCC" || atomCColorStr === "C8C8C8") ? "#888888" : "#" + atomCColorStr;
|
|
28964
|
+
labelN.color = (ic.opts.background == 'white' || ic.opts.background == 'gray') ? ic.colorWhitebkgd : (atomNColorStr === "CCCCCC" || atomNColorStr === "C8C8C8") ? "#888888" : "#" + atomNColorStr;
|
|
28965
|
+
labelC.color = (ic.opts.background == 'white' || ic.opts.background == 'gray') ? ic.colorWhitebkgd : (atomCColorStr === "CCCCCC" || atomCColorStr === "C8C8C8") ? "#888888" : "#" + atomCColorStr;
|
|
28931
28966
|
labelN.background = background;
|
|
28932
28967
|
labelC.background = background;
|
|
28933
28968
|
ic.labels['chain'].push(labelN);
|
|
@@ -28962,11 +28997,44 @@ class AnnoCddSite {
|
|
|
28962
28997
|
// live search for AlphaFold structures
|
|
28963
28998
|
//if(me.cfg.afid) {
|
|
28964
28999
|
|
|
28965
|
-
|
|
29000
|
+
// use precalculated CDD annotation if
|
|
29001
|
+
if( (Object.keys(ic.structures).length == 1 && (me.cfg.mmtfid || me.cfg.pdbid || me.cfg.opmid || me.cfg.mmdbid || me.cfg.gi || me.cfg.uniprotid || me.cfg.blast_rep_id || me.cfg.cid || me.cfg.mmcifid))
|
|
29002
|
+
|| (Object.keys(ic.structures).length == 2 && me.cfg.align) ) {
|
|
29003
|
+
$.ajax({
|
|
29004
|
+
url: url,
|
|
29005
|
+
dataType: 'jsonp',
|
|
29006
|
+
cache: true,
|
|
29007
|
+
tryCount : 0,
|
|
29008
|
+
retryLimit : 1,
|
|
29009
|
+
success: function(data) {
|
|
29010
|
+
thisClass.parseCddData([data], chnidArray);
|
|
29011
|
+
if(ic.deferredAnnoCddSite !== undefined) ic.deferredAnnoCddSite.resolve();
|
|
29012
|
+
},
|
|
29013
|
+
error : function(xhr, textStatus, errorThrown ) {
|
|
29014
|
+
this.tryCount++;
|
|
29015
|
+
if(this.tryCount <= this.retryLimit) {
|
|
29016
|
+
//try again
|
|
29017
|
+
$.ajax(this);
|
|
29018
|
+
return;
|
|
29019
|
+
}
|
|
29020
|
+
|
|
29021
|
+
thisClass.getNoCdd(chnidBaseArray);
|
|
29022
|
+
if(ic.deferredAnnoCddSite !== undefined) ic.deferredAnnoCddSite.resolve();
|
|
29023
|
+
|
|
29024
|
+
return;
|
|
29025
|
+
}
|
|
29026
|
+
});
|
|
29027
|
+
}
|
|
29028
|
+
else {
|
|
28966
29029
|
let ajaxArray = [];
|
|
28967
29030
|
|
|
28968
29031
|
for(let i = 0, il = chnidArray.length; i < il; ++i) {
|
|
28969
|
-
let seq = Array.isArray(ic.giSeq[chnidArray[i]]) ? ic.giSeq[chnidArray[i]].join('') : ic.giSeq[chnidArray[i]];
|
|
29032
|
+
//let seq = Array.isArray(ic.giSeq[chnidArray[i]]) ? ic.giSeq[chnidArray[i]].join('') : ic.giSeq[chnidArray[i]];
|
|
29033
|
+
let seq = Array.isArray(ic.giSeq[chnidArray[i]]) ? ic.giSeq[chnidArray[i]].join('').toUpperCase() : ic.giSeq[chnidArray[i]].toUpperCase();
|
|
29034
|
+
|
|
29035
|
+
// remove water molecules
|
|
29036
|
+
seq = seq.replace(/O/g, '');
|
|
29037
|
+
|
|
28970
29038
|
//url = me.htmlCls.baseUrl + "cdannots/cdannots.fcgi?fmt&live=lcl&queries=" + ic.giSeq[chnidArray[0]].join('');
|
|
28971
29039
|
url = me.htmlCls.baseUrl + "cdannots/cdannots.fcgi?fmt&live=lcl&queries=" + seq;
|
|
28972
29040
|
|
|
@@ -28993,32 +29061,6 @@ class AnnoCddSite {
|
|
|
28993
29061
|
return;
|
|
28994
29062
|
});
|
|
28995
29063
|
}
|
|
28996
|
-
else {
|
|
28997
|
-
$.ajax({
|
|
28998
|
-
url: url,
|
|
28999
|
-
dataType: 'jsonp',
|
|
29000
|
-
cache: true,
|
|
29001
|
-
tryCount : 0,
|
|
29002
|
-
retryLimit : 1,
|
|
29003
|
-
success: function(data) {
|
|
29004
|
-
thisClass.parseCddData([data], chnidArray);
|
|
29005
|
-
if(ic.deferredAnnoCddSite !== undefined) ic.deferredAnnoCddSite.resolve();
|
|
29006
|
-
},
|
|
29007
|
-
error : function(xhr, textStatus, errorThrown ) {
|
|
29008
|
-
this.tryCount++;
|
|
29009
|
-
if(this.tryCount <= this.retryLimit) {
|
|
29010
|
-
//try again
|
|
29011
|
-
$.ajax(this);
|
|
29012
|
-
return;
|
|
29013
|
-
}
|
|
29014
|
-
|
|
29015
|
-
thisClass.getNoCdd(chnidBaseArray);
|
|
29016
|
-
if(ic.deferredAnnoCddSite !== undefined) ic.deferredAnnoCddSite.resolve();
|
|
29017
|
-
|
|
29018
|
-
return;
|
|
29019
|
-
}
|
|
29020
|
-
});
|
|
29021
|
-
}
|
|
29022
29064
|
}
|
|
29023
29065
|
|
|
29024
29066
|
parseCddData(dataArray, chnidArray, bSeq) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -30397,6 +30439,13 @@ class ApplyCommand {
|
|
|
30397
30439
|
|
|
30398
30440
|
ic.drawCls.draw();
|
|
30399
30441
|
}
|
|
30442
|
+
else if(commandOri.indexOf('set membrane') == 0) {
|
|
30443
|
+
let pos = command.lastIndexOf(' ');
|
|
30444
|
+
|
|
30445
|
+
ic.bMembrane = parseInt(command.substr(pos + 1));
|
|
30446
|
+
|
|
30447
|
+
ic.drawCls.draw();
|
|
30448
|
+
}
|
|
30400
30449
|
else if(command.indexOf('set highlight color') == 0) {
|
|
30401
30450
|
let color = command.substr(20);
|
|
30402
30451
|
if(color === 'yellow') {
|
|
@@ -33434,13 +33483,16 @@ class MmcifParser {
|
|
|
33434
33483
|
let thisClass = this;
|
|
33435
33484
|
|
|
33436
33485
|
let url, dataType;
|
|
33437
|
-
|
|
33486
|
+
/*
|
|
33438
33487
|
if(me.utilsCls.isMac()) { // safari has a problem in getting data from https://files.rcsb.org/header/
|
|
33439
33488
|
url = "https://files.rcsb.org/view/" + mmcifid + ".cif";
|
|
33440
33489
|
}
|
|
33441
33490
|
else {
|
|
33442
33491
|
url = "https://files.rcsb.org/header/" + mmcifid + ".cif";
|
|
33443
33492
|
}
|
|
33493
|
+
*/
|
|
33494
|
+
|
|
33495
|
+
url = "https://files.rcsb.org/header/" + mmcifid + ".cif";
|
|
33444
33496
|
|
|
33445
33497
|
dataType = "text";
|
|
33446
33498
|
|
|
@@ -33565,7 +33617,7 @@ class MmcifParser {
|
|
|
33565
33617
|
if(type === 'mmtfid' && missingseq !== undefined) {
|
|
33566
33618
|
// adjust missing residues
|
|
33567
33619
|
let maxMissingResi = 0, prevMissingChain = '';
|
|
33568
|
-
let chainMissingResidueArray = {}
|
|
33620
|
+
//let chainMissingResidueArray = {}
|
|
33569
33621
|
for(let i = 0, il = missingseq.length; i < il; ++i) {
|
|
33570
33622
|
|
|
33571
33623
|
let resn = missingseq[i].resn;
|
|
@@ -33574,7 +33626,7 @@ class MmcifParser {
|
|
|
33574
33626
|
|
|
33575
33627
|
let chainNum = mmcifid + '_' + chain;
|
|
33576
33628
|
|
|
33577
|
-
if(chainMissingResidueArray[chainNum] === undefined) chainMissingResidueArray[chainNum] = [];
|
|
33629
|
+
if(ic.chainMissingResidueArray[chainNum] === undefined) ic.chainMissingResidueArray[chainNum] = [];
|
|
33578
33630
|
let resObject = {};
|
|
33579
33631
|
resObject.resi = resi;
|
|
33580
33632
|
resObject.name = me.utilsCls.residueName2Abbr(resn).toLowerCase();
|
|
@@ -33585,14 +33637,14 @@ class MmcifParser {
|
|
|
33585
33637
|
|
|
33586
33638
|
// not all listed residues are considered missing, e.g., PDB ID 4OR2, only the firts four residues are considered missing
|
|
33587
33639
|
if(!isNaN(resi) &&(prevMissingChain == '' ||(chain != prevMissingChain) ||(chain == prevMissingChain && resi > maxMissingResi)) ) {
|
|
33588
|
-
chainMissingResidueArray[chainNum].push(resObject);
|
|
33640
|
+
ic.chainMissingResidueArray[chainNum].push(resObject);
|
|
33589
33641
|
|
|
33590
33642
|
maxMissingResi = resi;
|
|
33591
33643
|
prevMissingChain = chain;
|
|
33592
33644
|
}
|
|
33593
33645
|
}
|
|
33594
33646
|
|
|
33595
|
-
ic.loadPDBCls.adjustSeq(chainMissingResidueArray);
|
|
33647
|
+
ic.loadPDBCls.adjustSeq(ic.chainMissingResidueArray);
|
|
33596
33648
|
}
|
|
33597
33649
|
|
|
33598
33650
|
if(ic.deferredSymmetry !== undefined) ic.deferredSymmetry.resolve();
|
|
@@ -33617,7 +33669,7 @@ class MmcifParser {
|
|
|
33617
33669
|
if(type === 'mmtfid' && data.missingseq !== undefined) {
|
|
33618
33670
|
// adjust missing residues
|
|
33619
33671
|
let maxMissingResi = 0, prevMissingChain = '';
|
|
33620
|
-
let chainMissingResidueArray = {}
|
|
33672
|
+
//let chainMissingResidueArray = {}
|
|
33621
33673
|
for(let i = 0, il = data.missingseq.length; i < il; ++i) {
|
|
33622
33674
|
|
|
33623
33675
|
let resn = data.missingseq[i].resn;
|
|
@@ -33626,7 +33678,7 @@ class MmcifParser {
|
|
|
33626
33678
|
|
|
33627
33679
|
let chainNum = mmcifid + '_' + chain;
|
|
33628
33680
|
|
|
33629
|
-
if(chainMissingResidueArray[chainNum] === undefined) chainMissingResidueArray[chainNum] = [];
|
|
33681
|
+
if(ic.chainMissingResidueArray[chainNum] === undefined) ic.chainMissingResidueArray[chainNum] = [];
|
|
33630
33682
|
let resObject = {};
|
|
33631
33683
|
resObject.resi = resi;
|
|
33632
33684
|
resObject.name = me.utilsCls.residueName2Abbr(resn).toLowerCase();
|
|
@@ -33644,7 +33696,7 @@ class MmcifParser {
|
|
|
33644
33696
|
}
|
|
33645
33697
|
}
|
|
33646
33698
|
|
|
33647
|
-
ic.loadPDBCls.adjustSeq(chainMissingResidueArray);
|
|
33699
|
+
ic.loadPDBCls.adjustSeq(ic.chainMissingResidueArray);
|
|
33648
33700
|
}
|
|
33649
33701
|
|
|
33650
33702
|
if(ic.deferredSymmetry !== undefined) ic.deferredSymmetry.resolve();
|
|
@@ -33840,8 +33892,16 @@ class HlSeq {
|
|
|
33840
33892
|
.on('click', '.icn3d-seqTitle', function(e) { let ic = thisClass.icn3d;
|
|
33841
33893
|
e.stopImmediatePropagation();
|
|
33842
33894
|
|
|
33843
|
-
ic.
|
|
33844
|
-
ic.
|
|
33895
|
+
//if($(this).attr('id') === ic.pre + "dl_sequence2") {
|
|
33896
|
+
if($(this).parents('div').attr('id') === ic.pre + "dl_sequence2") {
|
|
33897
|
+
ic.bAlignSeq = true;
|
|
33898
|
+
ic.bAnnotations = false;
|
|
33899
|
+
}
|
|
33900
|
+
//else if($(this).attr('id') === ic.pre + "dl_annotations") {
|
|
33901
|
+
else {
|
|
33902
|
+
ic.bAlignSeq = false;
|
|
33903
|
+
ic.bAnnotations = true;
|
|
33904
|
+
}
|
|
33845
33905
|
|
|
33846
33906
|
// select annotation title
|
|
33847
33907
|
//$("div .ui-selected", this).each(function() {
|
|
@@ -33870,8 +33930,9 @@ class HlSeq {
|
|
|
33870
33930
|
|
|
33871
33931
|
$("#" + ic.pre + "dl_sequence2").add("[id^=" + ic.pre + "giseq]").add("[id^=" + ic.pre + "custom]").add("[id^=" + ic.pre + "site]").add("[id^=" + ic.pre + "clinvar]").add("[id^=" + ic.pre + "snp]").add("[id^=" + ic.pre + "cdd]").add("[id^=" + ic.pre + "domain]").add("[id^=" + ic.pre + "interaction]").add("[id^=" + ic.pre + "ssbond]").add("[id^=" + ic.pre + "crosslink]").add("[id^=" + ic.pre + "transmem]").on('click', '.icn3d-residue', function(e) { let ic = thisClass.icn3d;
|
|
33872
33932
|
e.stopImmediatePropagation();
|
|
33873
|
-
|
|
33874
|
-
if($(this).attr('id') === ic.pre + "dl_sequence2") {
|
|
33933
|
+
/*
|
|
33934
|
+
//if($(this).attr('id') === ic.pre + "dl_sequence2") {
|
|
33935
|
+
if($(this).parents('span').parents('div').attr('id') === ic.pre + "dl_sequence2") {
|
|
33875
33936
|
ic.bAlignSeq = true;
|
|
33876
33937
|
ic.bAnnotations = false;
|
|
33877
33938
|
}
|
|
@@ -33880,7 +33941,7 @@ class HlSeq {
|
|
|
33880
33941
|
ic.bAlignSeq = false;
|
|
33881
33942
|
ic.bAnnotations = true;
|
|
33882
33943
|
}
|
|
33883
|
-
|
|
33944
|
+
*/
|
|
33884
33945
|
// select residues
|
|
33885
33946
|
//$("span.ui-selected", this).each(function() {
|
|
33886
33947
|
let id = $(this).attr('id');
|
|
@@ -33919,7 +33980,8 @@ class HlSeq {
|
|
|
33919
33980
|
$("#" + ic.pre + "dl_sequence2").add("[id^=" + ic.pre + "giseq]").add("[id^=" + ic.pre + "custom]").add("[id^=" + ic.pre + "site]").add("[id^=" + ic.pre + "feat]").add("[id^=" + ic.pre + "clinvar]").add("[id^=" + ic.pre + "snp]").add("[id^=" + ic.pre + "cdd]").add("[id^=" + ic.pre + "domain]").add("[id^=" + ic.pre + "interaction]").add("[id^=" + ic.pre + "ssbond]").add("[id^=" + ic.pre + "crosslink]").add("[id^=" + ic.pre + "transmem]").on('click', '.icn3d-seqTitle', function(e) { let ic = thisClass.icn3d;
|
|
33920
33981
|
e.stopImmediatePropagation();
|
|
33921
33982
|
|
|
33922
|
-
if($(this).attr('id') === ic.pre + "dl_sequence2") {
|
|
33983
|
+
//if($(this).attr('id') === ic.pre + "dl_sequence2") {
|
|
33984
|
+
if($(this).parents('div').attr('id') === ic.pre + "dl_sequence2") {
|
|
33923
33985
|
ic.bAlignSeq = true;
|
|
33924
33986
|
ic.bAnnotations = false;
|
|
33925
33987
|
}
|
|
@@ -34116,7 +34178,7 @@ class HlSeq {
|
|
|
34116
34178
|
|
|
34117
34179
|
//var size = parseInt(ic.LABELSIZE * 10 / commandname.length);
|
|
34118
34180
|
let size = ic.LABELSIZE;
|
|
34119
|
-
let color = "FFFF00";
|
|
34181
|
+
let color = (ic.opts.background == 'white' || ic.opts.background == 'gray') ? ic.colorWhitebkgd : ic.colorBlackbkgd; //"FFFF00";
|
|
34120
34182
|
if(position !== undefined) ic.analysisCls.addLabel(commanddescr, position.center.x, position.center.y, position.center.z, size, color, undefined, 'custom');
|
|
34121
34183
|
|
|
34122
34184
|
ic.drawCls.draw();
|
|
@@ -34150,6 +34212,10 @@ class HlSeq {
|
|
|
34150
34212
|
selectResidues(id, that) { let ic = this.icn3d, me = ic.icn3dui;
|
|
34151
34213
|
if(me.bNode) return;
|
|
34152
34214
|
|
|
34215
|
+
if(ic.bSelectResidue === false && !ic.bShift && !ic.bCtrl) {
|
|
34216
|
+
ic.selectionCls.removeSelection();
|
|
34217
|
+
}
|
|
34218
|
+
|
|
34153
34219
|
if(id !== undefined && id !== '') {
|
|
34154
34220
|
// add "align_" in front of id so that full sequence and aligned sequence will not conflict
|
|
34155
34221
|
//if(id.substr(0, 5) === 'align') id = id.substr(5);
|
|
@@ -34322,7 +34388,7 @@ class ShowAnno {
|
|
|
34322
34388
|
}
|
|
34323
34389
|
}
|
|
34324
34390
|
}
|
|
34325
|
-
else if(me.cfg.blast_rep_id !== undefined) { // align sequence to structure
|
|
34391
|
+
else if(me.cfg.blast_rep_id !== undefined && !ic.bSmithwm) { // align sequence to structure
|
|
34326
34392
|
let url = me.htmlCls.baseUrl + 'pwaln/pwaln.fcgi?from=querytarget';
|
|
34327
34393
|
let dataObj = {'targets': me.cfg.blast_rep_id, 'queries': me.cfg.query_id};
|
|
34328
34394
|
if(me.cfg.query_from_to !== undefined ) {
|
|
@@ -34364,6 +34430,63 @@ class ShowAnno {
|
|
|
34364
34430
|
}
|
|
34365
34431
|
});
|
|
34366
34432
|
} // align seq to structure
|
|
34433
|
+
else if(me.cfg.blast_rep_id !== undefined && ic.bSmithwm) { // align sequence to structure
|
|
34434
|
+
//{'targets': me.cfg.blast_rep_id, 'queries': me.cfg.query_id}
|
|
34435
|
+
let idArray = [me.cfg.blast_rep_id];
|
|
34436
|
+
|
|
34437
|
+
let target, query;
|
|
34438
|
+
if(me.cfg.query_id.indexOf('>') != -1) { //FASTA with header
|
|
34439
|
+
query = me.cfg.query_id.substr(me.cfg.query_id.indexOf('\n') + 1);
|
|
34440
|
+
}
|
|
34441
|
+
else if(!(/\d/.test(me.cfg.query_id)) || me.cfg.query_id.length > 50) { //FASTA
|
|
34442
|
+
query = me.cfg.query_id;
|
|
34443
|
+
}
|
|
34444
|
+
else { // accession
|
|
34445
|
+
idArray.push(me.cfg.query_id);
|
|
34446
|
+
}
|
|
34447
|
+
|
|
34448
|
+
// show the sequence and 3D structure
|
|
34449
|
+
//var url = "https://eme.utilsCls.ncbi.nlm.nih.gov/entrez/eUtilsCls/efetch.fcgi?db=protein&retmode=json&rettype=fasta&id=" + chnidBaseArray;
|
|
34450
|
+
let url = me.htmlCls.baseUrl + "/vastdyn/vastdyn.cgi?chainlist=" + idArray;
|
|
34451
|
+
|
|
34452
|
+
$.ajax({
|
|
34453
|
+
url: url,
|
|
34454
|
+
dataType: 'jsonp', //'text',
|
|
34455
|
+
cache: true,
|
|
34456
|
+
tryCount : 0,
|
|
34457
|
+
retryLimit : 1,
|
|
34458
|
+
success: function(chainid_seq) {
|
|
34459
|
+
let index = 0;
|
|
34460
|
+
for(let acc in chainid_seq) {
|
|
34461
|
+
if(index == 0) {
|
|
34462
|
+
target = chainid_seq[acc];
|
|
34463
|
+
}
|
|
34464
|
+
else if(!query) {
|
|
34465
|
+
query = chainid_seq[acc];
|
|
34466
|
+
}
|
|
34467
|
+
|
|
34468
|
+
++index;
|
|
34469
|
+
}
|
|
34470
|
+
|
|
34471
|
+
let match_score = 1, mismatch = -1, gap = -1, extension = -1;
|
|
34472
|
+
ic.seqStructAlignDataSmithwm = ic.alignSWCls.alignSW(target, query, match_score, mismatch, gap, extension);
|
|
34473
|
+
|
|
34474
|
+
thisClass.showAnnoSeqData(nucleotide_chainid, chemical_chainid, chemical_set);
|
|
34475
|
+
},
|
|
34476
|
+
error : function(xhr, textStatus, errorThrown ) {
|
|
34477
|
+
this.tryCount++;
|
|
34478
|
+
if(this.tryCount <= this.retryLimit) {
|
|
34479
|
+
//try again
|
|
34480
|
+
$.ajax(this);
|
|
34481
|
+
return;
|
|
34482
|
+
}
|
|
34483
|
+
|
|
34484
|
+
var aaa = 1; //alert("Can not retrieve the sequence of the accession(s) " + idArray.join(", "));
|
|
34485
|
+
|
|
34486
|
+
return;
|
|
34487
|
+
}
|
|
34488
|
+
});
|
|
34489
|
+
} // align seq to structure
|
|
34367
34490
|
}
|
|
34368
34491
|
ic.bAnnoShown = true;
|
|
34369
34492
|
}
|
|
@@ -34591,7 +34714,7 @@ class ShowAnno {
|
|
|
34591
34714
|
if(me.cfg.blast_rep_id != chnid) {
|
|
34592
34715
|
ic.showSeqCls.showSeq(chnid, chnidBase);
|
|
34593
34716
|
}
|
|
34594
|
-
else if(me.cfg.blast_rep_id == chnid && ic.seqStructAlignData.
|
|
34717
|
+
else if(me.cfg.blast_rep_id == chnid && ic.seqStructAlignData === undefined && ic.seqStructAlignDataSmithwm === undefined) {
|
|
34595
34718
|
let title;
|
|
34596
34719
|
if(me.cfg.query_id.length > 14) {
|
|
34597
34720
|
title = 'Query: ' + me.cfg.query_id.substr(0, 6) + '...';
|
|
@@ -34607,7 +34730,7 @@ class ShowAnno {
|
|
|
34607
34730
|
var aaa = 1; //alert('The sequence can NOT be aligned to the structure');
|
|
34608
34731
|
ic.showSeqCls.showSeq(chnid, chnidBase, undefined, title, compTitle, text, compText);
|
|
34609
34732
|
}
|
|
34610
|
-
else if(me.cfg.blast_rep_id == chnid && ic.seqStructAlignData.
|
|
34733
|
+
else if(me.cfg.blast_rep_id == chnid && (ic.seqStructAlignData !== undefined || ic.seqStructAlignDataSmithwm !== undefined) ) { // align sequence to structure
|
|
34611
34734
|
//var title = 'Query: ' + me.cfg.query_id.substr(0, 6);
|
|
34612
34735
|
let title;
|
|
34613
34736
|
if(me.cfg.query_id.length > 14) {
|
|
@@ -34616,27 +34739,72 @@ class ShowAnno {
|
|
|
34616
34739
|
else {
|
|
34617
34740
|
title =(isNaN(me.cfg.query_id)) ? 'Query: ' + me.cfg.query_id : 'Query: gi ' + me.cfg.query_id;
|
|
34618
34741
|
}
|
|
34619
|
-
let data = ic.seqStructAlignData;
|
|
34620
34742
|
|
|
34621
|
-
|
|
34622
|
-
|
|
34623
|
-
|
|
34624
|
-
|
|
34625
|
-
|
|
34626
|
-
|
|
34743
|
+
|
|
34744
|
+
let evalue, targetSeq, querySeq, segArray;
|
|
34745
|
+
|
|
34746
|
+
if(ic.seqStructAlignData !== undefined) {
|
|
34747
|
+
let query, target;
|
|
34748
|
+
let data = ic.seqStructAlignData;
|
|
34749
|
+
if(data.data !== undefined) {
|
|
34750
|
+
query = data.data[0].query;
|
|
34751
|
+
//target = data.data[0].targets[chnid.replace(/_/g, '')];
|
|
34752
|
+
target = data.data[0].targets[chnid];
|
|
34753
|
+
target =(target !== undefined && target.hsps.length > 0) ? target.hsps[0] : undefined;
|
|
34754
|
+
}
|
|
34755
|
+
|
|
34756
|
+
if(query !== undefined && target !== undefined) {
|
|
34757
|
+
evalue = target.scores.e_value.toPrecision(2);
|
|
34758
|
+
if(evalue > 1e-200) evalue = parseFloat(evalue).toExponential();
|
|
34759
|
+
target.scores.bit_score;
|
|
34760
|
+
//var targetSeq = data.targets[chnid.replace(/_/g, '')].seqdata;
|
|
34761
|
+
targetSeq = data.targets[chnid].seqdata;
|
|
34762
|
+
querySeq = query.seqdata;
|
|
34763
|
+
segArray = target.segs;
|
|
34764
|
+
}
|
|
34627
34765
|
}
|
|
34766
|
+
else { // mimic the output of the cgi pwaln.fcgi
|
|
34767
|
+
let data = ic.seqStructAlignDataSmithwm;
|
|
34768
|
+
evalue = data.score;
|
|
34769
|
+
targetSeq = data.target.replace(/-/g, '');
|
|
34770
|
+
querySeq = data.query.replace(/-/g, '');
|
|
34771
|
+
segArray = [];
|
|
34772
|
+
// target, 0-based: orifrom, orito
|
|
34773
|
+
// query, 0-based: from, to
|
|
34774
|
+
|
|
34775
|
+
let targetCnt = -1, queryCnt = -1;
|
|
34776
|
+
let bAlign = false, seg = {};
|
|
34777
|
+
for(let i = 0, il = data.target.length; i < il; ++i) {
|
|
34778
|
+
if(data.target[i] != '-') ++targetCnt;
|
|
34779
|
+
if(data.query[i] != '-') ++queryCnt;
|
|
34780
|
+
if(!bAlign && data.target[i] != '-' && data.query[i] != '-') {
|
|
34781
|
+
bAlign = true;
|
|
34782
|
+
seg.orifrom = targetCnt;
|
|
34783
|
+
seg.from = queryCnt;
|
|
34784
|
+
}
|
|
34785
|
+
else if(bAlign && (data.target[i] == '-' || data.query[i] == '-') ) {
|
|
34786
|
+
bAlign = false;
|
|
34787
|
+
seg.orito = (data.target[i] == '-') ? targetCnt : targetCnt - 1;
|
|
34788
|
+
seg.to = (data.query[i] == '-') ? queryCnt : queryCnt - 1;
|
|
34789
|
+
segArray.push(seg);
|
|
34790
|
+
seg = {};
|
|
34791
|
+
}
|
|
34792
|
+
}
|
|
34793
|
+
|
|
34794
|
+
// end condition
|
|
34795
|
+
if(data.target[data.target.length - 1] != '-' && data.query[data.target.length - 1] != '-') {
|
|
34796
|
+
seg.orito = targetCnt;
|
|
34797
|
+
seg.to = queryCnt;
|
|
34798
|
+
|
|
34799
|
+
segArray.push(seg);
|
|
34800
|
+
}
|
|
34801
|
+
}
|
|
34802
|
+
|
|
34628
34803
|
let text = '', compText = '';
|
|
34629
34804
|
ic.queryStart = '';
|
|
34630
34805
|
ic.queryEnd = '';
|
|
34631
|
-
|
|
34632
|
-
if(
|
|
34633
|
-
evalue = target.scores.e_value.toPrecision(2);
|
|
34634
|
-
if(evalue > 1e-200) evalue = parseFloat(evalue).toExponential();
|
|
34635
|
-
target.scores.bit_score;
|
|
34636
|
-
//var targetSeq = data.targets[chnid.replace(/_/g, '')].seqdata;
|
|
34637
|
-
let targetSeq = data.targets[chnid].seqdata;
|
|
34638
|
-
let querySeq = query.seqdata;
|
|
34639
|
-
let segArray = target.segs;
|
|
34806
|
+
|
|
34807
|
+
if(segArray !== undefined) {
|
|
34640
34808
|
let target2queryHash = {};
|
|
34641
34809
|
if(ic.targetGapHash === undefined) ic.targetGapHash = {};
|
|
34642
34810
|
ic.fullpos2ConsTargetpos = {};
|
|
@@ -34664,6 +34832,7 @@ class ShowAnno {
|
|
|
34664
34832
|
prevTargetTo = seg.orito;
|
|
34665
34833
|
prevQueryTo = seg.to;
|
|
34666
34834
|
}
|
|
34835
|
+
|
|
34667
34836
|
// the missing residues at the end of the seq will be filled up in the API showNewTrack()
|
|
34668
34837
|
let nGap = 0;
|
|
34669
34838
|
ic.alnChainsSeq[chnid] = [];
|
|
@@ -34704,13 +34873,14 @@ class ShowAnno {
|
|
|
34704
34873
|
compText += ' ';
|
|
34705
34874
|
}
|
|
34706
34875
|
}
|
|
34876
|
+
|
|
34707
34877
|
//title += ', E: ' + evalue;
|
|
34708
34878
|
}
|
|
34709
34879
|
else {
|
|
34710
34880
|
text += "cannot be aligned";
|
|
34711
34881
|
var aaa = 1; //alert('The sequence can NOT be aligned to the structure');
|
|
34712
34882
|
}
|
|
34713
|
-
let compTitle = 'BLAST, E: ' + evalue;
|
|
34883
|
+
let compTitle = (ic.seqStructAlignData !== undefined) ? 'BLAST, E: ' + evalue : 'Score: ' + evalue;
|
|
34714
34884
|
ic.showSeqCls.showSeq(chnid, chnidBase, undefined, title, compTitle, text, compText);
|
|
34715
34885
|
let residueidHash = {};
|
|
34716
34886
|
let residueid;
|
|
@@ -35315,7 +35485,7 @@ class AnnoSnpClinVar {
|
|
|
35315
35485
|
ic.labels['clinvar'] = [];
|
|
35316
35486
|
//var size = Math.round(ic.LABELSIZE * 10 / label.length);
|
|
35317
35487
|
let size = ic.LABELSIZE;
|
|
35318
|
-
let color = "#FFFF00";
|
|
35488
|
+
let color = (ic.opts.background == 'white' || ic.opts.background == 'gray') ? ic.colorWhitebkgd : ic.colorBlackbkgd; //"#FFFF00";
|
|
35319
35489
|
ic.analysisCls.addLabel(label, position.center.x + 1, position.center.y + 1, position.center.z + 1, size, color, undefined, 'clinvar');
|
|
35320
35490
|
ic.hAtoms = {};
|
|
35321
35491
|
for(let j in ic.residues[residueid]) {
|
|
@@ -37596,23 +37766,25 @@ class HlUpdate {
|
|
|
37596
37766
|
$("#" + ic.pre + "atomsCustom")[0].blur();
|
|
37597
37767
|
}
|
|
37598
37768
|
|
|
37769
|
+
//Update the highlight of 3D structure, 2D interaction, sequences, and the menu of defined sets
|
|
37770
|
+
//according to the current highlighted atoms.
|
|
37599
37771
|
updateHlAll(commandnameArray, bSetMenu, bUnion, bForceHighlight) { let ic = this.icn3d, me = ic.icn3dui;
|
|
37600
|
-
|
|
37601
|
-
|
|
37772
|
+
// update the previously highlisghted atoms for switching between all and selection
|
|
37773
|
+
ic.prevHighlightAtoms = me.hashUtilsCls.cloneHash(ic.hAtoms);
|
|
37602
37774
|
|
|
37603
|
-
|
|
37775
|
+
this.updateHlObjects(bForceHighlight);
|
|
37604
37776
|
|
|
37605
|
-
|
|
37606
|
-
|
|
37607
|
-
|
|
37608
|
-
|
|
37609
|
-
|
|
37610
|
-
|
|
37777
|
+
if(commandnameArray !== undefined) {
|
|
37778
|
+
this.updateHlSeqInChain(commandnameArray, bUnion);
|
|
37779
|
+
}
|
|
37780
|
+
else {
|
|
37781
|
+
this.updateHlSeq(undefined, undefined, bUnion);
|
|
37782
|
+
}
|
|
37611
37783
|
|
|
37612
|
-
|
|
37613
|
-
|
|
37784
|
+
this.updateHl2D();
|
|
37785
|
+
if(bSetMenu === undefined || bSetMenu) this.updateHlMenus(commandnameArray);
|
|
37614
37786
|
|
|
37615
|
-
|
|
37787
|
+
//ic.annotationCls.showAnnoSelectedChains();
|
|
37616
37788
|
}
|
|
37617
37789
|
|
|
37618
37790
|
//Update the highlight of 3D structure display according to the current highlighted atoms.
|
|
@@ -37916,27 +38088,6 @@ class HlUpdate {
|
|
|
37916
38088
|
$( this ).removeClass('icn3d-highlightSeq');
|
|
37917
38089
|
});
|
|
37918
38090
|
}
|
|
37919
|
-
|
|
37920
|
-
//Update the highlight of 3D structure, 2D interaction, sequences, and the menu of defined sets
|
|
37921
|
-
//according to the current highlighted atoms.
|
|
37922
|
-
updateHlAll(commandnameArray, bSetMenu, bUnion, bForceHighlight) { let ic = this.icn3d, me = ic.icn3dui;
|
|
37923
|
-
// update the previously highlisghted atoms for switching between all and selection
|
|
37924
|
-
ic.prevHighlightAtoms = me.hashUtilsCls.cloneHash(ic.hAtoms);
|
|
37925
|
-
|
|
37926
|
-
this.updateHlObjects(bForceHighlight);
|
|
37927
|
-
|
|
37928
|
-
if(commandnameArray !== undefined) {
|
|
37929
|
-
this.updateHlSeqInChain(commandnameArray, bUnion);
|
|
37930
|
-
}
|
|
37931
|
-
else {
|
|
37932
|
-
this.updateHlSeq(undefined, undefined, bUnion);
|
|
37933
|
-
}
|
|
37934
|
-
|
|
37935
|
-
this.updateHl2D();
|
|
37936
|
-
if(bSetMenu === undefined || bSetMenu) this.updateHlMenus(commandnameArray);
|
|
37937
|
-
|
|
37938
|
-
//ic.annotationCls.showAnnoSelectedChains();
|
|
37939
|
-
}
|
|
37940
38091
|
}
|
|
37941
38092
|
|
|
37942
38093
|
/**
|
|
@@ -38319,6 +38470,9 @@ class Selection {
|
|
|
38319
38470
|
|
|
38320
38471
|
ic.loadScriptCls.renderFinalStep(1);
|
|
38321
38472
|
ic.definedSetsCls.setMode('all');
|
|
38473
|
+
|
|
38474
|
+
ic.selectionCls.selectAll();
|
|
38475
|
+
|
|
38322
38476
|
me.htmlCls.clickMenuCls.setLogCmd("reset", true);
|
|
38323
38477
|
|
|
38324
38478
|
ic.hlUpdateCls.removeSeqChainBkgd();
|
|
@@ -38442,7 +38596,7 @@ class Selection {
|
|
|
38442
38596
|
ic.drawCls.draw();
|
|
38443
38597
|
}
|
|
38444
38598
|
|
|
38445
|
-
toggleMembrane() {var ic = this.icn3d, me = ic.icn3dui;
|
|
38599
|
+
toggleMembrane(bShowMembrane) {var ic = this.icn3d, me = ic.icn3dui;
|
|
38446
38600
|
let structureArray = Object.keys(ic.structures);
|
|
38447
38601
|
|
|
38448
38602
|
for(let i = 0, il = structureArray.length; i < il; ++i) {
|
|
@@ -38457,6 +38611,7 @@ class Selection {
|
|
|
38457
38611
|
ic.dAtoms = me.hashUtilsCls.unionHash(ic.dAtoms, atomsHash);
|
|
38458
38612
|
oriStyle = 'nothing';
|
|
38459
38613
|
}
|
|
38614
|
+
|
|
38460
38615
|
for(let j in atomsHash) {
|
|
38461
38616
|
let atom = ic.atoms[j];
|
|
38462
38617
|
if(oriStyle !== 'nothing') {
|
|
@@ -38465,10 +38620,14 @@ class Selection {
|
|
|
38465
38620
|
else {
|
|
38466
38621
|
atom.style = 'stick';
|
|
38467
38622
|
}
|
|
38623
|
+
|
|
38624
|
+
if(bShowMembrane !== undefined) {
|
|
38625
|
+
atom.style = (bShowMembrane) ? 'stick' : 'nothing';
|
|
38626
|
+
}
|
|
38468
38627
|
}
|
|
38469
38628
|
}
|
|
38470
38629
|
|
|
38471
|
-
ic.drawCls.draw();
|
|
38630
|
+
if(bShowMembrane === undefined) ic.drawCls.draw();
|
|
38472
38631
|
}
|
|
38473
38632
|
|
|
38474
38633
|
adjustMembrane(extra_mem_z, intra_mem_z) {var ic = this.icn3d; ic.icn3dui;
|
|
@@ -39282,10 +39441,11 @@ class TextSprite {
|
|
|
39282
39441
|
|
|
39283
39442
|
let a = parameters.hasOwnProperty("alpha") ? parameters["alpha"] : 1.0;
|
|
39284
39443
|
|
|
39285
|
-
let bBkgd = true;
|
|
39444
|
+
let bBkgd = false; //true;
|
|
39286
39445
|
let bSchematic = false;
|
|
39287
39446
|
if(parameters.hasOwnProperty("bSchematic") && parameters["bSchematic"]) {
|
|
39288
39447
|
bSchematic = true;
|
|
39448
|
+
bBkgd = true;
|
|
39289
39449
|
|
|
39290
39450
|
fontsize = 40;
|
|
39291
39451
|
}
|
|
@@ -39305,9 +39465,13 @@ class TextSprite {
|
|
|
39305
39465
|
}
|
|
39306
39466
|
|
|
39307
39467
|
let textAlpha = 1.0;
|
|
39308
|
-
|
|
39309
|
-
let textColor = parameters.hasOwnProperty("textColor") && parameters["textColor"] !== undefined ? me.utilsCls.hexToRgb(parameters["textColor"], textAlpha) : { r:255, g:255, b:0, a:1.0 };
|
|
39310
|
-
|
|
39468
|
+
// default yellow
|
|
39469
|
+
//let textColor = parameters.hasOwnProperty("textColor") && parameters["textColor"] !== undefined ? me.utilsCls.hexToRgb(parameters["textColor"], textAlpha) : { r:255, g:255, b:0, a:1.0 };
|
|
39470
|
+
// default black or white
|
|
39471
|
+
let defaultColor = ( ic.opts.background == 'white' || ic.opts.background == 'gray' ) ? { r:0, g:0, b:0, a:1.0 } : { r:255, g:255, b:0, a:1.0 };
|
|
39472
|
+
let textColor = parameters.hasOwnProperty("textColor") && parameters["textColor"] !== undefined ? me.utilsCls.hexToRgb(parameters["textColor"], textAlpha)
|
|
39473
|
+
: defaultColor;
|
|
39474
|
+
if(!textColor) textColor = defaultColor;
|
|
39311
39475
|
|
|
39312
39476
|
let canvas = document.createElement('canvas');
|
|
39313
39477
|
|
|
@@ -39444,6 +39608,7 @@ class Label {
|
|
|
39444
39608
|
|
|
39445
39609
|
for(let name in labels) {
|
|
39446
39610
|
let labelArray = (labels[name] !== undefined) ? labels[name] : [];
|
|
39611
|
+
let defaultColor = (ic.opts.background == 'white' || ic.opts.background == 'gray') ? ic.colorWhitebkgd : ic.colorBlackbkgd;
|
|
39447
39612
|
|
|
39448
39613
|
for (let i = 0, il = labelArray.length; i < il; ++i) {
|
|
39449
39614
|
let label = labelArray[i];
|
|
@@ -39454,7 +39619,7 @@ class Label {
|
|
|
39454
39619
|
if(label.background == 0) label.background = undefined;
|
|
39455
39620
|
|
|
39456
39621
|
let labelsize = (label.size !== undefined) ? label.size : ic.LABELSIZE;
|
|
39457
|
-
let labelcolor = (label.color !== undefined) ? label.color :
|
|
39622
|
+
let labelcolor = (label.color !== undefined) ? label.color : defaultColor;
|
|
39458
39623
|
let labelbackground = (label.background !== undefined) ? label.background : '#cccccc';
|
|
39459
39624
|
let labelalpha = (label.alpha !== undefined) ? label.alpha : 1.0;
|
|
39460
39625
|
|
|
@@ -39655,49 +39820,68 @@ class ApplyDisplay {
|
|
|
39655
39820
|
atomsObj = {};
|
|
39656
39821
|
} // end if(bHighlight === 1)
|
|
39657
39822
|
|
|
39658
|
-
ic.
|
|
39823
|
+
if(ic.bInitial) {
|
|
39824
|
+
if(me.htmlCls.setHtmlCls.getCookie('membrane') != '') {
|
|
39825
|
+
let bMembrane = parseInt(me.htmlCls.setHtmlCls.getCookie('membrane'));
|
|
39826
|
+
|
|
39827
|
+
if(ic.bMembrane != bMembrane) {
|
|
39828
|
+
me.htmlCls.clickMenuCls.setLogCmd('set membrane ' + bMembrane, true);
|
|
39829
|
+
}
|
|
39830
|
+
|
|
39831
|
+
ic.bMembrane = (!isNaN(bMembrane)) ? parseInt(bMembrane) : 0;
|
|
39832
|
+
}
|
|
39659
39833
|
|
|
39660
|
-
|
|
39661
|
-
|
|
39662
|
-
|
|
39663
|
-
|
|
39834
|
+
// show membrane
|
|
39835
|
+
if(ic.bMembrane) {
|
|
39836
|
+
ic.selectionCls.toggleMembrane(true);
|
|
39837
|
+
}
|
|
39838
|
+
else {
|
|
39839
|
+
ic.selectionCls.toggleMembrane(false);
|
|
39840
|
+
}
|
|
39664
39841
|
}
|
|
39665
39842
|
|
|
39843
|
+
ic.setStyleCls.setStyle2Atoms(atoms);
|
|
39844
|
+
|
|
39845
|
+
//ic.bAllAtoms = false;
|
|
39846
|
+
//if(atoms && atoms !== undefined ) {
|
|
39847
|
+
// ic.bAllAtoms = (Object.keys(atoms).length === Object.keys(ic.atoms).length);
|
|
39848
|
+
//}
|
|
39849
|
+
|
|
39666
39850
|
let chemicalSchematicRadius = ic.cylinderRadius * 0.5;
|
|
39667
39851
|
|
|
39668
39852
|
// remove schematic labels
|
|
39669
39853
|
//if(ic.labels !== undefined) ic.labels['schematic'] = undefined;
|
|
39670
39854
|
if(ic.labels !== undefined) delete ic.labels['schematic'];
|
|
39671
|
-
|
|
39672
|
-
let bOnlySideChains = false;
|
|
39673
|
-
|
|
39855
|
+
/*
|
|
39674
39856
|
if(bHighlight) {
|
|
39675
|
-
let residueHashCalpha = ic.firstAtomObjCls.getResiduesFromCalphaAtoms(ic.hAtoms);
|
|
39857
|
+
//let residueHashCalpha = ic.firstAtomObjCls.getResiduesFromCalphaAtoms(ic.hAtoms);
|
|
39676
39858
|
|
|
39677
39859
|
let proteinAtoms = me.hashUtilsCls.intHash(ic.hAtoms, ic.proteins);
|
|
39860
|
+
|
|
39678
39861
|
let residueHash = ic.firstAtomObjCls.getResiduesFromAtoms(proteinAtoms);
|
|
39862
|
+
let residueHashCalpha = ic.firstAtomObjCls.getResiduesFromCalphaAtoms(proteinAtoms);
|
|
39679
39863
|
|
|
39680
|
-
if(Object.keys(residueHash) > Object.keys(residueHashCalpha)) { // some residues have only side chains
|
|
39864
|
+
if(Object.keys(residueHash).length > Object.keys(residueHashCalpha).length) { // some residues have only side chains
|
|
39681
39865
|
bOnlySideChains = true;
|
|
39682
39866
|
}
|
|
39683
39867
|
}
|
|
39684
|
-
|
|
39868
|
+
*/
|
|
39685
39869
|
for(let style in ic.style2atoms) {
|
|
39686
39870
|
// 14 styles: ribbon, strand, cylinder and plate, nucleotide cartoon, o3 trace, schematic, c alpha trace, b factor tube, lines, stick, ball and stick, sphere, dot, nothing
|
|
39687
39871
|
let atomHash = ic.style2atoms[style];
|
|
39688
39872
|
//var bPhosphorusOnly = me.utilsCls.isCalphaPhosOnly(me.hashUtilsCls.hash2Atoms(atomHash), "O3'", "O3*") || me.utilsCls.isCalphaPhosOnly(me.hashUtilsCls.hash2Atoms(atomHash), "P");
|
|
39689
39873
|
let bPhosphorusOnly = me.utilsCls.isCalphaPhosOnly(me.hashUtilsCls.hash2Atoms(atomHash, ic.atoms));
|
|
39690
39874
|
|
|
39691
|
-
|
|
39692
|
-
if(style === 'ribbon' && (!bHighlight || (bHighlight && !bOnlySideChains))) {
|
|
39875
|
+
if(style === 'ribbon') {
|
|
39876
|
+
//if(style === 'ribbon' && (!bHighlight || (bHighlight && !bOnlySideChains))) {
|
|
39693
39877
|
ic.strandCls.createStrand(me.hashUtilsCls.hash2Atoms(atomHash, ic.atoms), 2, undefined, true, undefined, undefined, false, ic.ribbonthickness, bHighlight);
|
|
39694
39878
|
}
|
|
39695
|
-
|
|
39696
|
-
else if(style === 'strand' && (!bHighlight || (bHighlight && !bOnlySideChains))) {
|
|
39879
|
+
else if(style === 'strand') {
|
|
39880
|
+
//else if(style === 'strand' && (!bHighlight || (bHighlight && !bOnlySideChains))) {
|
|
39697
39881
|
ic.strandCls.createStrand(me.hashUtilsCls.hash2Atoms(atomHash, ic.atoms), null, null, null, null, null, false, undefined, bHighlight);
|
|
39698
39882
|
}
|
|
39699
|
-
|
|
39700
|
-
else if(style === 'cylinder and plate' && (!bHighlight || (bHighlight && !bOnlySideChains))) {
|
|
39883
|
+
else if(style === 'cylinder and plate') {
|
|
39884
|
+
//else if(style === 'cylinder and plate' && (!bHighlight || (bHighlight && !bOnlySideChains))) {
|
|
39701
39885
|
ic.cylinderCls.createCylinderHelix(me.hashUtilsCls.hash2Atoms(atomHash, ic.atoms), ic.cylinderHelixRadius, bHighlight);
|
|
39702
39886
|
}
|
|
39703
39887
|
else if(style === 'nucleotide cartoon') {
|
|
@@ -39788,11 +39972,30 @@ class ApplyDisplay {
|
|
|
39788
39972
|
if(ic.labels !== undefined && Object.keys(ic.labels).length > 0) {
|
|
39789
39973
|
ic.labelCls.hideLabels();
|
|
39790
39974
|
|
|
39975
|
+
// change label color
|
|
39976
|
+
for(let labeltype in ic.labels) {
|
|
39977
|
+
if(labeltype != 'schematic') this.changeLabelColor(ic.labels[labeltype]);
|
|
39978
|
+
}
|
|
39979
|
+
|
|
39791
39980
|
// labels
|
|
39792
39981
|
ic.labelCls.createLabelRepresentation(ic.labels);
|
|
39793
39982
|
}
|
|
39794
39983
|
}
|
|
39795
39984
|
|
|
39985
|
+
changeLabelColor(labelArray) { let ic = this.icn3d; ic.icn3dui;
|
|
39986
|
+
if(labelArray) {
|
|
39987
|
+
for(let i = 0, il = labelArray.length; i < il; ++i) {
|
|
39988
|
+
let label = labelArray[i];
|
|
39989
|
+
if((ic.opts.background == 'white' || ic.opts.background == 'grey') && label.color == ic.colorBlackbkgd) {
|
|
39990
|
+
label.color = ic.colorWhitebkgd;
|
|
39991
|
+
}
|
|
39992
|
+
else if((ic.opts.background == 'black' || ic.opts.background == 'transparent') && label.color == ic.colorWhitebkgd) {
|
|
39993
|
+
label.color = ic.colorBlackbkgd;
|
|
39994
|
+
}
|
|
39995
|
+
}
|
|
39996
|
+
}
|
|
39997
|
+
}
|
|
39998
|
+
|
|
39796
39999
|
selectMainChainSubset(atoms) { let ic = this.icn3d; ic.icn3dui;
|
|
39797
40000
|
let nuclMainArray = ["C1'", "C1*", "C2'", "C2*", "C3'", "C3*", "C4'", "C4*", "C5'", "C5*", "O3'", "O3*", "O4'", "O4*", "O5'", "O5*", "P", "OP1", "O1P", "OP2", "O2P"];
|
|
39798
40001
|
|
|
@@ -40260,14 +40463,16 @@ class ApplyOther {
|
|
|
40260
40463
|
}
|
|
40261
40464
|
}
|
|
40262
40465
|
|
|
40263
|
-
if(
|
|
40264
|
-
|
|
40466
|
+
if(ic.bInitial) {
|
|
40467
|
+
if(me.htmlCls.setHtmlCls.getCookie('glycan') != '') {
|
|
40468
|
+
let bGlycansCartoon = parseInt(me.htmlCls.setHtmlCls.getCookie('glycan'));
|
|
40265
40469
|
|
|
40266
|
-
|
|
40267
|
-
|
|
40268
|
-
|
|
40470
|
+
if(ic.bGlycansCartoon != bGlycansCartoon) {
|
|
40471
|
+
me.htmlCls.clickMenuCls.setLogCmd('set glycan ' + bGlycansCartoon, true);
|
|
40472
|
+
}
|
|
40269
40473
|
|
|
40270
|
-
|
|
40474
|
+
ic.bGlycansCartoon = bGlycansCartoon;
|
|
40475
|
+
}
|
|
40271
40476
|
}
|
|
40272
40477
|
|
|
40273
40478
|
// add cartoon for glycans
|
|
@@ -41498,7 +41703,6 @@ class Instancing {
|
|
|
41498
41703
|
let mdlImpostorTmp = new THREE.Object3D();
|
|
41499
41704
|
let mdl_ghostTmp = new THREE.Object3D();
|
|
41500
41705
|
|
|
41501
|
-
console.log("no instancing, Object.keys(ic.structures).length: " + Object.keys(ic.structures).length);
|
|
41502
41706
|
// for (let i = 0; i < ic.biomtMatrices.length; i++) { // skip itself
|
|
41503
41707
|
for (let i = 0; i < ic.biomtMatrices.length && Object.keys(ic.structures).length == 1; i++) { // skip itself
|
|
41504
41708
|
let mat = ic.biomtMatrices[i];
|
|
@@ -41896,7 +42100,6 @@ console.log("no instancing, Object.keys(ic.structures).length: " + Object.keys(i
|
|
|
41896
42100
|
let identity = new THREE.Matrix4();
|
|
41897
42101
|
identity.identity();
|
|
41898
42102
|
|
|
41899
|
-
console.log("instancing, Object.keys(ic.structures).length: " + Object.keys(ic.structures).length);
|
|
41900
42103
|
for (let i = 0; i < ic.biomtMatrices.length && Object.keys(ic.structures).length == 1; i++) { // skip itself
|
|
41901
42104
|
let mat = ic.biomtMatrices[i];
|
|
41902
42105
|
if (mat === undefined) continue;
|
|
@@ -42056,7 +42259,9 @@ class Draw {
|
|
|
42056
42259
|
// ic.renderer.gammaOutput = true
|
|
42057
42260
|
|
|
42058
42261
|
ic.renderer.setPixelRatio( window.devicePixelRatio ); // r71
|
|
42059
|
-
if(ic.scene)
|
|
42262
|
+
if(ic.scene) {
|
|
42263
|
+
ic.renderer.render(ic.scene, cam);
|
|
42264
|
+
}
|
|
42060
42265
|
}
|
|
42061
42266
|
|
|
42062
42267
|
}
|
|
@@ -42580,7 +42785,7 @@ class SaveFile {
|
|
|
42580
42785
|
};
|
|
42581
42786
|
}
|
|
42582
42787
|
|
|
42583
|
-
exportCustomAtoms() {var ic = this.icn3d; ic.icn3dui;
|
|
42788
|
+
exportCustomAtoms(bDetails) {var ic = this.icn3d; ic.icn3dui;
|
|
42584
42789
|
let html = "";
|
|
42585
42790
|
let nameArray =(ic.defNames2Residues !== undefined) ? Object.keys(ic.defNames2Residues).sort() : [];
|
|
42586
42791
|
for(let i = 0, il = nameArray.length; i < il; ++i) {
|
|
@@ -42589,9 +42794,8 @@ class SaveFile {
|
|
|
42589
42794
|
ic.defNames2Descr[name];
|
|
42590
42795
|
let command = ic.defNames2Command[name];
|
|
42591
42796
|
command = command.replace(/,/g, ', ');
|
|
42592
|
-
|
|
42593
|
-
html +=
|
|
42594
|
-
html += "\n";
|
|
42797
|
+
|
|
42798
|
+
html += this.exportResidues(name, residueArray, bDetails);
|
|
42595
42799
|
} // outer for
|
|
42596
42800
|
nameArray =(ic.defNames2Atoms !== undefined) ? Object.keys(ic.defNames2Atoms).sort() : [];
|
|
42597
42801
|
for(let i = 0, il = nameArray.length; i < il; ++i) {
|
|
@@ -42601,15 +42805,51 @@ class SaveFile {
|
|
|
42601
42805
|
let command = ic.defNames2Command[name];
|
|
42602
42806
|
command = command.replace(/,/g, ', ');
|
|
42603
42807
|
let residueArray = ic.resid2specCls.atoms2residues(atomArray);
|
|
42604
|
-
|
|
42605
|
-
|
|
42606
|
-
html += ic.resid2specCls.residueids2spec(residueArray);
|
|
42607
|
-
html += "\n";
|
|
42608
|
-
}
|
|
42808
|
+
|
|
42809
|
+
html += this.exportResidues(name, residueArray, bDetails);
|
|
42609
42810
|
} // outer for
|
|
42610
42811
|
return html;
|
|
42611
42812
|
}
|
|
42612
42813
|
|
|
42814
|
+
exportResidues(name, residueArray, bDetails) {var ic = this.icn3d, me = ic.icn3dui;
|
|
42815
|
+
let html = '';
|
|
42816
|
+
|
|
42817
|
+
if(residueArray.length > 0) {
|
|
42818
|
+
if(bDetails) {
|
|
42819
|
+
let chainidHash = {};
|
|
42820
|
+
for(let i = 0, il = residueArray.length; i < il; ++i) {
|
|
42821
|
+
let resid = residueArray[i];
|
|
42822
|
+
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
42823
|
+
let chainid = atom.structure + '_' + atom.chain;
|
|
42824
|
+
let resnAbbr = me.utilsCls.residueName2Abbr(atom.resn);
|
|
42825
|
+
let resName = resnAbbr + atom.resi;
|
|
42826
|
+
|
|
42827
|
+
if(!chainidHash.hasOwnProperty(chainid)) {
|
|
42828
|
+
chainidHash[chainid] = [];
|
|
42829
|
+
}
|
|
42830
|
+
|
|
42831
|
+
chainidHash[chainid].push(resName);
|
|
42832
|
+
}
|
|
42833
|
+
|
|
42834
|
+
html += name + ":\n";
|
|
42835
|
+
for(let chainid in chainidHash) {
|
|
42836
|
+
let resStr = (chainidHash[chainid].length == 1) ? "residue" : "residues";
|
|
42837
|
+
html += chainid + " (" + chainidHash[chainid].length + " " + resStr + "): ";
|
|
42838
|
+
html += chainidHash[chainid].join(", ");
|
|
42839
|
+
html += "\n";
|
|
42840
|
+
}
|
|
42841
|
+
html += "\n";
|
|
42842
|
+
}
|
|
42843
|
+
else {
|
|
42844
|
+
html += name + "\tselect ";
|
|
42845
|
+
html += ic.resid2specCls.residueids2spec(residueArray);
|
|
42846
|
+
html += "\n";
|
|
42847
|
+
}
|
|
42848
|
+
}
|
|
42849
|
+
|
|
42850
|
+
return html;
|
|
42851
|
+
}
|
|
42852
|
+
|
|
42613
42853
|
//getAtomPDB: function(atomHash, bPqr, bPdb, bNoChem) { let ic = this.icn3d, me = ic.icn3dui;
|
|
42614
42854
|
getAtomPDB(atomHash, bPqr, bNoChem, bNoHeader) { let ic = this.icn3d, me = ic.icn3dui;
|
|
42615
42855
|
let pdbStr = '';
|
|
@@ -42701,37 +42941,53 @@ class SaveFile {
|
|
|
42701
42941
|
}
|
|
42702
42942
|
}
|
|
42703
42943
|
|
|
42944
|
+
/*
|
|
42704
42945
|
// get missing residues
|
|
42705
|
-
let
|
|
42946
|
+
let ic.chainMissingResidueArray = {};
|
|
42706
42947
|
for(let chainid in ic.chainsSeq) {
|
|
42707
42948
|
let pos = chainid.indexOf('_');
|
|
42708
|
-
chainid.substr(0, pos);
|
|
42949
|
+
let chain = chainid.substr(0, pos);
|
|
42709
42950
|
|
|
42710
42951
|
for(let i = 0, il = ic.chainsSeq[chainid].length; i < il; ++i) {
|
|
42711
42952
|
let resi = ic.chainsSeq[chainid][i].resi;
|
|
42712
42953
|
let resid = chainid + '_' + resi;
|
|
42713
42954
|
if(!ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid])) { // mising coordinate
|
|
42714
|
-
if(
|
|
42955
|
+
if(ic.chainMissingResidueArray[chainid] === undefined) ic.chainMissingResidueArray[chainid] = [];
|
|
42715
42956
|
let seq = me.utilsCls.residueAbbr2Name(ic.chainsSeq[chainid][i].name);
|
|
42716
42957
|
let resiObj = {'resi': resi, 'seq': seq};
|
|
42717
|
-
|
|
42958
|
+
ic.chainMissingResidueArray[chainid].push(resiObj);
|
|
42718
42959
|
}
|
|
42719
42960
|
}
|
|
42720
42961
|
}
|
|
42721
42962
|
|
|
42722
42963
|
// add missing residues "REMARK 465..."
|
|
42723
|
-
for(let chainid in
|
|
42964
|
+
for(let chainid in ic.chainMissingResidueArray) {
|
|
42724
42965
|
let pos = chainid.indexOf('_');
|
|
42725
42966
|
let chain = chainid.substr(pos + 1, 2);
|
|
42726
42967
|
let stru = chainid.substr(0, pos);
|
|
42727
42968
|
|
|
42728
|
-
for(let i = 0, il =
|
|
42729
|
-
let resi =
|
|
42730
|
-
let seq =
|
|
42969
|
+
for(let i = 0, il = ic.chainMissingResidueArray[chainid].length; i < il; ++i) {
|
|
42970
|
+
let resi = ic.chainMissingResidueArray[chainid][i].resi;
|
|
42971
|
+
let seq = ic.chainMissingResidueArray[chainid][i].seq;
|
|
42731
42972
|
|
|
42732
42973
|
stru2header[stru] += "REMARK 465 " + seq.padStart(3, " ") + chain.padStart(2, " ") + " " + resi.toString().padStart(5, " ") + "\n";
|
|
42733
42974
|
}
|
|
42734
42975
|
}
|
|
42976
|
+
*/
|
|
42977
|
+
|
|
42978
|
+
// add missing residues "REMARK 465..."
|
|
42979
|
+
for(let chainid in ic.chainMissingResidueArray) {
|
|
42980
|
+
let pos = chainid.indexOf('_');
|
|
42981
|
+
let chain = chainid.substr(pos + 1, 2);
|
|
42982
|
+
let stru = chainid.substr(0, pos);
|
|
42983
|
+
|
|
42984
|
+
for(let i = 0, il = ic.chainMissingResidueArray[chainid].length; i < il; ++i) {
|
|
42985
|
+
let resi = ic.chainMissingResidueArray[chainid][i].resi;
|
|
42986
|
+
let resn = me.utilsCls.residueAbbr2Name(ic.chainMissingResidueArray[chainid][i].name);
|
|
42987
|
+
|
|
42988
|
+
stru2header[stru] += "REMARK 465 " + resn.padStart(3, " ") + chain.padStart(2, " ") + " " + resi.toString().padStart(5, " ") + "\n";
|
|
42989
|
+
}
|
|
42990
|
+
}
|
|
42735
42991
|
|
|
42736
42992
|
let connStr = '';
|
|
42737
42993
|
let struArray = Object.keys(ic.structures);
|
|
@@ -43457,6 +43713,21 @@ class ClickMenu {
|
|
|
43457
43713
|
let file_pref =(ic.inputid) ? ic.inputid : "custom";
|
|
43458
43714
|
ic.saveFileCls.saveFile(file_pref + '_selections.txt', 'text', [text]);
|
|
43459
43715
|
});
|
|
43716
|
+
|
|
43717
|
+
me.myEventCls.onIds("#" + me.pre + "mn1_exportSelDetails", "click", function(e) { let ic = me.icn3d;
|
|
43718
|
+
thisClass.setLogCmd("export all selections with details", false);
|
|
43719
|
+
if(ic.bSetChainsAdvancedMenu === undefined || !ic.bSetChainsAdvancedMenu) {
|
|
43720
|
+
let prevHAtoms = me.hashUtilsCls.cloneHash(ic.hAtoms);
|
|
43721
|
+
ic.definedSetsCls.setPredefinedInMenu();
|
|
43722
|
+
ic.bSetChainsAdvancedMenu = true;
|
|
43723
|
+
ic.hAtoms = me.hashUtilsCls.cloneHash(prevHAtoms);
|
|
43724
|
+
}
|
|
43725
|
+
let bDetails = true;
|
|
43726
|
+
let text = ic.saveFileCls.exportCustomAtoms(bDetails);
|
|
43727
|
+
let file_pref =(ic.inputid) ? ic.inputid : "custom";
|
|
43728
|
+
ic.saveFileCls.saveFile(file_pref + '_sel_details.txt', 'text', [text]);
|
|
43729
|
+
});
|
|
43730
|
+
|
|
43460
43731
|
// },
|
|
43461
43732
|
// clkMn1_sharelink: function() {
|
|
43462
43733
|
me.myEventCls.onIds("#" + me.pre + "mn1_sharelink", "click", function(e) { let ic = me.icn3d;
|
|
@@ -45174,15 +45445,15 @@ class SetMenu {
|
|
|
45174
45445
|
let tdStr = '<td valign="top">';
|
|
45175
45446
|
html += tdStr + this.setMenu1() + '</td>';
|
|
45176
45447
|
|
|
45177
|
-
if(!me.cfg.simplemenu) {
|
|
45448
|
+
//if(!me.cfg.simplemenu) {
|
|
45178
45449
|
html += tdStr + this.setMenu2() + '</td>';
|
|
45179
|
-
}
|
|
45450
|
+
//}
|
|
45180
45451
|
|
|
45181
45452
|
html += tdStr + this.setMenu2b() + '</td>';
|
|
45182
45453
|
html += tdStr + this.setMenu3() + '</td>';
|
|
45183
45454
|
html += tdStr + this.setMenu4() + '</td>';
|
|
45184
45455
|
|
|
45185
|
-
if(!me.cfg.simplemenu) {
|
|
45456
|
+
//if(!me.cfg.simplemenu) {
|
|
45186
45457
|
html += tdStr + this.setMenu5() + '</td>';
|
|
45187
45458
|
//html += tdStr + this.setMenu5b() + '</td>';
|
|
45188
45459
|
html += tdStr + this.setMenu6() + '</td>';
|
|
@@ -45193,7 +45464,7 @@ class SetMenu {
|
|
|
45193
45464
|
html += tdStr + '<div class="icn3d-commandTitle" style="white-space:nowrap; margin-top:10px; border-left:solid 1px #888888"><span id="' + me.pre + 'selection_expand" class="icn3d-expand icn3d-link" title="Expand">' + me.htmlCls.space2 + 'Toolbar <span class="ui-icon ui-icon-plus" style="width:15px"></span>' + me.htmlCls.space2 + '</span><span id="' + me.pre + 'selection_shrink" class="icn3d-shrink icn3d-link" style="display:none;" title="Shrink">' + me.htmlCls.space2 + 'Toolbar <span class="ui-icon ui-icon-minus" style="width:15px"></span>' + me.htmlCls.space2 + '</span></div></td>';
|
|
45194
45465
|
|
|
45195
45466
|
html += tdStr + '<div class="icn3d-commandTitle" style="white-space:nowrap; margin-top:8px; border-left:solid 1px #888888">' + me.htmlCls.space2 + '<input type="text" id="' + me.pre + 'search_seq" size="10" placeholder="one-letter seq."> <button style="white-space:nowrap;" id="' + me.pre + 'search_seq_button">Search</button> <a style="text-decoration: none;" href="' + me.htmlCls.baseUrl + 'icn3d/icn3d.html#selectb" target="_blank" title="Specification tips">?</a></div></td>';
|
|
45196
|
-
}
|
|
45467
|
+
//}
|
|
45197
45468
|
|
|
45198
45469
|
html += "</tr>";
|
|
45199
45470
|
html += "</table>";
|
|
@@ -45535,9 +45806,11 @@ class SetMenu {
|
|
|
45535
45806
|
html += me.htmlCls.setHtmlCls.getLink('mn1_mmtfid', 'MMTF ID ' + me.htmlCls.wifiStr);
|
|
45536
45807
|
html += me.htmlCls.setHtmlCls.getLink('mn1_pdbid', 'PDB ID ' + me.htmlCls.wifiStr);
|
|
45537
45808
|
html += me.htmlCls.setHtmlCls.getLink('mn1_afid', 'AlphaFold UniProt ID ' + me.htmlCls.wifiStr);
|
|
45538
|
-
|
|
45539
|
-
|
|
45540
|
-
|
|
45809
|
+
if(!me.cfg.simplemenu) {
|
|
45810
|
+
html += me.htmlCls.setHtmlCls.getLink('mn1_opmid', 'OPM PDB ID ' + me.htmlCls.wifiStr);
|
|
45811
|
+
html += me.htmlCls.setHtmlCls.getLink('mn1_mmcifid', 'mmCIF ID ' + me.htmlCls.wifiStr);
|
|
45812
|
+
html += me.htmlCls.setHtmlCls.getLink('mn1_gi', 'NCBI gi ' + me.htmlCls.wifiStr);
|
|
45813
|
+
}
|
|
45541
45814
|
html += me.htmlCls.setHtmlCls.getLink('mn1_uniprotid', 'UniProt ID ' + me.htmlCls.wifiStr);
|
|
45542
45815
|
html += me.htmlCls.setHtmlCls.getLink('mn1_cid', 'PubChem CID ' + me.htmlCls.wifiStr);
|
|
45543
45816
|
html += "</ul>";
|
|
@@ -45547,29 +45820,32 @@ class SetMenu {
|
|
|
45547
45820
|
// html += me.htmlCls.setHtmlCls.getLink('mn1_pdbfile', 'PDB File');
|
|
45548
45821
|
// html += me.htmlCls.setHtmlCls.getLink('mn1_pdbfile_app', 'PDB File (append)');
|
|
45549
45822
|
html += me.htmlCls.setHtmlCls.getLink('mn1_pdbfile_app', 'PDB File (appendable)');
|
|
45550
|
-
html += me.htmlCls.setHtmlCls.getLink('mn1_mmciffile', 'mmCIF File');
|
|
45823
|
+
if(!me.cfg.simplemenu) html += me.htmlCls.setHtmlCls.getLink('mn1_mmciffile', 'mmCIF File');
|
|
45551
45824
|
html += me.htmlCls.setHtmlCls.getLink('mn1_mol2file', 'Mol2 File');
|
|
45552
45825
|
html += me.htmlCls.setHtmlCls.getLink('mn1_sdffile', 'SDF File');
|
|
45553
45826
|
html += me.htmlCls.setHtmlCls.getLink('mn1_xyzfile', 'XYZ File');
|
|
45554
|
-
html += me.htmlCls.setHtmlCls.getLink('mn1_urlfile', 'URL(Same Host) ' + me.htmlCls.wifiStr);
|
|
45827
|
+
if(!me.cfg.simplemenu) html += me.htmlCls.setHtmlCls.getLink('mn1_urlfile', 'URL(Same Host) ' + me.htmlCls.wifiStr);
|
|
45555
45828
|
html += "<li>-</li>";
|
|
45556
45829
|
html += me.htmlCls.setHtmlCls.getLink('mn1_pngimage', 'iCn3D PNG Image');
|
|
45557
45830
|
html += me.htmlCls.setHtmlCls.getLink('mn1_state', 'State/Script File');
|
|
45558
|
-
html += me.htmlCls.setHtmlCls.getLink('mn1_fixedversion', 'Share Link in Archived Ver. ' + me.htmlCls.wifiStr);
|
|
45831
|
+
if(!me.cfg.simplemenu) html += me.htmlCls.setHtmlCls.getLink('mn1_fixedversion', 'Share Link in Archived Ver. ' + me.htmlCls.wifiStr);
|
|
45559
45832
|
html += me.htmlCls.setHtmlCls.getLink('mn1_selection', 'Selection File');
|
|
45560
|
-
|
|
45833
|
+
|
|
45834
|
+
if(!me.cfg.simplemenu) {
|
|
45835
|
+
html += "<li>-</li>";
|
|
45561
45836
|
|
|
45562
|
-
|
|
45563
|
-
|
|
45564
|
-
|
|
45565
|
-
|
|
45566
|
-
|
|
45837
|
+
html += "<li><span>Electron Density(DSN6)</span>";
|
|
45838
|
+
html += "<ul>";
|
|
45839
|
+
html += me.htmlCls.setHtmlCls.getLink('mn1_dsn6', 'Local File');
|
|
45840
|
+
html += me.htmlCls.setHtmlCls.getLink('mn1_dsn6url', 'URL(Same Host) ' + me.htmlCls.wifiStr);
|
|
45841
|
+
html += "</ul>";
|
|
45842
|
+
}
|
|
45567
45843
|
|
|
45568
45844
|
html += "</ul>";
|
|
45569
45845
|
html += "</li>";
|
|
45570
45846
|
html += "<li><span>Align</span>";
|
|
45571
45847
|
html += "<ul>";
|
|
45572
|
-
html += me.htmlCls.setHtmlCls.getLink('mn1_blast_rep_id', 'Sequence to Structure
|
|
45848
|
+
html += me.htmlCls.setHtmlCls.getLink('mn1_blast_rep_id', 'Sequence to Structure');
|
|
45573
45849
|
html += me.htmlCls.setHtmlCls.getLink('mn1_align', 'Structure to Structure ' + me.htmlCls.wifiStr);
|
|
45574
45850
|
//html += me.htmlCls.setHtmlCls.getLink('mn1_chainalign', 'Chain to Chain');
|
|
45575
45851
|
html += me.htmlCls.setHtmlCls.getLink('mn1_chainalign', 'Multiple Chains ' + me.htmlCls.wifiStr);
|
|
@@ -45594,15 +45870,18 @@ class SetMenu {
|
|
|
45594
45870
|
html += "<li>-</li>";
|
|
45595
45871
|
html += me.htmlCls.setHtmlCls.getLink('mn1_exportVrml', 'WRL/VRML(Color)');
|
|
45596
45872
|
html += me.htmlCls.setHtmlCls.getLink('mn1_exportStl', 'STL');
|
|
45597
|
-
|
|
45598
|
-
|
|
45599
|
-
|
|
45600
|
-
|
|
45601
|
-
|
|
45602
|
-
|
|
45603
|
-
|
|
45604
|
-
|
|
45605
|
-
|
|
45873
|
+
|
|
45874
|
+
if(!me.cfg.simplemenu) {
|
|
45875
|
+
html += "<li>-</li>";
|
|
45876
|
+
html += me.htmlCls.setHtmlCls.getLink('mn1_stabilizerYes', 'Add All Stabilizers');
|
|
45877
|
+
html += me.htmlCls.setHtmlCls.getLink('mn1_stabilizerNo', 'Remove All Stabilizers');
|
|
45878
|
+
html += "<li>-</li>";
|
|
45879
|
+
html += me.htmlCls.setHtmlCls.getLink('mn1_stabilizerOne', 'Add One Stabilizer');
|
|
45880
|
+
html += me.htmlCls.setHtmlCls.getLink('mn1_stabilizerRmOne', 'Remove One Stabilizer');
|
|
45881
|
+
html += "<li>-</li>";
|
|
45882
|
+
html += me.htmlCls.setHtmlCls.getLink('mn1_thicknessSet', 'Set Thickness');
|
|
45883
|
+
//html += me.htmlCls.setHtmlCls.getLink('mn1_thicknessReset', 'Reset Thickness');
|
|
45884
|
+
}
|
|
45606
45885
|
}
|
|
45607
45886
|
else {
|
|
45608
45887
|
html += me.htmlCls.setHtmlCls.getLink('mn1_exportVrml', 'VRML(Color)');
|
|
@@ -45620,14 +45899,17 @@ class SetMenu {
|
|
|
45620
45899
|
html += "<ul>";
|
|
45621
45900
|
html += me.htmlCls.setHtmlCls.getLink('mn1_exportCanvas', 'Original Size & HTML');
|
|
45622
45901
|
html += me.htmlCls.setHtmlCls.getLink('mn1_exportCanvas1', 'Original Size');
|
|
45623
|
-
|
|
45624
|
-
|
|
45625
|
-
|
|
45902
|
+
if(!me.cfg.simplemenu) {
|
|
45903
|
+
html += me.htmlCls.setHtmlCls.getLink('mn1_exportCanvas2', '2X Large');
|
|
45904
|
+
html += me.htmlCls.setHtmlCls.getLink('mn1_exportCanvas4', '4X Large');
|
|
45905
|
+
html += me.htmlCls.setHtmlCls.getLink('mn1_exportCanvas8', '8X Large');
|
|
45906
|
+
}
|
|
45626
45907
|
html += "</ul>";
|
|
45627
45908
|
html += "</li>";
|
|
45628
45909
|
|
|
45629
45910
|
html += me.htmlCls.setHtmlCls.getLink('mn1_exportState', 'State File');
|
|
45630
45911
|
html += me.htmlCls.setHtmlCls.getLink('mn1_exportSelections', 'Selection File');
|
|
45912
|
+
html += me.htmlCls.setHtmlCls.getLink('mn1_exportSelDetails', 'Selection Details');
|
|
45631
45913
|
html += me.htmlCls.setHtmlCls.getLink('mn1_exportCounts', 'Residue Counts');
|
|
45632
45914
|
|
|
45633
45915
|
/*
|
|
@@ -45689,9 +45971,9 @@ class SetMenu {
|
|
|
45689
45971
|
|
|
45690
45972
|
html += "<ul class='icn3d-mn-item'>";
|
|
45691
45973
|
|
|
45692
|
-
html += me.htmlCls.setHtmlCls.getLink('mn2_definedsets', 'Defined Sets');
|
|
45974
|
+
if(!me.cfg.simplemenu) html += me.htmlCls.setHtmlCls.getLink('mn2_definedsets', 'Defined Sets');
|
|
45693
45975
|
html += me.htmlCls.setHtmlCls.getLink('mn2_selectall', 'All');
|
|
45694
|
-
html += me.htmlCls.setHtmlCls.getLink('mn2_selectdisplayed', 'Displayed Set');
|
|
45976
|
+
if(!me.cfg.simplemenu) html += me.htmlCls.setHtmlCls.getLink('mn2_selectdisplayed', 'Displayed Set');
|
|
45695
45977
|
html += me.htmlCls.setHtmlCls.getLink('mn2_aroundsphere', 'by Distance');
|
|
45696
45978
|
|
|
45697
45979
|
html += "<li><span>by Property</span>";
|
|
@@ -45705,11 +45987,13 @@ class SetMenu {
|
|
|
45705
45987
|
html += "</ul>";
|
|
45706
45988
|
html += "</li>";
|
|
45707
45989
|
|
|
45708
|
-
|
|
45709
|
-
|
|
45710
|
-
|
|
45711
|
-
|
|
45712
|
-
|
|
45990
|
+
if(!me.cfg.simplemenu) {
|
|
45991
|
+
html += me.htmlCls.setHtmlCls.getLink('mn2_selectcomplement', 'Inverse');
|
|
45992
|
+
html += me.htmlCls.setHtmlCls.getLink('mn2_selectmainchains', 'Main Chains');
|
|
45993
|
+
html += me.htmlCls.setHtmlCls.getLink('mn2_selectsidechains', 'Side Chains');
|
|
45994
|
+
html += me.htmlCls.setHtmlCls.getLink('mn2_selectmainsidechains', 'Main & Side Chains');
|
|
45995
|
+
html += me.htmlCls.setHtmlCls.getLink('mn2_command', 'Advanced');
|
|
45996
|
+
}
|
|
45713
45997
|
|
|
45714
45998
|
if(me.cfg.cid === undefined) {
|
|
45715
45999
|
html += "<li><span>Select on 3D</span>";
|
|
@@ -45746,22 +46030,24 @@ class SetMenu {
|
|
|
45746
46030
|
|
|
45747
46031
|
html += "<li>-</li>";
|
|
45748
46032
|
|
|
45749
|
-
|
|
45750
|
-
|
|
45751
|
-
|
|
45752
|
-
|
|
45753
|
-
|
|
45754
|
-
|
|
45755
|
-
|
|
45756
|
-
|
|
45757
|
-
|
|
46033
|
+
if(!me.cfg.simplemenu) {
|
|
46034
|
+
html += "<li><span>Highlight Color</span>";
|
|
46035
|
+
html += "<ul>";
|
|
46036
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn2_hl_clr', 'mn2_hl_clrYellow', 'Yellow', true);
|
|
46037
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn2_hl_clr', 'mn2_hl_clrGreen', 'Green');
|
|
46038
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn2_hl_clr', 'mn2_hl_clrRed', 'Red');
|
|
46039
|
+
html += "</ul>";
|
|
46040
|
+
html += "</li>";
|
|
46041
|
+
html += "<li><span>Highlight Style</span>";
|
|
46042
|
+
html += "<ul>";
|
|
45758
46043
|
|
|
45759
|
-
|
|
45760
|
-
|
|
45761
|
-
|
|
46044
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn2_hl_style', 'mn2_hl_styleOutline', 'Outline', true);
|
|
46045
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn2_hl_style', 'mn2_hl_styleObject', '3D Objects');
|
|
46046
|
+
//html += me.htmlCls.setHtmlCls.getRadio('mn2_hl_style', 'mn2_hl_styleNone', 'No Highlight');
|
|
45762
46047
|
|
|
45763
|
-
|
|
45764
|
-
|
|
46048
|
+
html += "</ul>";
|
|
46049
|
+
html += "</li>";
|
|
46050
|
+
}
|
|
45765
46051
|
|
|
45766
46052
|
//html += me.htmlCls.setHtmlCls.getLink('mn2_hl_styleNone', 'Clear Highlight');
|
|
45767
46053
|
|
|
@@ -45800,7 +46086,7 @@ class SetMenu {
|
|
|
45800
46086
|
html += "<ul class='icn3d-mn-item'>";
|
|
45801
46087
|
|
|
45802
46088
|
html += me.htmlCls.setHtmlCls.getLink('mn2_show_selected', 'View Selection');
|
|
45803
|
-
html += me.htmlCls.setHtmlCls.getLink('mn2_hide_selected', 'Hide Selection');
|
|
46089
|
+
if(!me.cfg.simplemenu) html += me.htmlCls.setHtmlCls.getLink('mn2_hide_selected', 'Hide Selection');
|
|
45804
46090
|
html += me.htmlCls.setHtmlCls.getLink('mn2_selectedcenter', 'Zoom in Selection');
|
|
45805
46091
|
html += me.htmlCls.setHtmlCls.getLink('mn6_center', 'Center Selection');
|
|
45806
46092
|
html += me.htmlCls.setHtmlCls.getLink('mn2_fullstru', 'View Full Structure');
|
|
@@ -45878,8 +46164,10 @@ class SetMenu {
|
|
|
45878
46164
|
html += "</ul>";
|
|
45879
46165
|
html += "</li>";
|
|
45880
46166
|
|
|
45881
|
-
|
|
45882
|
-
|
|
46167
|
+
if(!me.cfg.simplemenu) {
|
|
46168
|
+
html += me.htmlCls.setHtmlCls.getLink('mn6_back', 'Undo');
|
|
46169
|
+
html += me.htmlCls.setHtmlCls.getLink('mn6_forward', 'Redo');
|
|
46170
|
+
}
|
|
45883
46171
|
|
|
45884
46172
|
html += me.htmlCls.setHtmlCls.getLink('mn6_fullscreen', 'Full Screen');
|
|
45885
46173
|
// html += me.htmlCls.setHtmlCls.getLink('mn6_exitfullscreen', 'Exit Full Screen');
|
|
@@ -46027,21 +46315,22 @@ class SetMenu {
|
|
|
46027
46315
|
|
|
46028
46316
|
html += me.htmlCls.setHtmlCls.getLink('mn3_setThickness', 'Preferences');
|
|
46029
46317
|
|
|
46030
|
-
|
|
46031
|
-
|
|
46032
|
-
|
|
46033
|
-
|
|
46318
|
+
if(!me.cfg.simplemenu) {
|
|
46319
|
+
html += "<li>-</li>";
|
|
46320
|
+
html += me.htmlCls.setHtmlCls.getLink('mn3_styleSave', 'Save Style');
|
|
46321
|
+
html += me.htmlCls.setHtmlCls.getLink('mn3_styleApplySave', 'Apply Saved Style');
|
|
46322
|
+
}
|
|
46034
46323
|
|
|
46035
46324
|
html += "<li>-</li>";
|
|
46036
46325
|
|
|
46037
46326
|
html += "<li><span>Surface Type</span>";
|
|
46038
46327
|
html += "<ul>";
|
|
46039
46328
|
html += me.htmlCls.setHtmlCls.getRadio('mn5_surface', 'mn5_surfaceVDW', 'Van der Waals');
|
|
46040
|
-
html += me.htmlCls.setHtmlCls.getRadio('mn5_surface', 'mn5_surfaceVDWContext', 'VDW with Context');
|
|
46329
|
+
if(!me.cfg.simplemenu) html += me.htmlCls.setHtmlCls.getRadio('mn5_surface', 'mn5_surfaceVDWContext', 'VDW with Context');
|
|
46041
46330
|
html += me.htmlCls.setHtmlCls.getRadio('mn5_surface', 'mn5_surfaceMolecular', 'Molecular Surface');
|
|
46042
|
-
html += me.htmlCls.setHtmlCls.getRadio('mn5_surface', 'mn5_surfaceMolecularContext', 'MS with Context');
|
|
46331
|
+
if(!me.cfg.simplemenu) html += me.htmlCls.setHtmlCls.getRadio('mn5_surface', 'mn5_surfaceMolecularContext', 'MS with Context');
|
|
46043
46332
|
html += me.htmlCls.setHtmlCls.getRadio('mn5_surface', 'mn5_surfaceSAS', 'Solvent Accessible');
|
|
46044
|
-
html += me.htmlCls.setHtmlCls.getRadio('mn5_surface', 'mn5_surfaceSASContext', 'SA with Context');
|
|
46333
|
+
if(!me.cfg.simplemenu) html += me.htmlCls.setHtmlCls.getRadio('mn5_surface', 'mn5_surfaceSASContext', 'SA with Context');
|
|
46045
46334
|
html += "</ul>";
|
|
46046
46335
|
html += "</li>";
|
|
46047
46336
|
|
|
@@ -46064,36 +46353,38 @@ class SetMenu {
|
|
|
46064
46353
|
html += "</li>";
|
|
46065
46354
|
|
|
46066
46355
|
if(me.cfg.cid === undefined && me.cfg.align === undefined && me.cfg.chainalign === undefined) {
|
|
46067
|
-
|
|
46356
|
+
if(!me.cfg.simplemenu) {
|
|
46357
|
+
html += "<li>-</li>";
|
|
46068
46358
|
|
|
46069
|
-
|
|
46070
|
-
|
|
46071
|
-
|
|
46072
|
-
|
|
46073
|
-
|
|
46074
|
-
|
|
46075
|
-
|
|
46076
|
-
html += me.htmlCls.setHtmlCls.getLinkWrapper('mn5_elecmapNo', 'Remove Map', 'mapWrapper2');
|
|
46077
|
-
|
|
46078
|
-
html += "<li id='" + me.pre + "mapWrapper3'><span>Map Wireframe</span>";
|
|
46079
|
-
html += "<ul>";
|
|
46080
|
-
html += me.htmlCls.setHtmlCls.getRadio('mn5_mapwireframe', 'mn5_mapwireframeYes', 'Yes', true);
|
|
46081
|
-
html += me.htmlCls.setHtmlCls.getRadio('mn5_mapwireframe', 'mn5_mapwireframeNo', 'No');
|
|
46082
|
-
html += "</ul>";
|
|
46083
|
-
html += "</li>";
|
|
46084
|
-
|
|
46085
|
-
if(me.cfg.mmtfid === undefined) {
|
|
46086
|
-
//html += "<li>-</li>";
|
|
46359
|
+
html += "<li id='" + me.pre + "mapWrapper1'><span>Electron Density</span>";
|
|
46360
|
+
html += "<ul>";
|
|
46361
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn5_elecmap', 'mn5_elecmap2fofc', '2Fo-Fc Map');
|
|
46362
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn5_elecmap', 'mn5_elecmapfofc', 'Fo-Fc Map');
|
|
46363
|
+
html += "</ul>";
|
|
46364
|
+
html += "</li>";
|
|
46087
46365
|
|
|
46088
|
-
html += me.htmlCls.setHtmlCls.getLinkWrapper('
|
|
46089
|
-
html += me.htmlCls.setHtmlCls.getLinkWrapper('mn5_emmapNo', 'Remove EM Map', 'emmapWrapper2');
|
|
46366
|
+
html += me.htmlCls.setHtmlCls.getLinkWrapper('mn5_elecmapNo', 'Remove Map', 'mapWrapper2');
|
|
46090
46367
|
|
|
46091
|
-
html += "<li id='" + me.pre + "
|
|
46368
|
+
html += "<li id='" + me.pre + "mapWrapper3'><span>Map Wireframe</span>";
|
|
46092
46369
|
html += "<ul>";
|
|
46093
|
-
html += me.htmlCls.setHtmlCls.getRadio('
|
|
46094
|
-
html += me.htmlCls.setHtmlCls.getRadio('
|
|
46370
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn5_mapwireframe', 'mn5_mapwireframeYes', 'Yes', true);
|
|
46371
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn5_mapwireframe', 'mn5_mapwireframeNo', 'No');
|
|
46095
46372
|
html += "</ul>";
|
|
46096
46373
|
html += "</li>";
|
|
46374
|
+
|
|
46375
|
+
if(me.cfg.mmtfid === undefined) {
|
|
46376
|
+
//html += "<li>-</li>";
|
|
46377
|
+
|
|
46378
|
+
html += me.htmlCls.setHtmlCls.getLinkWrapper('mn5_emmap', 'EM Density Map', 'emmapWrapper1');
|
|
46379
|
+
html += me.htmlCls.setHtmlCls.getLinkWrapper('mn5_emmapNo', 'Remove EM Map', 'emmapWrapper2');
|
|
46380
|
+
|
|
46381
|
+
html += "<li id='" + me.pre + "emmapWrapper3'><span>EM Map Wireframe</span>";
|
|
46382
|
+
html += "<ul>";
|
|
46383
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn5_emmapwireframe', 'mn5_emmapwireframeYes', 'Yes', true);
|
|
46384
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn5_emmapwireframe', 'mn5_emmapwireframeNo', 'No');
|
|
46385
|
+
html += "</ul>";
|
|
46386
|
+
html += "</li>";
|
|
46387
|
+
}
|
|
46097
46388
|
}
|
|
46098
46389
|
}
|
|
46099
46390
|
|
|
@@ -46108,13 +46399,15 @@ class SetMenu {
|
|
|
46108
46399
|
html += "</ul>";
|
|
46109
46400
|
html += "</li>";
|
|
46110
46401
|
|
|
46111
|
-
|
|
46112
|
-
|
|
46113
|
-
|
|
46114
|
-
|
|
46115
|
-
|
|
46116
|
-
|
|
46117
|
-
|
|
46402
|
+
if(!me.cfg.simplemenu) {
|
|
46403
|
+
html += "<li><span>Dialog Color</span>";
|
|
46404
|
+
html += "<ul>";
|
|
46405
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn6_theme', 'mn6_themeBlue', 'Blue', true);
|
|
46406
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn6_theme', 'mn6_themeOrange', 'Orange');
|
|
46407
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn6_theme', 'mn6_themeBlack', 'Black');
|
|
46408
|
+
html += "</ul>";
|
|
46409
|
+
html += "</li>";
|
|
46410
|
+
}
|
|
46118
46411
|
|
|
46119
46412
|
// html += "<li><span>Two-color Helix</span>";
|
|
46120
46413
|
// html += "<ul>";
|
|
@@ -46358,8 +46651,10 @@ class SetMenu {
|
|
|
46358
46651
|
|
|
46359
46652
|
html += "</ul>";
|
|
46360
46653
|
|
|
46361
|
-
|
|
46362
|
-
|
|
46654
|
+
if(!me.cfg.simplemenu) {
|
|
46655
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrCustom', 'Color Picker');
|
|
46656
|
+
html += "<li>-</li>";
|
|
46657
|
+
}
|
|
46363
46658
|
|
|
46364
46659
|
if(me.cfg.cid === undefined) {
|
|
46365
46660
|
//html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrRainbow', 'Rainbow (R-V)');
|
|
@@ -46369,12 +46664,14 @@ class SetMenu {
|
|
|
46369
46664
|
html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrRainbowChain', 'for Chains');
|
|
46370
46665
|
html += "</ul>";
|
|
46371
46666
|
|
|
46372
|
-
|
|
46373
|
-
|
|
46374
|
-
|
|
46375
|
-
|
|
46376
|
-
|
|
46377
|
-
|
|
46667
|
+
if(!me.cfg.simplemenu) {
|
|
46668
|
+
//html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrSpectrum', 'Spectrum (V-R)');
|
|
46669
|
+
html += "<li><span style='padding-left:1.5em;'>Spectrum (V-R)</span>";
|
|
46670
|
+
html += "<ul>";
|
|
46671
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrSpectrum', 'for Selection');
|
|
46672
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrSpectrumChain', 'for Chains');
|
|
46673
|
+
html += "</ul>";
|
|
46674
|
+
}
|
|
46378
46675
|
|
|
46379
46676
|
html += "<li><span style='padding-left:1.5em;'>Secondary</span>";
|
|
46380
46677
|
html += "<ul>";
|
|
@@ -46403,7 +46700,7 @@ class SetMenu {
|
|
|
46403
46700
|
html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrBfactorNorm', 'Percentile');
|
|
46404
46701
|
html += "</ul>";
|
|
46405
46702
|
|
|
46406
|
-
html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrArea', 'Solvent<br><span style="padding-left:1.5em;">Accessibility</span>');
|
|
46703
|
+
if(!me.cfg.simplemenu) html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrArea', 'Solvent<br><span style="padding-left:1.5em;">Accessibility</span>');
|
|
46407
46704
|
|
|
46408
46705
|
if(me.cfg.align !== undefined || me.cfg.chainalign !== undefined || me.cfg.blast_rep_id !== undefined) {
|
|
46409
46706
|
html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrChain', 'Chain');
|
|
@@ -46417,10 +46714,12 @@ class SetMenu {
|
|
|
46417
46714
|
}
|
|
46418
46715
|
|
|
46419
46716
|
if(me.cfg.cid === undefined) {
|
|
46420
|
-
|
|
46421
|
-
|
|
46422
|
-
|
|
46423
|
-
|
|
46717
|
+
if(!me.cfg.simplemenu) {
|
|
46718
|
+
html += "<li><span style='padding-left:1.5em;'>Defined Sets</span>";
|
|
46719
|
+
html += "<ul>";
|
|
46720
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrsets', 'Rainbow for Selected Sets<br>in "Analysis > Defined Sets"');
|
|
46721
|
+
html += "</ul>";
|
|
46722
|
+
}
|
|
46424
46723
|
}
|
|
46425
46724
|
|
|
46426
46725
|
//html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrResidue', 'Residue');
|
|
@@ -46443,17 +46742,21 @@ class SetMenu {
|
|
|
46443
46742
|
}
|
|
46444
46743
|
|
|
46445
46744
|
//if(me.cfg.afid) html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrConfidence', 'AF Confidence');
|
|
46446
|
-
if(!me.cfg.mmtfid && !me.cfg.pdbid && !me.cfg.opmid && !me.cfg.mmdbid && !me.cfg.gi && !me.cfg.uniprotid && !me.cfg.blast_rep_id && !me.cfg.cid && !me.cfg.mmcifid && !me.cfg.align && !me.cfg.chainalign)
|
|
46745
|
+
if(!me.cfg.mmtfid && !me.cfg.pdbid && !me.cfg.opmid && !me.cfg.mmdbid && !me.cfg.gi && !me.cfg.uniprotid && !me.cfg.blast_rep_id && !me.cfg.cid && !me.cfg.mmcifid && !me.cfg.align && !me.cfg.chainalign) {
|
|
46746
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrConfidence', 'AlphaFold<br><span style="padding-left:1.5em;">Confidence</span>');
|
|
46747
|
+
}
|
|
46447
46748
|
}
|
|
46448
46749
|
else {
|
|
46449
46750
|
//if(!me.cfg.hidelicense) html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn1_delphi2', 'DelPhi<br><span style="padding-left:1.5em;">Potential ' + me.htmlCls.licenseStr + '</span>');
|
|
46450
46751
|
html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrAtom', 'Atom', true);
|
|
46451
46752
|
}
|
|
46452
46753
|
|
|
46453
|
-
|
|
46754
|
+
if(!me.cfg.simplemenu) {
|
|
46755
|
+
html += "<li>-</li>";
|
|
46454
46756
|
|
|
46455
|
-
|
|
46456
|
-
|
|
46757
|
+
html += me.htmlCls.setHtmlCls.getLink('mn4_clrSave', 'Save Color');
|
|
46758
|
+
html += me.htmlCls.setHtmlCls.getLink('mn4_clrApplySave', 'Apply Saved Color');
|
|
46759
|
+
}
|
|
46457
46760
|
|
|
46458
46761
|
html += "<li><br/></li>";
|
|
46459
46762
|
html += "</ul>";
|
|
@@ -46514,8 +46817,8 @@ class SetMenu {
|
|
|
46514
46817
|
html += me.htmlCls.setHtmlCls.getLink('mn6_hbondsYes', 'Interactions');
|
|
46515
46818
|
//html += me.htmlCls.setHtmlCls.getLink('mn6_hbondsNo', 'Remove H-Bonds <br>& Interactions');
|
|
46516
46819
|
|
|
46517
|
-
html += me.htmlCls.setHtmlCls.getLink('mn6_contactmap', 'Contact Map');
|
|
46518
|
-
|
|
46820
|
+
if(!me.cfg.simplemenu) html += me.htmlCls.setHtmlCls.getLink('mn6_contactmap', 'Contact Map');
|
|
46821
|
+
/*
|
|
46519
46822
|
html += "<li><span>Bring to Front</span>";
|
|
46520
46823
|
html += "<ul>";
|
|
46521
46824
|
html += me.htmlCls.setHtmlCls.getLink('mn1_window_table', 'Interaction Table');
|
|
@@ -46524,22 +46827,26 @@ class SetMenu {
|
|
|
46524
46827
|
html += me.htmlCls.setHtmlCls.getLink('mn1_window_graph', '2D Graph(Force-Directed)');
|
|
46525
46828
|
html += "</ul>";
|
|
46526
46829
|
html += "</li>";
|
|
46830
|
+
*/
|
|
46527
46831
|
|
|
46528
46832
|
if(!me.cfg.notebook) {
|
|
46529
46833
|
html += me.htmlCls.setHtmlCls.getLink('mn1_mutation', 'Mutation ' + me.htmlCls.wifiStr);
|
|
46530
46834
|
}
|
|
46531
46835
|
|
|
46532
|
-
html += "<li>-</li>";
|
|
46836
|
+
if(!me.cfg.simplemenu) html += "<li>-</li>";
|
|
46533
46837
|
}
|
|
46534
46838
|
|
|
46535
46839
|
if(!me.cfg.notebook && !me.cfg.hidelicense) {
|
|
46536
46840
|
html += me.htmlCls.setHtmlCls.getLink('mn1_delphi', 'DelPhi Potential ' + me.htmlCls.licenseStr);
|
|
46537
|
-
|
|
46538
|
-
|
|
46539
|
-
|
|
46540
|
-
|
|
46541
|
-
|
|
46542
|
-
|
|
46841
|
+
|
|
46842
|
+
if(!me.cfg.simplemenu) {
|
|
46843
|
+
html += "<li><span>Load PQR/Phi</span>";
|
|
46844
|
+
html += "<ul>";
|
|
46845
|
+
html += me.htmlCls.setHtmlCls.getLink('mn1_phi', 'Local PQR/Phi/Cube File');
|
|
46846
|
+
html += me.htmlCls.setHtmlCls.getLink('mn1_phiurl', 'URL PQR/Phi/Cube File');
|
|
46847
|
+
html += "</ul>";
|
|
46848
|
+
html += me.htmlCls.setHtmlCls.getLink('delphipqr', 'Download PQR');
|
|
46849
|
+
}
|
|
46543
46850
|
|
|
46544
46851
|
html += "<li>-</li>";
|
|
46545
46852
|
}
|
|
@@ -46594,12 +46901,14 @@ class SetMenu {
|
|
|
46594
46901
|
html += "<li>-</li>";
|
|
46595
46902
|
|
|
46596
46903
|
if(me.cfg.cid === undefined) {
|
|
46597
|
-
|
|
46598
|
-
|
|
46599
|
-
|
|
46600
|
-
|
|
46601
|
-
|
|
46602
|
-
|
|
46904
|
+
if(!me.cfg.simplemenu) {
|
|
46905
|
+
html += "<li><span>Chem. Binding</span>";
|
|
46906
|
+
html += "<ul>";
|
|
46907
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn6_chemicalbinding', 'mn6_chemicalbindingshow', 'Show');
|
|
46908
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn6_chemicalbinding', 'mn6_chemicalbindinghide', 'Hide', true);
|
|
46909
|
+
html += "</ul>";
|
|
46910
|
+
html += "</li>";
|
|
46911
|
+
}
|
|
46603
46912
|
|
|
46604
46913
|
html += "<li><span>Disulfide Bonds</span>";
|
|
46605
46914
|
html += "<ul>";
|
|
@@ -46609,13 +46918,15 @@ class SetMenu {
|
|
|
46609
46918
|
html += "</ul>";
|
|
46610
46919
|
html += "</li>";
|
|
46611
46920
|
|
|
46612
|
-
|
|
46613
|
-
|
|
46614
|
-
|
|
46615
|
-
|
|
46616
|
-
|
|
46617
|
-
|
|
46618
|
-
|
|
46921
|
+
if(!me.cfg.simplemenu) {
|
|
46922
|
+
html += "<li><span>Cross-Linkages</span>";
|
|
46923
|
+
html += "<ul>";
|
|
46924
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn6_clbonds', 'mn6_clbondsYes', 'Show', true);
|
|
46925
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn6_clbonds', 'mn6_clbondsExport', 'Export Pairs');
|
|
46926
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn6_clbonds', 'mn6_clbondsNo', 'Hide');
|
|
46927
|
+
html += "</ul>";
|
|
46928
|
+
html += "</li>";
|
|
46929
|
+
}
|
|
46619
46930
|
|
|
46620
46931
|
let bOnePdb = me.cfg.mmtfid !== undefined || me.cfg.pdbid !== undefined || me.cfg.opmid !== undefined || me.cfg.mmcifid !== undefined || me.cfg.mmdbid !== undefined || me.cfg.gi !== undefined || me.cfg.blast_rep_id !== undefined;
|
|
46621
46932
|
if(bOnePdb) {
|
|
@@ -46633,16 +46944,18 @@ class SetMenu {
|
|
|
46633
46944
|
html += "<li><span>Symmetry</span>";
|
|
46634
46945
|
html += "<ul>";
|
|
46635
46946
|
if(bOnePdb) html += me.htmlCls.setHtmlCls.getLink('mn6_symmetry', 'from PDB(precalculated) ' + me.htmlCls.wifiStr);
|
|
46636
|
-
|
|
46637
|
-
|
|
46638
|
-
|
|
46947
|
+
if(!me.cfg.simplemenu) {
|
|
46948
|
+
html += me.htmlCls.setHtmlCls.getLink('mn6_symd', 'from SymD(Dynamic) ' + me.htmlCls.wifiStr);
|
|
46949
|
+
html += me.htmlCls.setHtmlCls.getLink('mn6_clear_sym', 'Clear SymD Symmetry');
|
|
46950
|
+
html += me.htmlCls.setHtmlCls.getLink('mn6_axes_only', 'Show Axes Only');
|
|
46951
|
+
}
|
|
46639
46952
|
html += "</ul>";
|
|
46640
46953
|
html += "</li>";
|
|
46641
46954
|
|
|
46642
46955
|
html += "<li>-</li>";
|
|
46643
46956
|
}
|
|
46644
46957
|
|
|
46645
|
-
html += me.htmlCls.setHtmlCls.getLink('mn6_yournote', 'Window Title');
|
|
46958
|
+
if(!me.cfg.simplemenu) html += me.htmlCls.setHtmlCls.getLink('mn6_yournote', 'Window Title');
|
|
46646
46959
|
|
|
46647
46960
|
if(me.cfg.cid !== undefined) {
|
|
46648
46961
|
html += "<li><span>Links</span>";
|
|
@@ -46726,16 +47039,18 @@ class SetMenu {
|
|
|
46726
47039
|
html += "</ul>";
|
|
46727
47040
|
html += "</li>";
|
|
46728
47041
|
|
|
46729
|
-
|
|
46730
|
-
|
|
46731
|
-
|
|
46732
|
-
|
|
46733
|
-
|
|
46734
|
-
|
|
46735
|
-
|
|
46736
|
-
|
|
46737
|
-
|
|
46738
|
-
|
|
47042
|
+
if(!me.cfg.simplemenu) {
|
|
47043
|
+
html += "<li><span>Develop</span>";
|
|
47044
|
+
html += "<ul>";
|
|
47045
|
+
html += liStr + me.htmlCls.baseUrl + "icn3d/icn3d.html#HowToUse' target='_blank'>How to Embed</a></li>";
|
|
47046
|
+
html += liStr + me.htmlCls.baseUrl + "icn3d/icn3d.html#datastructure' target='_blank'>Data Structure</a></li>";
|
|
47047
|
+
html += liStr + me.htmlCls.baseUrl + "icn3d/icn3d.html#classstructure' target='_blank'>Class Structure</a></li>";
|
|
47048
|
+
html += liStr + me.htmlCls.baseUrl + "icn3d/icn3d.html#addclass' target='_blank'>Add New Classes</a></li>";
|
|
47049
|
+
html += liStr + me.htmlCls.baseUrl + "icn3d/icn3d.html#modifyfunction' target='_blank'>Modify Functions</a></li>";
|
|
47050
|
+
html += liStr + me.htmlCls.baseUrl + "icn3d/icn3d.html#restfulapi' target='_blank'>RESTful APIs</a></li>";
|
|
47051
|
+
html += "</ul>";
|
|
47052
|
+
html += "</li>";
|
|
47053
|
+
}
|
|
46739
47054
|
|
|
46740
47055
|
html += liStr + me.htmlCls.baseUrl + "icn3d/docs/icn3d_help.html' target='_blank'>Help Doc " + me.htmlCls.wifiStr + "</a></li>";
|
|
46741
47056
|
|
|
@@ -46745,7 +47060,7 @@ class SetMenu {
|
|
|
46745
47060
|
html += "<ul>";
|
|
46746
47061
|
html += "<li><span>Rotate</span>";
|
|
46747
47062
|
html += "<ul>";
|
|
46748
|
-
html += "<li>Left Mouse</li>";
|
|
47063
|
+
html += "<li>Left Mouse (Click & Drag)</li>";
|
|
46749
47064
|
html += "<li>Key l: Left</li>";
|
|
46750
47065
|
html += "<li>Key j: Right</li>";
|
|
46751
47066
|
html += "<li>Key i: Up</li>";
|
|
@@ -46758,20 +47073,20 @@ class SetMenu {
|
|
|
46758
47073
|
html += "</li>";
|
|
46759
47074
|
html += "<li><span>Zoom</span>";
|
|
46760
47075
|
html += "<ul>";
|
|
46761
|
-
html += "<li>Middle Mouse</li>";
|
|
47076
|
+
html += "<li>Middle Mouse <br>(Pinch & Spread)</li>";
|
|
46762
47077
|
html += "<li>Key z: Zoom in</li>";
|
|
46763
47078
|
html += "<li>Key x: Zoom out</li>";
|
|
46764
47079
|
html += "</ul>";
|
|
46765
47080
|
html += "</li>";
|
|
46766
47081
|
html += "<li><span>Translate</span>";
|
|
46767
47082
|
html += "<ul>";
|
|
46768
|
-
html += "<li>Right Mouse</li>";
|
|
47083
|
+
html += "<li>Right Mouse <br>(Two Finger Click & Drag)</li>";
|
|
46769
47084
|
html += "</ul>";
|
|
46770
47085
|
html += "</li>";
|
|
46771
47086
|
html += "</ul>";
|
|
46772
47087
|
html += "</li>";
|
|
46773
47088
|
|
|
46774
|
-
html += liStr + me.htmlCls.baseUrl + "icn3d/icn3d.html#HowToUseStep5' target='_blank'>Selection Hints</a></li>";
|
|
47089
|
+
if(!me.cfg.simplemenu) html += liStr + me.htmlCls.baseUrl + "icn3d/icn3d.html#HowToUseStep5' target='_blank'>Selection Hints</a></li>";
|
|
46775
47090
|
|
|
46776
47091
|
html += "<li><br/></li>";
|
|
46777
47092
|
html += "</ul>";
|
|
@@ -47372,6 +47687,8 @@ class SetDialog {
|
|
|
47372
47687
|
|
|
47373
47688
|
let html = "";
|
|
47374
47689
|
|
|
47690
|
+
let defaultColor = "#ffff00"; //ic.colorBlackbkgd;
|
|
47691
|
+
|
|
47375
47692
|
me.htmlCls.optionStr = "<option value=";
|
|
47376
47693
|
|
|
47377
47694
|
html += "<!-- dialog will not be part of the form -->";
|
|
@@ -47581,11 +47898,13 @@ class SetDialog {
|
|
|
47581
47898
|
html += "</div>";
|
|
47582
47899
|
|
|
47583
47900
|
html += me.htmlCls.divStr + "dl_blast_rep_id' style='max-width:500px;' class='" + dialogClass + "'>";
|
|
47584
|
-
html += "Enter a Sequence ID(or FASTA sequence) and the aligned Structure ID, which can be found using the <a href='https://blast.ncbi.nlm.nih.gov/Blast.cgi?PROGRAM=blastp&PAGE_TYPE=BlastSearch&DATABASE=pdb' target='_blank'>BLAST</a> search against the pdb database with the Sequence ID or FASTA sequence as input.<br><br> ";
|
|
47901
|
+
html += "Enter a Sequence ID (or FASTA sequence) and the aligned Structure ID, which can be found using the <a href='https://blast.ncbi.nlm.nih.gov/Blast.cgi?PROGRAM=blastp&PAGE_TYPE=BlastSearch&DATABASE=pdb' target='_blank'>BLAST</a> search against the pdb database with the Sequence ID or FASTA sequence as input.<br><br> ";
|
|
47585
47902
|
html += "<b>Sequence ID</b>(NCBI protein accession of a sequence): " + me.htmlCls.inputTextStr + "id='" + me.pre + "query_id' value='NP_001108451.1' size=8><br> ";
|
|
47586
47903
|
html += "or FASTA sequence: <br><textarea id='" + me.pre + "query_fasta' rows='5' style='width: 100%; height: " +(me.htmlCls.LOG_HEIGHT) + "px; padding: 0px; border: 0px;'></textarea><br><br>";
|
|
47587
47904
|
html += "<b>Structure ID</b>(NCBI protein accession of a chain of a 3D structure): " + me.htmlCls.inputTextStr + "id='" + me.pre + "blast_rep_id' value='1TSR_A' size=8><br> ";
|
|
47588
|
-
html += me.htmlCls.buttonStr + "reload_blast_rep_id'>Load</button>";
|
|
47905
|
+
//html += me.htmlCls.buttonStr + "reload_blast_rep_id'>Load</button>";
|
|
47906
|
+
html += me.htmlCls.buttonStr + "reload_blast_rep_id'>Align with BLAST</button> " + me.htmlCls.wifiStr
|
|
47907
|
+
+ me.htmlCls.buttonStr + "reload_alignsw' style='margin-left:30px'>Align with Smith-Waterman</button>";
|
|
47589
47908
|
html += "</div>";
|
|
47590
47909
|
|
|
47591
47910
|
html += me.htmlCls.divStr + "dl_yournote' class='" + dialogClass + "'>";
|
|
@@ -47966,8 +48285,8 @@ class SetDialog {
|
|
|
47966
48285
|
html += me.htmlCls.divStr + "dl_addlabel' class='" + dialogClass + "'>";
|
|
47967
48286
|
html += "1. Text: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labeltext' value='Text' size=4><br/>";
|
|
47968
48287
|
html += "2. Size: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelsize' value='18' size=4 maxlength=2><br/>";
|
|
47969
|
-
html += "3. Color: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelcolor' value='
|
|
47970
|
-
html += "4. Background: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelbkgd' value='
|
|
48288
|
+
html += "3. Color: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelcolor' value='" + defaultColor + "' size=4><br/>";
|
|
48289
|
+
html += "4. Background: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelbkgd' value='' size=4><br/>";
|
|
47971
48290
|
if(me.utilsCls.isMobile()) {
|
|
47972
48291
|
html += me.htmlCls.spanNowrapStr + "5. Touch TWO atoms</span><br/>";
|
|
47973
48292
|
}
|
|
@@ -47980,8 +48299,8 @@ class SetDialog {
|
|
|
47980
48299
|
html += me.htmlCls.divStr + "dl_addlabelselection' class='" + dialogClass + "'>";
|
|
47981
48300
|
html += "1. Text: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labeltext2' value='Text' size=4><br/>";
|
|
47982
48301
|
html += "2. Size: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelsize2' value='18' size=4 maxlength=2><br/>";
|
|
47983
|
-
html += "3. Color: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelcolor2' value='
|
|
47984
|
-
html += "4. Background: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelbkgd2' value='
|
|
48302
|
+
html += "3. Color: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelcolor2' value='" + defaultColor + "' size=4><br/>";
|
|
48303
|
+
html += "4. Background: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelbkgd2' value='' size=4><br/>";
|
|
47985
48304
|
html += me.htmlCls.spanNowrapStr + "5. " + me.htmlCls.buttonStr + "applyselection_labels'>Display</button></span>";
|
|
47986
48305
|
html += "</div>";
|
|
47987
48306
|
|
|
@@ -47992,7 +48311,7 @@ class SetDialog {
|
|
|
47992
48311
|
else {
|
|
47993
48312
|
html += me.htmlCls.spanNowrapStr + "1. Pick TWO atoms while holding \"Alt\" key</span><br/>";
|
|
47994
48313
|
}
|
|
47995
|
-
html += me.htmlCls.spanNowrapStr + "2. Color: " + me.htmlCls.inputTextStr + "id='" + me.pre + "distancecolor' value='
|
|
48314
|
+
html += me.htmlCls.spanNowrapStr + "2. Line Color: " + me.htmlCls.inputTextStr + "id='" + me.pre + "distancecolor' value='" + defaultColor + "' size=4><br/>";
|
|
47996
48315
|
html += me.htmlCls.spanNowrapStr + "3. " + me.htmlCls.buttonStr + "applypick_measuredistance'>Display</button></span>";
|
|
47997
48316
|
html += "</div>";
|
|
47998
48317
|
|
|
@@ -48023,7 +48342,7 @@ class SetDialog {
|
|
|
48023
48342
|
|
|
48024
48343
|
html += "</td></tr></table>";
|
|
48025
48344
|
|
|
48026
|
-
html += me.htmlCls.spanNowrapStr + "2. Color: " + me.htmlCls.inputTextStr + "id='" + me.pre + "distancecolor2' value='
|
|
48345
|
+
html += me.htmlCls.spanNowrapStr + "2. Color: " + me.htmlCls.inputTextStr + "id='" + me.pre + "distancecolor2' value='" + defaultColor + "' size=4><br/><br/>";
|
|
48027
48346
|
html += me.htmlCls.spanNowrapStr + "3. " + me.htmlCls.buttonStr + "applydist2'>Display</button></span>";
|
|
48028
48347
|
html += "</div>";
|
|
48029
48348
|
|
|
@@ -48827,12 +49146,27 @@ class Events {
|
|
|
48827
49146
|
me.htmlCls.clickMenuCls.setLogCmd("load seq_struct_ids " + query_id + "," + blast_rep_id, false);
|
|
48828
49147
|
query_id =(query_id !== '' && query_id !== undefined) ? query_id : query_fasta;
|
|
48829
49148
|
//window.open(me.htmlCls.baseUrl + 'icn3d/full.html?from=icn3d&blast_rep_id=' + blast_rep_id
|
|
48830
|
-
window.open(hostUrl + '?from=icn3d&blast_rep_id=' + blast_rep_id
|
|
49149
|
+
window.open(hostUrl + '?from=icn3d&alg=blast&blast_rep_id=' + blast_rep_id
|
|
48831
49150
|
+ '&query_id=' + query_id
|
|
48832
49151
|
+ '&command=view annotations; set annotation cdd; set annotation site; set view detailed view; select chain '
|
|
48833
49152
|
+ blast_rep_id + '; show selection', '_blank');
|
|
48834
49153
|
});
|
|
48835
49154
|
|
|
49155
|
+
me.myEventCls.onIds("#" + me.pre + "reload_alignsw", "click", function(e) { me.icn3d;
|
|
49156
|
+
e.preventDefault();
|
|
49157
|
+
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
49158
|
+
let query_id = $("#" + me.pre + "query_id").val();
|
|
49159
|
+
let query_fasta = encodeURIComponent($("#" + me.pre + "query_fasta").val());
|
|
49160
|
+
let blast_rep_id = $("#" + me.pre + "blast_rep_id").val();
|
|
49161
|
+
me.htmlCls.clickMenuCls.setLogCmd("load seq_struct_ids_smithwm " + query_id + "," + blast_rep_id, false);
|
|
49162
|
+
query_id =(query_id !== '' && query_id !== undefined) ? query_id : query_fasta;
|
|
49163
|
+
|
|
49164
|
+
window.open(hostUrl + '?from=icn3d&alg=smithwm&blast_rep_id=' + blast_rep_id
|
|
49165
|
+
+ '&query_id=' + query_id
|
|
49166
|
+
+ '&command=view annotations; set annotation cdd; set annotation site; set view detailed view; select chain '
|
|
49167
|
+
+ blast_rep_id + '; show selection', '_blank');
|
|
49168
|
+
});
|
|
49169
|
+
|
|
48836
49170
|
// },
|
|
48837
49171
|
// clickReload_gi: function() {
|
|
48838
49172
|
me.myEventCls.onIds("#" + me.pre + "reload_gi", "click", function(e) { me.icn3d;
|
|
@@ -49071,11 +49405,11 @@ class Events {
|
|
|
49071
49405
|
thisClass.loadPdbFile(bAppend);
|
|
49072
49406
|
});
|
|
49073
49407
|
|
|
49074
|
-
me.myEventCls.onIds("#" + me.pre + "reload_pdbfile_app", "click", function(e) { me.icn3d;
|
|
49408
|
+
me.myEventCls.onIds("#" + me.pre + "reload_pdbfile_app", "click", function(e) { let ic = me.icn3d;
|
|
49075
49409
|
e.preventDefault();
|
|
49076
49410
|
|
|
49077
|
-
|
|
49078
|
-
thisClass.loadPdbFile(bAppend);
|
|
49411
|
+
ic.bAppend = true;
|
|
49412
|
+
thisClass.loadPdbFile(ic.bAppend);
|
|
49079
49413
|
});
|
|
49080
49414
|
|
|
49081
49415
|
// },
|
|
@@ -50518,6 +50852,7 @@ class SetHtml {
|
|
|
50518
50852
|
let light2 = 0.4;
|
|
50519
50853
|
let light3 = 0.2;
|
|
50520
50854
|
let bGlycansCartoon = 0;
|
|
50855
|
+
let bMembrane = 1;
|
|
50521
50856
|
|
|
50522
50857
|
// retrieve from cache
|
|
50523
50858
|
if(type == 'style') {
|
|
@@ -50546,6 +50881,10 @@ class SetHtml {
|
|
|
50546
50881
|
bGlycansCartoon = parseFloat(this.getCookie('glycan'));
|
|
50547
50882
|
}
|
|
50548
50883
|
|
|
50884
|
+
if(this.getCookie('membrane') != '') {
|
|
50885
|
+
bMembrane = parseFloat(this.getCookie('membrane'));
|
|
50886
|
+
}
|
|
50887
|
+
|
|
50549
50888
|
html += "<b>Note</b>: The following parameters will be saved in cache. You just need to set them once. <br><br>";
|
|
50550
50889
|
|
|
50551
50890
|
html += "<b>1. Shininess</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "shininess' value='" + shininess + "' size=4>" + me.htmlCls.space3 + "(for the shininess of the 3D objects, default 40)<br/><br/>";
|
|
@@ -50568,7 +50907,9 @@ class SetHtml {
|
|
|
50568
50907
|
html += "<b>Ball Scale</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "ballscale_" + type + "' value='" + ballscale + "' size=4>" + me.htmlCls.space3 + "(for styles 'Ball and Stick' and 'Dot', default 0.3)<br/>";
|
|
50569
50908
|
|
|
50570
50909
|
if(type == 'style') {
|
|
50571
|
-
html += "<br><b>4. Show Glycan Cartoon</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "glycan' value='" + bGlycansCartoon + "' size=4>" + me.htmlCls.space3 + "(0: hide, 1: show, default 0)<br
|
|
50910
|
+
html += "<br><b>4. Show Glycan Cartoon</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "glycan' value='" + bGlycansCartoon + "' size=4>" + me.htmlCls.space3 + "(0: hide, 1: show, default 0)<br/>";
|
|
50911
|
+
|
|
50912
|
+
html += "<br><b>5. Show Membrane</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "membrane' value='" + bMembrane + "' size=4>" + me.htmlCls.space3 + "(0: hide, 1: show, default 1)<br/><br/>";
|
|
50572
50913
|
}
|
|
50573
50914
|
|
|
50574
50915
|
html += me.htmlCls.spanNowrapStr + "" + me.htmlCls.buttonStr + "apply_thickness_" + type + "'>Apply</button></span> ";
|
|
@@ -50761,8 +51102,8 @@ class SetHtml {
|
|
|
50761
51102
|
|
|
50762
51103
|
html += "<span style='white-space:nowrap;font-weight:bold;'>Potential contour at: <select id='" + me.pre + name1 + "contour'>";
|
|
50763
51104
|
|
|
50764
|
-
let optArray1b = ['0.5', '1', '2', '4', '6', '8', '10'];
|
|
50765
|
-
html += this.getOptionHtml(optArray1b,
|
|
51105
|
+
let optArray1b = ['0.5', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'];
|
|
51106
|
+
html += this.getOptionHtml(optArray1b, 2);
|
|
50766
51107
|
|
|
50767
51108
|
html += "</select> kT/e(25.6mV at 298K)</span><br/><br/>";
|
|
50768
51109
|
|
|
@@ -50826,7 +51167,7 @@ class SetHtml {
|
|
|
50826
51167
|
|
|
50827
51168
|
html += "<span style='white-space:nowrap;font-weight:bold;'>Surface with max potential at: <select id='" + me.pre + name1 + "contour2'>";
|
|
50828
51169
|
|
|
50829
|
-
let optArray1c = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'];
|
|
51170
|
+
let optArray1c = ['0.5', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'];
|
|
50830
51171
|
html += this.getOptionHtml(optArray1c, 2);
|
|
50831
51172
|
|
|
50832
51173
|
html += "</select> kT/e(25.6mV at 298K)</span><br/><br/>";
|
|
@@ -51039,7 +51380,7 @@ class SetHtml {
|
|
|
51039
51380
|
});
|
|
51040
51381
|
}
|
|
51041
51382
|
|
|
51042
|
-
loadPng(imageStr) { let me = this.icn3dui, ic = me.icn3d;
|
|
51383
|
+
loadPng(imageStr, command) { let me = this.icn3dui, ic = me.icn3d;
|
|
51043
51384
|
let matchedStr = 'Share Link: ';
|
|
51044
51385
|
let pos = imageStr.indexOf(matchedStr);
|
|
51045
51386
|
let matchedStrState = "Start of state file======\n";
|
|
@@ -51056,6 +51397,8 @@ class SetHtml {
|
|
|
51056
51397
|
let matchedStrData = "Start of data file======\n";
|
|
51057
51398
|
let posData = imageStr.indexOf(matchedStrData);
|
|
51058
51399
|
ic.bInputfile =(posData == -1) ? false : true;
|
|
51400
|
+
let commandStr = (command) ? command.replace(/;/g, "\n") : '';
|
|
51401
|
+
|
|
51059
51402
|
if(ic.bInputfile) {
|
|
51060
51403
|
let posDataEnd = imageStr.indexOf("End of data file======\n");
|
|
51061
51404
|
let data = imageStr.substr(posData + matchedStrData.length, posDataEnd - posData - matchedStrData.length);
|
|
@@ -51071,7 +51414,9 @@ class SetHtml {
|
|
|
51071
51414
|
//var posState = imageStr.indexOf(matchedStrState);
|
|
51072
51415
|
let posStateEnd = imageStr.indexOf("End of state file======\n");
|
|
51073
51416
|
let statefile = imageStr.substr(posState + matchedStrState.length, posStateEnd - posState- matchedStrState.length);
|
|
51074
|
-
statefile = decodeURIComponent(statefile);
|
|
51417
|
+
//statefile = decodeURIComponent(statefile);
|
|
51418
|
+
statefile = decodeURIComponent(statefile + "\n" + commandStr);
|
|
51419
|
+
|
|
51075
51420
|
if(type === 'pdb') {
|
|
51076
51421
|
$.when( ic.pdbParserCls.loadPdbData(data))
|
|
51077
51422
|
.then(function() {
|
|
@@ -51103,7 +51448,9 @@ class SetHtml {
|
|
|
51103
51448
|
//var posState = imageStr.indexOf(matchedStrState);
|
|
51104
51449
|
let posStateEnd = imageStr.indexOf("End of state file======\n");
|
|
51105
51450
|
let statefile = imageStr.substr(posState + matchedStrState.length, posStateEnd - posState- matchedStrState.length);
|
|
51106
|
-
statefile = decodeURIComponent(statefile);
|
|
51451
|
+
//statefile = decodeURIComponent(statefile);
|
|
51452
|
+
statefile = decodeURIComponent(statefile + "\n" + commandStr);
|
|
51453
|
+
|
|
51107
51454
|
ic.commands = [];
|
|
51108
51455
|
ic.optsHistory = [];
|
|
51109
51456
|
ic.loadScriptCls.loadScript(statefile, true);
|
|
@@ -51166,6 +51513,7 @@ class SetHtml {
|
|
|
51166
51513
|
$("#" + me.pre + "light2").val('0.4');
|
|
51167
51514
|
$("#" + me.pre + "light3").val('0.2');
|
|
51168
51515
|
$("#" + me.pre + "glycan").val('0');
|
|
51516
|
+
$("#" + me.pre + "membrane").val('1');
|
|
51169
51517
|
}
|
|
51170
51518
|
|
|
51171
51519
|
ic.shininess = parseFloat($("#" + me.pre + "shininess").val()); //40;
|
|
@@ -51173,6 +51521,7 @@ class SetHtml {
|
|
|
51173
51521
|
ic.light2 = parseFloat($("#" + me.pre + "light2").val()); //0.4;
|
|
51174
51522
|
ic.light3 = parseFloat($("#" + me.pre + "light3").val()); //0.2;
|
|
51175
51523
|
ic.bGlycansCartoon = parseInt($("#" + me.pre + "glycan").val()); //0;
|
|
51524
|
+
ic.bMembrane = parseInt($("#" + me.pre + "membrane").val()); //1;
|
|
51176
51525
|
}
|
|
51177
51526
|
|
|
51178
51527
|
if(bReset) {
|
|
@@ -51203,6 +51552,7 @@ class SetHtml {
|
|
|
51203
51552
|
this.setCookie('light2', ic.light2, exdays);
|
|
51204
51553
|
this.setCookie('light3', ic.light3, exdays);
|
|
51205
51554
|
this.setCookie('glycan', ic.bGlycansCartoon, exdays);
|
|
51555
|
+
this.setCookie('membrane', ic.bMembrane, exdays);
|
|
51206
51556
|
}
|
|
51207
51557
|
|
|
51208
51558
|
this.setCookieForThickness();
|
|
@@ -51215,6 +51565,9 @@ class SetHtml {
|
|
|
51215
51565
|
}
|
|
51216
51566
|
else {
|
|
51217
51567
|
me.htmlCls.clickMenuCls.setLogCmd('set thickness | linerad ' + ic.lineRadius + ' | coilrad ' + ic.coilWidth + ' | stickrad ' + ic.cylinderRadius + ' | tracerad ' + ic.traceRadius + ' | ribbonthick ' + ic.ribbonthickness + ' | proteinwidth ' + ic.helixSheetWidth + ' | nucleotidewidth ' + ic.nucleicAcidWidth + ' | ballscale ' + ic.dotSphereScale, true);
|
|
51568
|
+
|
|
51569
|
+
me.htmlCls.clickMenuCls.setLogCmd('set glycan ' + ic.bGlycansCartoon, true);
|
|
51570
|
+
me.htmlCls.clickMenuCls.setLogCmd('set membrane ' + ic.bMembrane, true);
|
|
51218
51571
|
}
|
|
51219
51572
|
|
|
51220
51573
|
ic.drawCls.draw();
|
|
@@ -53020,6 +53373,398 @@ class DensityCifParser {
|
|
|
53020
53373
|
}
|
|
53021
53374
|
}
|
|
53022
53375
|
|
|
53376
|
+
/**
|
|
53377
|
+
* @author Jack Lin, modified from https://github.com/lh3/bioseq-js/blob/master/bioseq.js
|
|
53378
|
+
*/
|
|
53379
|
+
|
|
53380
|
+
//import { HashUtilsCls } from '../../utils/hashUtilsCls.js';
|
|
53381
|
+
|
|
53382
|
+
//import { Html } from '../../html/html.js';
|
|
53383
|
+
|
|
53384
|
+
//import { SaveFile } from '../export/saveFile.js';
|
|
53385
|
+
//import { PdbParser } from '../parsers/pdbParser.js';
|
|
53386
|
+
|
|
53387
|
+
class AlignSW {
|
|
53388
|
+
constructor(icn3d) {
|
|
53389
|
+
this.icn3d = icn3d;
|
|
53390
|
+
}
|
|
53391
|
+
|
|
53392
|
+
alignSW(target, query, match_score, mismatch, gap, extension, is_local = false) { let ic = this.icn3d; ic.icn3dui;
|
|
53393
|
+
//let time_start = new Date().getTime();
|
|
53394
|
+
|
|
53395
|
+
let rst = this.bsa_align(is_local, target, query, [match_score, mismatch], [gap, extension]);
|
|
53396
|
+
let str = 'score: ' + rst[0] + '\n';
|
|
53397
|
+
str += 'start: ' + rst[1] + '\n';
|
|
53398
|
+
str += 'cigar: ' + this.bsa_cigar2str(rst[2]) + '\n\n';
|
|
53399
|
+
str += 'alignment:\n\n';
|
|
53400
|
+
let fmt = this.bsa_cigar2gaps(target, query, rst[1], rst[2]);
|
|
53401
|
+
|
|
53402
|
+
/*
|
|
53403
|
+
//let anno_seq = document.getElementById("div0_dl_annotations")
|
|
53404
|
+
let algn = "<div id=waterman_alignment><span>" + 'score: ' + rst[0] + '<br>' + 'start: ' + rst[1] + '<br>' + 'cigar: ' + this.bsa_cigar2str(rst[2]) + '<br><br>' + 'alignment:' + '<br>'
|
|
53405
|
+
|
|
53406
|
+
let linelen = 100,
|
|
53407
|
+
n_lines = 10;
|
|
53408
|
+
for (let l = 0; l < fmt[0].length; l += linelen) {
|
|
53409
|
+
str += fmt[0].substr(l, linelen) + '\n';
|
|
53410
|
+
str += fmt[2].substr(l, linelen) + '\n';
|
|
53411
|
+
str += fmt[1].substr(l, linelen) + '\n\n';
|
|
53412
|
+
n_lines += 4;
|
|
53413
|
+
}
|
|
53414
|
+
|
|
53415
|
+
algn += '<pre>'
|
|
53416
|
+
algn += fmt[0] + '<br>';
|
|
53417
|
+
algn += fmt[2] + '<br>';
|
|
53418
|
+
algn += fmt[1] + '<br><br>';
|
|
53419
|
+
algn += '</pre><br>' + "</span></div>"
|
|
53420
|
+
|
|
53421
|
+
//anno_seq.innerHTML += algn
|
|
53422
|
+
|
|
53423
|
+
//let elapse = (new Date().getTime() - time_start) / 1000.0;
|
|
53424
|
+
//console.log("in " + elapse.toFixed(3) + "s");
|
|
53425
|
+
*/
|
|
53426
|
+
let algn = {};
|
|
53427
|
+
algn.score = rst[0];
|
|
53428
|
+
algn.start = rst[1];
|
|
53429
|
+
algn.cigar = this.bsa_cigar2str(rst[2]);
|
|
53430
|
+
algn.target = fmt[0];
|
|
53431
|
+
algn.query = fmt[1];
|
|
53432
|
+
|
|
53433
|
+
return algn;
|
|
53434
|
+
}
|
|
53435
|
+
|
|
53436
|
+
/**
|
|
53437
|
+
* Encode a sequence string with table
|
|
53438
|
+
*
|
|
53439
|
+
* @param seq sequence
|
|
53440
|
+
* @param table encoding table; must be of size 256
|
|
53441
|
+
*
|
|
53442
|
+
* @return an integer array
|
|
53443
|
+
*/
|
|
53444
|
+
|
|
53445
|
+
bsg_enc_seq(seq, table) { let ic = this.icn3d; ic.icn3dui;
|
|
53446
|
+
if (table == null) return null;
|
|
53447
|
+
let s = [];
|
|
53448
|
+
s.length = seq.length;
|
|
53449
|
+
for (let i = 0; i < seq.length; ++i)
|
|
53450
|
+
s[i] = table[seq.charCodeAt(i)];
|
|
53451
|
+
return s;
|
|
53452
|
+
}
|
|
53453
|
+
|
|
53454
|
+
/*
|
|
53455
|
+
ks_revcomp(s) { let ic = this.icn3d, me = ic.icn3dui;
|
|
53456
|
+
let ks_comp = {'A':'T','C':'G','G':'C','T':'A','M':'K','K':'M','Y':'R','R':'Y','V':'B','B':'V','H':'D','D':'H',
|
|
53457
|
+
'a':'t','c':'g','g':'c','t':'a','m':'k','k':'m','y':'r','r':'y','v':'b','b':'v','h':'d','d':'h'};
|
|
53458
|
+
|
|
53459
|
+
let i, t = '';
|
|
53460
|
+
for (i = 0; i < s.length; ++i) {
|
|
53461
|
+
let c = s.charAt(s.length - 1 - i);
|
|
53462
|
+
let d = ks_comp[c];
|
|
53463
|
+
t += d? d : c;
|
|
53464
|
+
}
|
|
53465
|
+
return t;
|
|
53466
|
+
}
|
|
53467
|
+
*/
|
|
53468
|
+
|
|
53469
|
+
/**************************
|
|
53470
|
+
*** Pairwise alignment ***
|
|
53471
|
+
**************************/
|
|
53472
|
+
|
|
53473
|
+
/*
|
|
53474
|
+
* The following implements local and global pairwise alignment with affine gap
|
|
53475
|
+
* penalties. There are two formulations: the Durbin formulation as is
|
|
53476
|
+
* described in his book and the Green formulation as is implemented in phrap.
|
|
53477
|
+
* The Durbin formulation is easier to understand, while the Green formulation
|
|
53478
|
+
* is simpler to code and probably faster in practice.
|
|
53479
|
+
*
|
|
53480
|
+
* The Durbin formulation is:
|
|
53481
|
+
*
|
|
53482
|
+
* M(i,j) = max{M(i-1,j-1)+S(i,j), E(i-1,j-1), F(i-1,j-1)}
|
|
53483
|
+
* E(i,j) = max{M(i-1,j)-q-r, F(i-1,j)-q-r, E(i-1,j)-r}
|
|
53484
|
+
* F(i,j) = max{M(i,j-1)-q-r, F(i,j-1)-r, E(i,j-1)-q-r}
|
|
53485
|
+
*
|
|
53486
|
+
* where q is the gap open penalty, r the gap extension penalty and S(i,j) is
|
|
53487
|
+
* the score between the i-th residue in the row sequence and the j-th residue
|
|
53488
|
+
* in the column sequence. Note that the original Durbin formulation disallows
|
|
53489
|
+
* transitions between between E and F states, but we allow them here.
|
|
53490
|
+
*
|
|
53491
|
+
* In the Green formulation, we introduce:
|
|
53492
|
+
*
|
|
53493
|
+
* H(i,j) = max{M(i,j), E(i,j), F(i,j)}
|
|
53494
|
+
*
|
|
53495
|
+
* The recursion becomes:
|
|
53496
|
+
*
|
|
53497
|
+
* H(i,j) = max{H(i-1,j-1)+S(i,j), E(i,j), F(i,j)}
|
|
53498
|
+
* E(i,j) = max{H(i-1,j)-q, E(i-1,j)} - r
|
|
53499
|
+
* F(i,j) = max{H(i,j-1)-q, F(i,j-1)} - r
|
|
53500
|
+
*
|
|
53501
|
+
* It is in fact equivalent to the Durbin formulation. In implementation, we
|
|
53502
|
+
* calculate the scores in a different order:
|
|
53503
|
+
*
|
|
53504
|
+
* H(i,j) = max{H(i-1,j-1)+S(i,j), E(i,j), F(i,j)}
|
|
53505
|
+
* E(i+1,j) = max{H(i,j)-q, E(i,j)} - r
|
|
53506
|
+
* F(i,j+1) = max{H(i,j)-q, F(i,j)} - r
|
|
53507
|
+
*
|
|
53508
|
+
* i.e. at cell (i,j), we compute E for the next row and F for the next column.
|
|
53509
|
+
* Please see inline comments below for details.
|
|
53510
|
+
*
|
|
53511
|
+
*
|
|
53512
|
+
* The following implementation is ported from klib/ksw.c. The original C
|
|
53513
|
+
* implementation has a few bugs which have been fixed here. Like the C
|
|
53514
|
+
* version, this implementation should be very efficient. It could be made more
|
|
53515
|
+
* efficient if we use typed integer arrays such as Uint8Array. In addition,
|
|
53516
|
+
* I mixed the local and global alignments together. For performance,
|
|
53517
|
+
* it would be preferred to separate them out.
|
|
53518
|
+
*/
|
|
53519
|
+
|
|
53520
|
+
/**
|
|
53521
|
+
* Generate scoring matrix from match/mismatch score
|
|
53522
|
+
*
|
|
53523
|
+
* @param n size of the alphabet
|
|
53524
|
+
* @param a match score, positive
|
|
53525
|
+
* @param b mismatch score, negative
|
|
53526
|
+
*
|
|
53527
|
+
* @return sqaure scoring matrix. The last row and column are zero, for
|
|
53528
|
+
* matching an ambiguous residue.
|
|
53529
|
+
*/
|
|
53530
|
+
bsa_gen_score_matrix(n, a, b) { let ic = this.icn3d; ic.icn3dui;
|
|
53531
|
+
let m = [];
|
|
53532
|
+
if (b > 0) b = -b; // mismatch score b should be non-positive
|
|
53533
|
+
let i, j;
|
|
53534
|
+
for (i = 0; i < n - 1; ++i) {
|
|
53535
|
+
m[i] = [];
|
|
53536
|
+
for (j = 0; j < n - 1; ++j)
|
|
53537
|
+
m[i][j] = i == j ? a : b;
|
|
53538
|
+
m[i][j] = 0;
|
|
53539
|
+
}
|
|
53540
|
+
m[n - 1] = [];
|
|
53541
|
+
for (let j = 0; j < n; ++j) m[n - 1][j] = 0;
|
|
53542
|
+
return m;
|
|
53543
|
+
}
|
|
53544
|
+
|
|
53545
|
+
/**
|
|
53546
|
+
* Generate query profile (a preprocessing step)
|
|
53547
|
+
*
|
|
53548
|
+
* @param _s sequence in string or post bsg_enc_seq()
|
|
53549
|
+
* @param _m score matrix or [match,mismatch] array
|
|
53550
|
+
* @param table encoding table; must be consistent with _s and _m
|
|
53551
|
+
*
|
|
53552
|
+
* @return query profile. It is a two-dimensional integer matrix.
|
|
53553
|
+
*/
|
|
53554
|
+
bsa_gen_query_profile(_s, _m, table) { let ic = this.icn3d; ic.icn3dui;
|
|
53555
|
+
let s = typeof _s == 'string' ? this.bsg_enc_seq(_s, table) : _s;
|
|
53556
|
+
let qp = [],
|
|
53557
|
+
matrix;
|
|
53558
|
+
if (_m.length >= 2 && typeof _m[0] == 'number' && typeof _m[1] == 'number') { // match/mismatch score
|
|
53559
|
+
if (table == null) return null;
|
|
53560
|
+
let n = typeof table == 'number' ? table : table[table.length - 1] + 1;
|
|
53561
|
+
matrix = this.bsa_gen_score_matrix(n, _m[0], _m[1]);
|
|
53562
|
+
} else matrix = _m; // _m is already a matrix; FIXME: check if it is really a square matrix!
|
|
53563
|
+
for (let j = 0; j < matrix.length; ++j) {
|
|
53564
|
+
let qpj, mj = matrix[j];
|
|
53565
|
+
qpj = qp[j] = [];
|
|
53566
|
+
for (let i = 0; i < s.length; ++i)
|
|
53567
|
+
qpj[i] = mj[s[i]];
|
|
53568
|
+
}
|
|
53569
|
+
return qp;
|
|
53570
|
+
}
|
|
53571
|
+
|
|
53572
|
+
/**
|
|
53573
|
+
* Local or global pairwise alignemnt
|
|
53574
|
+
*
|
|
53575
|
+
* @param is_local perform local alignment
|
|
53576
|
+
* @param target target string
|
|
53577
|
+
* @param query query string or query profile
|
|
53578
|
+
* @param matrix square score matrix or [match,mismatch] array
|
|
53579
|
+
* @param gapsc [gap_open,gap_ext] array; k-length gap costs gap_open+gap_ext*k
|
|
53580
|
+
* @param w bandwidth, disabled by default
|
|
53581
|
+
* @param table encoding table. It defaults to bst_nt5.
|
|
53582
|
+
*
|
|
53583
|
+
* @return [score,target_start,cigar]. cigar is encoded in the BAM way, where
|
|
53584
|
+
* higher 28 bits keeps the length and lower 4 bits the operation in order of
|
|
53585
|
+
* "MIDNSH". See bsa_cigar2str() for converting cigar to string.
|
|
53586
|
+
*/
|
|
53587
|
+
bsa_align(is_local, target, query, matrix, gapsc, w, table) { let ic = this.icn3d; ic.icn3dui;
|
|
53588
|
+
let bst_nt5 = [
|
|
53589
|
+
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
|
53590
|
+
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
|
53591
|
+
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
|
53592
|
+
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
|
53593
|
+
4, 0, 4, 1, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4,
|
|
53594
|
+
4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
|
53595
|
+
4, 0, 4, 1, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4,
|
|
53596
|
+
4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
|
53597
|
+
|
|
53598
|
+
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
|
53599
|
+
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
|
53600
|
+
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
|
53601
|
+
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
|
53602
|
+
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
|
53603
|
+
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
|
53604
|
+
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
|
53605
|
+
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
|
|
53606
|
+
];
|
|
53607
|
+
|
|
53608
|
+
// convert bases to integers
|
|
53609
|
+
if (table == null) table = bst_nt5;
|
|
53610
|
+
let t = this.bsg_enc_seq(target, table);
|
|
53611
|
+
let qp = this.bsa_gen_query_profile(query, matrix, table);
|
|
53612
|
+
let qlen = qp[0].length;
|
|
53613
|
+
|
|
53614
|
+
// adjust band width
|
|
53615
|
+
let max_len = qlen > t.length ? qlen : t.length;
|
|
53616
|
+
w = w == null || w < 0 ? max_len : w;
|
|
53617
|
+
let len_diff = t.target > qlen ? t.target - qlen : qlen - t.target;
|
|
53618
|
+
w = w > len_diff ? w : len_diff;
|
|
53619
|
+
|
|
53620
|
+
// set gap score
|
|
53621
|
+
let gapo, gape; // these are penalties which should be non-negative
|
|
53622
|
+
if (typeof gapsc == 'number') gapo = 0, gape = gapsc > 0 ? gapsc : -gapsc;
|
|
53623
|
+
else gapo = gapsc[0] > 0 ? gapsc[0] : -gapsc[0], gape = gapsc[1] > 0 ? gapsc[1] : -gapsc[1];
|
|
53624
|
+
let gapoe = gapo + gape; // penalty for opening the first gap
|
|
53625
|
+
|
|
53626
|
+
// initial values
|
|
53627
|
+
let NEG_INF = -0x40000000;
|
|
53628
|
+
let H = [],
|
|
53629
|
+
E = [],
|
|
53630
|
+
z = [],
|
|
53631
|
+
score, max = 0,
|
|
53632
|
+
end_i = -1,
|
|
53633
|
+
end_j = -1;
|
|
53634
|
+
if (is_local) {
|
|
53635
|
+
for (let j = 0; j <= qlen; ++j) H[j] = E[j] = 0;
|
|
53636
|
+
} else {
|
|
53637
|
+
H[0] = 0;
|
|
53638
|
+
E[0] = -gapoe - gapoe;
|
|
53639
|
+
for (let j = 1; j <= qlen; ++j) {
|
|
53640
|
+
if (j >= w) H[j] = E[j] = NEG_INF; // everything is -inf outside the band
|
|
53641
|
+
else H[j] = -(gapoe + gape * (j - 1)), E[j] = -(gapoe + gapoe + gape * j);
|
|
53642
|
+
}
|
|
53643
|
+
}
|
|
53644
|
+
|
|
53645
|
+
// the DP loop
|
|
53646
|
+
for (let i = 0; i < t.length; ++i) {
|
|
53647
|
+
let h1 = 0,
|
|
53648
|
+
f = 0,
|
|
53649
|
+
m = 0,
|
|
53650
|
+
mj = -1;
|
|
53651
|
+
let zi, qpi = qp[t[i]];
|
|
53652
|
+
zi = z[i] = [];
|
|
53653
|
+
let beg = i > w ? i - w : 0;
|
|
53654
|
+
let end = i + w + 1 < qlen ? i + w + 1 : qlen; // only loop through [beg,end) of the query sequence
|
|
53655
|
+
if (!is_local) {
|
|
53656
|
+
h1 = beg > 0 ? NEG_INF : -(gapoe + gape * i);
|
|
53657
|
+
f = beg > 0 ? NEG_INF : -(gapoe + gapoe + gape * i);
|
|
53658
|
+
}
|
|
53659
|
+
for (let j = beg; j < end; ++j) {
|
|
53660
|
+
// At the beginning of the loop: h=H[j]=H(i-1,j-1), e=E[j]=E(i,j), f=F(i,j) and h1=H(i,j-1)
|
|
53661
|
+
// If we only want to compute the max score, delete all lines involving direction "d".
|
|
53662
|
+
let e = E[j],
|
|
53663
|
+
h = H[j],
|
|
53664
|
+
d;
|
|
53665
|
+
H[j] = h1; // set H(i,j-1) for the next row
|
|
53666
|
+
h += qpi[j]; // h = H(i-1,j-1) + S(i,j)
|
|
53667
|
+
d = h >= e ? 0 : 1;
|
|
53668
|
+
h = h >= e ? h : e;
|
|
53669
|
+
d = h >= f ? d : 2;
|
|
53670
|
+
h = h >= f ? h : f; // h = H(i,j) = max{H(i-1,j-1)+S(i,j), E(i,j), F(i,j)}
|
|
53671
|
+
d = !is_local || h > 0 ? d : 1 << 6;
|
|
53672
|
+
h1 = h; // save H(i,j) to h1 for the next column
|
|
53673
|
+
mj = m > h ? mj : j;
|
|
53674
|
+
m = m > h ? m : h; // update the max score in this row
|
|
53675
|
+
h -= gapoe;
|
|
53676
|
+
h = !is_local || h > 0 ? h : 0;
|
|
53677
|
+
e -= gape;
|
|
53678
|
+
d |= e > h ? 1 << 2 : 0;
|
|
53679
|
+
e = e > h ? e : h; // e = E(i+1,j)
|
|
53680
|
+
E[j] = e; // save E(i+1,j) for the next row
|
|
53681
|
+
f -= gape;
|
|
53682
|
+
d |= f > h ? 2 << 4 : 0;
|
|
53683
|
+
f = f > h ? f : h; // f = F(i,j+1)
|
|
53684
|
+
zi[j] = d; // z[i,j] keeps h for the current cell and e/f for the next cell
|
|
53685
|
+
}
|
|
53686
|
+
H[end] = h1, E[end] = is_local ? 0 : NEG_INF;
|
|
53687
|
+
if (m > max) max = m, end_i = i, end_j = mj;
|
|
53688
|
+
}
|
|
53689
|
+
if (is_local && max == 0) return null;
|
|
53690
|
+
score = is_local ? max : H[qlen];
|
|
53691
|
+
|
|
53692
|
+
let cigar = [],
|
|
53693
|
+
tmp, which = 0,
|
|
53694
|
+
i, k, start_i = 0;
|
|
53695
|
+
if (is_local) {
|
|
53696
|
+
i = end_i, k = end_j;
|
|
53697
|
+
if (end_j != qlen - 1) // then add soft cliping
|
|
53698
|
+
this.push_cigar(cigar, 4, qlen - 1 - end_j);
|
|
53699
|
+
} else i = t.length - 1, k = (i + w + 1 < qlen ? i + w + 1 : qlen) - 1; // (i,k) points to the last cell
|
|
53700
|
+
while (i >= 0 && k >= 0) {
|
|
53701
|
+
tmp = z[i][k - (i > w ? i - w : 0)];
|
|
53702
|
+
which = tmp >> (which << 1) & 3;
|
|
53703
|
+
if (which == 0 && tmp >> 6) break;
|
|
53704
|
+
if (which == 0) which = tmp & 3;
|
|
53705
|
+
if (which == 0) { this.push_cigar(cigar, 0, 1);--i, --k; } // match
|
|
53706
|
+
else if (which == 1) { this.push_cigar(cigar, 2, 1);--i; } // deletion
|
|
53707
|
+
else { this.push_cigar(cigar, 1, 1), --k; } // insertion
|
|
53708
|
+
}
|
|
53709
|
+
if (is_local) {
|
|
53710
|
+
if (k >= 0) this.push_cigar(cigar, 4, k + 1); // add soft clipping
|
|
53711
|
+
start_i = i + 1;
|
|
53712
|
+
} else { // add the first insertion or deletion
|
|
53713
|
+
if (i >= 0) this.push_cigar(cigar, 2, i + 1);
|
|
53714
|
+
if (k >= 0) this.push_cigar(cigar, 1, k + 1);
|
|
53715
|
+
}
|
|
53716
|
+
for (let i = 0; i < cigar.length >> 1; ++i) // reverse CIGAR
|
|
53717
|
+
tmp = cigar[i], cigar[i] = cigar[cigar.length - 1 - i], cigar[cigar.length - 1 - i] = tmp;
|
|
53718
|
+
return [score, start_i, cigar];
|
|
53719
|
+
}
|
|
53720
|
+
|
|
53721
|
+
// backtrack to recover the alignment/cigar
|
|
53722
|
+
push_cigar(ci, op, len) { let ic = this.icn3d; ic.icn3dui;
|
|
53723
|
+
if (ci.length == 0 || op != (ci[ci.length - 1] & 0xf))
|
|
53724
|
+
ci.push(len << 4 | op);
|
|
53725
|
+
else ci[ci.length - 1] += len << 4;
|
|
53726
|
+
}
|
|
53727
|
+
|
|
53728
|
+
bsa_cigar2gaps(target, query, start, cigar) { let ic = this.icn3d; ic.icn3dui;
|
|
53729
|
+
let oq = '',
|
|
53730
|
+
ot = '',
|
|
53731
|
+
mid = '',
|
|
53732
|
+
lq = 0,
|
|
53733
|
+
lt = start;
|
|
53734
|
+
for (let k = 0; k < cigar.length; ++k) {
|
|
53735
|
+
let op = cigar[k] & 0xf,
|
|
53736
|
+
len = cigar[k] >> 4;
|
|
53737
|
+
if (op == 0) { // match
|
|
53738
|
+
oq += query.substr(lq, len);
|
|
53739
|
+
ot += target.substr(lt, len);
|
|
53740
|
+
lq += len, lt += len;
|
|
53741
|
+
} else if (op == 1) { // insertion
|
|
53742
|
+
oq += query.substr(lq, len);
|
|
53743
|
+
ot += Array(len + 1).join("-");
|
|
53744
|
+
lq += len;
|
|
53745
|
+
} else if (op == 2) { // deletion
|
|
53746
|
+
oq += Array(len + 1).join("-");
|
|
53747
|
+
ot += target.substr(lt, len);
|
|
53748
|
+
lt += len;
|
|
53749
|
+
} else if (op == 4) { // soft clip
|
|
53750
|
+
lq += len;
|
|
53751
|
+
}
|
|
53752
|
+
}
|
|
53753
|
+
let ut = ot.toUpperCase();
|
|
53754
|
+
let uq = oq.toUpperCase();
|
|
53755
|
+
for (let k = 0; k < ut.length; ++k)
|
|
53756
|
+
mid += ut.charAt(k) == uq.charAt(k) ? '|' : ' ';
|
|
53757
|
+
return [ot, oq, mid];
|
|
53758
|
+
}
|
|
53759
|
+
|
|
53760
|
+
bsa_cigar2str(cigar) { let ic = this.icn3d; ic.icn3dui;
|
|
53761
|
+
let s = [];
|
|
53762
|
+
for (let k = 0; k < cigar.length; ++k)
|
|
53763
|
+
s.push((cigar[k] >> 4).toString() + "MIDNSHP=XB".charAt(cigar[k] & 0xf));
|
|
53764
|
+
return s.join("");
|
|
53765
|
+
}
|
|
53766
|
+
}
|
|
53767
|
+
|
|
53023
53768
|
/**
|
|
53024
53769
|
* @author Jiyao Wang <wangjiy@ncbi.nlm.nih.gov> / https://github.com/ncbi/icn3d
|
|
53025
53770
|
*/
|
|
@@ -53115,7 +53860,7 @@ class Ray {
|
|
|
53115
53860
|
// the intersections are sorted so that the closest point is the first one.
|
|
53116
53861
|
intersects[ 0 ].point.sub(position); // mdl.position was moved to the original (0,0,0) after reading the molecule coordinates. The raycasting was done based on the original. The position of the original should be substracted.
|
|
53117
53862
|
|
|
53118
|
-
let threshold = 0.5;
|
|
53863
|
+
let threshold = ic.rayThreshold; //0.5;
|
|
53119
53864
|
let atom = this.getAtomsFromPosition(intersects[ 0 ].point, threshold); // the second parameter is the distance threshold. The first matched atom will be returned. Use 1 angstrom, not 2 angstrom. If it's 2 angstrom, other atom will be returned.
|
|
53120
53865
|
|
|
53121
53866
|
while(!atom && threshold < 10) {
|
|
@@ -53644,6 +54389,8 @@ class iCn3D {
|
|
|
53644
54389
|
this.bImpo = true;
|
|
53645
54390
|
this.bInstanced = true;
|
|
53646
54391
|
|
|
54392
|
+
this.chainMissingResidueArray = {};
|
|
54393
|
+
|
|
53647
54394
|
if(!this.icn3dui.bNode) {
|
|
53648
54395
|
this.bExtFragDepth = this.renderer.extensions.get( "EXT_frag_depth" );
|
|
53649
54396
|
if(!this.bExtFragDepth) {
|
|
@@ -53703,7 +54450,7 @@ class iCn3D {
|
|
|
53703
54450
|
this.bCalphaOnly = false; // by default the input has both Calpha and O, used for drawing strands. If atoms have Calpha only, the orientation of the strands is random
|
|
53704
54451
|
// this.bSSOnly = false; // a flag to turn on when only helix and bricks are available to draw 3D dgm
|
|
53705
54452
|
|
|
53706
|
-
this.bAllAtoms = true; // no need to adjust atom for strand style
|
|
54453
|
+
// this.bAllAtoms = true; // no need to adjust atom for strand style
|
|
53707
54454
|
|
|
53708
54455
|
this.bConsiderNeighbors = false; // a flag to show surface considering the neighboring atoms or not
|
|
53709
54456
|
|
|
@@ -53764,6 +54511,10 @@ class iCn3D {
|
|
|
53764
54511
|
|
|
53765
54512
|
this.LABELSIZE = 30;
|
|
53766
54513
|
|
|
54514
|
+
this.rayThreshold = 0.5; // threadshold for raycast
|
|
54515
|
+
this.colorBlackbkgd = '#ffff00';
|
|
54516
|
+
this.colorWhitebkgd = '#000000';
|
|
54517
|
+
|
|
53767
54518
|
//The default display options
|
|
53768
54519
|
this.optsOri = {};
|
|
53769
54520
|
this.optsOri['camera'] = 'perspective'; //perspective, orthographic
|
|
@@ -53959,6 +54710,7 @@ class iCn3D {
|
|
|
53959
54710
|
this.dsspCls = new Dssp(this);
|
|
53960
54711
|
this.scapCls = new Scap(this);
|
|
53961
54712
|
this.symdCls = new Symd(this);
|
|
54713
|
+
this.alignSWCls = new AlignSW(this);
|
|
53962
54714
|
|
|
53963
54715
|
this.analysisCls = new Analysis(this);
|
|
53964
54716
|
this.resizeCanvasCls = new ResizeCanvas(this);
|
|
@@ -54091,9 +54843,13 @@ iCn3D.prototype.init_base = function (bKeepCmd) {
|
|
|
54091
54843
|
|
|
54092
54844
|
this.axes = [];
|
|
54093
54845
|
|
|
54094
|
-
this.bGlycansCartoon =
|
|
54846
|
+
this.bGlycansCartoon = 0;
|
|
54847
|
+
this.bMembrane = 1;
|
|
54095
54848
|
|
|
54096
54849
|
this.chainid2offset = {};
|
|
54850
|
+
|
|
54851
|
+
this.chainMissingResidueArray = {};
|
|
54852
|
+
this.nTotalGap = 0;
|
|
54097
54853
|
};
|
|
54098
54854
|
|
|
54099
54855
|
//Reset parameters for displaying the loaded structure.
|
|
@@ -54160,7 +54916,7 @@ class iCn3DUI {
|
|
|
54160
54916
|
//even when multiple iCn3D viewers are shown together.
|
|
54161
54917
|
this.pre = this.cfg.divid + "_";
|
|
54162
54918
|
|
|
54163
|
-
this.REVISION = '3.
|
|
54919
|
+
this.REVISION = '3.5.0';
|
|
54164
54920
|
|
|
54165
54921
|
// In nodejs, iCn3D defines "window = {navigator: {}}"
|
|
54166
54922
|
this.bNode = (Object.keys(window).length < 2) ? true : false;
|
|
@@ -54206,7 +54962,7 @@ class iCn3DUI {
|
|
|
54206
54962
|
iCn3DUI.prototype.show3DStructure = function() { let me = this;
|
|
54207
54963
|
let thisClass = this;
|
|
54208
54964
|
me.deferred = $.Deferred(function() {
|
|
54209
|
-
if(me.cfg.
|
|
54965
|
+
if(me.cfg.menuicon) {
|
|
54210
54966
|
me.htmlCls.wifiStr = '<i class="icn3d-wifi" title="requires internet"> </i>';
|
|
54211
54967
|
me.htmlCls.licenseStr = '<i class="icn3d-license" title="requires license"> </i>';
|
|
54212
54968
|
}
|
|
@@ -54337,7 +55093,7 @@ iCn3DUI.prototype.show3DStructure = function() { let me = this;
|
|
|
54337
55093
|
|
|
54338
55094
|
ic.loadCmd = 'load url ' + url + ' | type ' + type;
|
|
54339
55095
|
me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
|
|
54340
|
-
ic.pdbParserCls.downloadUrl(url, type);
|
|
55096
|
+
ic.pdbParserCls.downloadUrl(url, type, me.cfg.command);
|
|
54341
55097
|
}
|
|
54342
55098
|
else if(me.cfg.mmtfid !== undefined) {
|
|
54343
55099
|
ic.inputid = me.cfg.mmtfid;
|
|
@@ -54388,7 +55144,16 @@ iCn3DUI.prototype.show3DStructure = function() { let me = this;
|
|
|
54388
55144
|
// custom seqeunce has query_id such as "Query_78989" in BLAST
|
|
54389
55145
|
if(me.cfg.query_id.substr(0,5) !== 'Query' && me.cfg.rid === undefined) {
|
|
54390
55146
|
ic.inputid = me.cfg.query_id + '_' + me.cfg.blast_rep_id;
|
|
54391
|
-
|
|
55147
|
+
|
|
55148
|
+
if(me.cfg.alg == 'smithwm') {
|
|
55149
|
+
ic.loadCmd = 'load seq_struct_ids_smithwm ' + me.cfg.query_id + ',' + me.cfg.blast_rep_id;
|
|
55150
|
+
ic.bSmithwm = true;
|
|
55151
|
+
}
|
|
55152
|
+
else {
|
|
55153
|
+
ic.loadCmd = 'load seq_struct_ids ' + me.cfg.query_id + ',' + me.cfg.blast_rep_id;
|
|
55154
|
+
ic.bSmithwm = false;
|
|
55155
|
+
}
|
|
55156
|
+
|
|
54392
55157
|
me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
|
|
54393
55158
|
ic.mmdbParserCls.downloadBlast_rep_id(me.cfg.query_id + ',' + me.cfg.blast_rep_id);
|
|
54394
55159
|
}
|
|
@@ -54628,6 +55393,7 @@ class printMsg {
|
|
|
54628
55393
|
|
|
54629
55394
|
exports.AddTrack = AddTrack;
|
|
54630
55395
|
exports.AlignParser = AlignParser;
|
|
55396
|
+
exports.AlignSW = AlignSW;
|
|
54631
55397
|
exports.AlignSeq = AlignSeq;
|
|
54632
55398
|
exports.Alternate = Alternate;
|
|
54633
55399
|
exports.Analysis = Analysis;
|