icn3d 3.45.1 → 3.45.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/icn3d.css +49 -49
- package/icn3d.js +114 -88
- package/icn3d.min.js +3 -3
- package/icn3d.module.js +114 -88
- package/package.json +1 -1
package/icn3d.module.js
CHANGED
|
@@ -59810,7 +59810,7 @@ class SetMenu {
|
|
|
59810
59810
|
html += this.setTools();
|
|
59811
59811
|
|
|
59812
59812
|
// show title at the top left corner
|
|
59813
|
-
html += me.htmlCls.divStr + "title' class='icn3d-commandTitle' style='
|
|
59813
|
+
html += me.htmlCls.divStr + "title' class='icn3d-commandTitle icn3d-title' style='display:table-row; margin: 85px 0px 0px 5px; color:" + titleColor + "; width:" + me.htmlCls.WIDTH + "px'></div>";
|
|
59814
59814
|
|
|
59815
59815
|
html += me.htmlCls.divStr + "viewer' style='position:relative; width:100%; height:100%; background-color: " + me.htmlCls.GREYD + ";'>";
|
|
59816
59816
|
|
|
@@ -59944,7 +59944,7 @@ class SetMenu {
|
|
|
59944
59944
|
//html += me.htmlCls.setMenuCls.setTools();
|
|
59945
59945
|
|
|
59946
59946
|
// show title at the top left corner
|
|
59947
|
-
html += me.htmlCls.divStr + "title' class='icn3d-commandTitle' style='
|
|
59947
|
+
html += me.htmlCls.divStr + "title' class='icn3d-commandTitle icn3d-title' style='display:block; margin: 12px 0px 0px 40px; color:" + titleColor + "; width:" +(me.htmlCls.WIDTH - 40).toString() + "px'></div>";
|
|
59948
59948
|
html += me.htmlCls.divStr + "viewer' style='position:relative; width:100%; height:100%; background-color: " + me.htmlCls.GREYD + ";'>";
|
|
59949
59949
|
// don't show legend in mobile
|
|
59950
59950
|
//html += me.htmlCls.divStr + "legend' class='icn3d-text icn3d-legend'></div>";
|
|
@@ -75144,7 +75144,7 @@ class Scene {
|
|
|
75144
75144
|
ic.shininess = shininess;
|
|
75145
75145
|
}
|
|
75146
75146
|
|
|
75147
|
-
if(!me.bNode && me.htmlCls.setHtmlCls.getCookie('light1') != '') {
|
|
75147
|
+
if(!me.bNode && me.htmlCls.setHtmlCls.getCookie('light1') != '' && !me.bNode && me.htmlCls.setHtmlCls.getCookie('light2') != '' && !me.bNode && me.htmlCls.setHtmlCls.getCookie('light3') != '') {
|
|
75148
75148
|
let light1 = parseFloat(me.htmlCls.setHtmlCls.getCookie('light1'));
|
|
75149
75149
|
let light2 = parseFloat(me.htmlCls.setHtmlCls.getCookie('light2'));
|
|
75150
75150
|
let light3 = parseFloat(me.htmlCls.setHtmlCls.getCookie('light3'));
|
|
@@ -79894,19 +79894,25 @@ class Tube {
|
|
|
79894
79894
|
//mesh = new THREE.Mesh(geo, new THREE.MeshPhongMaterial({ transparent: true, opacity: 0.5, specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, vertexColors: THREE.FaceColors, side: THREE.DoubleSide }));
|
|
79895
79895
|
mesh = new Mesh$1(geo, new MeshPhongMaterial({ transparent: true, opacity: 0.5, specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, vertexColors: true, side: DoubleSide$1 }));
|
|
79896
79896
|
|
|
79897
|
-
if(ic.mdl)
|
|
79897
|
+
if(ic.mdl) {
|
|
79898
|
+
ic.mdl.add(mesh);
|
|
79899
|
+
}
|
|
79898
79900
|
}
|
|
79899
79901
|
else if(bHighlight === 1) {
|
|
79900
79902
|
mesh = new Mesh$1(geo, ic.matShader);
|
|
79901
79903
|
mesh.renderOrder = ic.renderOrderPicking;
|
|
79902
79904
|
//ic.mdlPicking.add(mesh);
|
|
79903
|
-
if(ic.mdl)
|
|
79905
|
+
if(ic.mdl) {
|
|
79906
|
+
ic.mdl.add(mesh);
|
|
79907
|
+
}
|
|
79904
79908
|
}
|
|
79905
79909
|
else {
|
|
79906
79910
|
//mesh = new THREE.Mesh(geo, new THREE.MeshPhongMaterial({ specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, vertexColors: THREE.FaceColors, side: THREE.DoubleSide }));
|
|
79907
79911
|
mesh = new Mesh$1(geo, new MeshPhongMaterial({ specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, vertexColors: true, side: DoubleSide$1 }));
|
|
79908
79912
|
|
|
79909
|
-
if(ic.mdl)
|
|
79913
|
+
if(ic.mdl) {
|
|
79914
|
+
ic.mdl.add(mesh);
|
|
79915
|
+
}
|
|
79910
79916
|
}
|
|
79911
79917
|
|
|
79912
79918
|
if(bHighlight === 1 || bHighlight === 2) {
|
|
@@ -84304,7 +84310,11 @@ class ApplyClbonds {
|
|
|
84304
84310
|
applyClbondsOptions(options) { let ic = this.icn3d, me = ic.icn3dui;
|
|
84305
84311
|
if(options === undefined) options = ic.opts;
|
|
84306
84312
|
|
|
84307
|
-
|
|
84313
|
+
ic.lines['clbond'] = [];
|
|
84314
|
+
|
|
84315
|
+
if(options.chemicals == 'nothing') return {};
|
|
84316
|
+
|
|
84317
|
+
// if(!ic.bCalcCrossLink) {
|
|
84308
84318
|
// find all bonds to chemicals
|
|
84309
84319
|
ic.clbondpnts = {};
|
|
84310
84320
|
ic.clbondResid2serial = {};
|
|
@@ -84315,10 +84325,11 @@ class ApplyClbonds {
|
|
|
84315
84325
|
// chemical to protein/nucleotide
|
|
84316
84326
|
this.applyClbondsOptions_base('all');
|
|
84317
84327
|
|
|
84318
|
-
|
|
84319
|
-
|
|
84328
|
+
// ic.bCalcCrossLink = true;
|
|
84329
|
+
// }
|
|
84320
84330
|
|
|
84321
|
-
|
|
84331
|
+
// if (options.clbonds.toLowerCase() === 'yes' && options.chemicals !== 'nothing') {
|
|
84332
|
+
if (options.clbonds.toLowerCase() === 'yes') {
|
|
84322
84333
|
let color = '#006400';
|
|
84323
84334
|
me.parasCls.thr(0x006400);
|
|
84324
84335
|
|
|
@@ -84344,7 +84355,8 @@ class ApplyClbonds {
|
|
|
84344
84355
|
line.serial1 = ic.clbondResid2serial[resid0 + ',' + resid1];
|
|
84345
84356
|
line.serial2 = ic.clbondResid2serial[resid1 + ',' + resid0];
|
|
84346
84357
|
|
|
84347
|
-
|
|
84358
|
+
// only apply to displayed atoms
|
|
84359
|
+
// if(!ic.dAtoms.hasOwnProperty(line.serial1) || !ic.dAtoms.hasOwnProperty(line.serial2)) continue;
|
|
84348
84360
|
|
|
84349
84361
|
line.position1 = ic.atoms[line.serial1].coord;
|
|
84350
84362
|
line.position2 = ic.atoms[line.serial2].coord;
|
|
@@ -84376,9 +84388,14 @@ class ApplyClbonds {
|
|
|
84376
84388
|
return ic.residuesHashClbonds;
|
|
84377
84389
|
}
|
|
84378
84390
|
|
|
84379
|
-
applyClbondsOptions_base(type) { let ic = this.icn3d
|
|
84391
|
+
applyClbondsOptions_base(type) { let ic = this.icn3d, me = ic.icn3dui;
|
|
84392
|
+
// only apply to displayed atoms
|
|
84393
|
+
let atomHash = me.hashUtilsCls.cloneHash(ic.chemicals);
|
|
84394
|
+
atomHash = me.hashUtilsCls.intHash(atomHash, ic.dAtoms);
|
|
84395
|
+
|
|
84380
84396
|
// chemical to chemical first
|
|
84381
|
-
|
|
84397
|
+
// for (let i in ic.chemicals) {
|
|
84398
|
+
for (let i in atomHash) {
|
|
84382
84399
|
let atom0 = ic.atoms[i];
|
|
84383
84400
|
|
|
84384
84401
|
let chain0 = atom0.structure + '_' + atom0.chain;
|
|
@@ -86973,24 +86990,27 @@ class Instancing {
|
|
|
86973
86990
|
let normalArray2 = (baseGeometry.attributes.normal) ? me.hashUtilsCls.hashvalue2array(baseGeometry.attributes.normal.array) : [];
|
|
86974
86991
|
let colorArray2 = (baseGeometry.attributes.color) ? me.hashUtilsCls.hashvalue2array(baseGeometry.attributes.color.array) : [];
|
|
86975
86992
|
let indexArray2 = (baseGeometry.index) ? me.hashUtilsCls.hashvalue2array(baseGeometry.index.array) : [];
|
|
86993
|
+
|
|
86994
|
+
if(colorArray2.length > 0) { // avoid an black object in the center of of assembly, e.g., https://www.ncbi.nlm.nih.gov/Structure/icn3d/?pdbid=1qqp
|
|
86995
|
+
positionArray = positionArray.concat(positionArray2);
|
|
86996
|
+
normalArray = normalArray.concat(normalArray2);
|
|
86997
|
+
colorArray = colorArray.concat(colorArray2);
|
|
86998
|
+
indexArray = indexArray.concat(indexArray2);
|
|
86976
86999
|
|
|
86977
|
-
|
|
86978
|
-
|
|
86979
|
-
|
|
86980
|
-
|
|
86981
|
-
|
|
86982
|
-
|
|
86983
|
-
let bCylinder = (baseGeometry.type == 'CylinderGeometry') ? 1.0 : 0.0;
|
|
86984
|
-
for(let i = 0, il = positionArray.length / 3; i < il; ++i) {
|
|
86985
|
-
bCylinderArray.push(bCylinder);
|
|
86986
|
-
}
|
|
87000
|
+
let bCylinderArray = [];
|
|
87001
|
+
let bCylinder = (baseGeometry.type == 'CylinderGeometry') ? 1.0 : 0.0;
|
|
87002
|
+
// let bCylinder = (baseGeometry.geometry.type == 'CylinderGeometry') ? 1.0 : 0.0;
|
|
87003
|
+
for(let i = 0, il = positionArray.length / 3; i < il; ++i) {
|
|
87004
|
+
bCylinderArray.push(bCylinder);
|
|
87005
|
+
}
|
|
86987
87006
|
|
|
86988
|
-
|
|
86989
|
-
|
|
86990
|
-
|
|
87007
|
+
geometry.setAttribute('position', new BufferAttribute$1(new Float32Array(positionArray), 3));
|
|
87008
|
+
geometry.setAttribute('normal', new BufferAttribute$1(new Float32Array(normalArray), 3) );
|
|
87009
|
+
geometry.setAttribute('color', new BufferAttribute$1(new Float32Array(colorArray), 3) );
|
|
86991
87010
|
|
|
86992
|
-
|
|
86993
|
-
|
|
87011
|
+
geometry.setAttribute('cylinder', new BufferAttribute$1(new Float32Array(bCylinderArray), 1) );
|
|
87012
|
+
geometry.setIndex(new BufferAttribute$1(new Uint32Array(indexArray), 1));
|
|
87013
|
+
}
|
|
86994
87014
|
|
|
86995
87015
|
positionArray2 = null;
|
|
86996
87016
|
normalArray2 = null;
|
|
@@ -87052,7 +87072,7 @@ class Instancing {
|
|
|
87052
87072
|
|
|
87053
87073
|
let mesh2 = new Mesh$1(geometry, ic.instancedMaterial);
|
|
87054
87074
|
|
|
87055
|
-
mesh2.onBeforeRender = ic.impostorCls.onBeforeRender;
|
|
87075
|
+
if(ic.bImpo) mesh2.onBeforeRender = ic.impostorCls.onBeforeRender;
|
|
87056
87076
|
//mesh2.onBeforeRender = this.onBeforeRender;
|
|
87057
87077
|
|
|
87058
87078
|
// important: https://stackoverflow.com/questions/21184061/mesh-suddenly-disappears-in-three-js-clipping
|
|
@@ -87278,7 +87298,7 @@ class Alternate {
|
|
|
87278
87298
|
|
|
87279
87299
|
//ic.glycanCls.showGlycans();
|
|
87280
87300
|
|
|
87281
|
-
ic.opts['rotationcenter'] = 'highlight center';
|
|
87301
|
+
// ic.opts['rotationcenter'] = 'highlight center';
|
|
87282
87302
|
|
|
87283
87303
|
ic.drawCls.draw();
|
|
87284
87304
|
|
|
@@ -92411,6 +92431,7 @@ class AnnoIg {
|
|
|
92411
92431
|
html2 += htmlCnt + '<span class="icn3d-seqLine">';
|
|
92412
92432
|
|
|
92413
92433
|
if(ic.seqStartLen && ic.seqStartLen[chnid]) html2 += ic.showSeqCls.insertMulGapOverview(chnid, ic.seqStartLen[chnid]);
|
|
92434
|
+
// if(ic.seqStartLen && ic.seqStartLen[chnid]) html += ic.showSeqCls.insertMulGap(ic.seqStartLen[chnid], '-');
|
|
92414
92435
|
|
|
92415
92436
|
let prevDomainindex, color;
|
|
92416
92437
|
for(let i = 0, il = fromArray.length; i < il; ++i) {
|
|
@@ -96950,7 +96971,7 @@ class AddTrack {
|
|
|
96950
96971
|
|
|
96951
96972
|
// adjust the total length
|
|
96952
96973
|
if(ic.maxAnnoLength < ic.maxAnnoLengthOri + ic.seqStartLen[chainid] + ic.seqEndLen[chainid]) {
|
|
96953
|
-
|
|
96974
|
+
ic.maxAnnoLength = ic.maxAnnoLengthOri + ic.seqStartLen[chainid] + ic.seqEndLen[chainid];
|
|
96954
96975
|
}
|
|
96955
96976
|
|
|
96956
96977
|
// do not remove other tracks
|
|
@@ -97251,6 +97272,9 @@ class AddTrack {
|
|
|
97251
97272
|
|
|
97252
97273
|
me.htmlCls.clickMenuCls.setLogCmd("add exon track | chainid " + chainid + " | geneid " + geneid + " | startpos " + startpos + " | type " + type, true);
|
|
97253
97274
|
me.htmlCls.clickMenuCls.setLogCmd("set annotation custom", true);
|
|
97275
|
+
|
|
97276
|
+
// reset annotation tracks since exons may add extra space to the N-terminal
|
|
97277
|
+
ic.annotationCls.resetAnnoTabAll();
|
|
97254
97278
|
}
|
|
97255
97279
|
|
|
97256
97280
|
async addMsaTracks(chainid, startpos, type, fastaList) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -97529,9 +97553,14 @@ class Annotation {
|
|
|
97529
97553
|
$("[id^=" + ic.pre + "transmem]").hide();
|
|
97530
97554
|
if($("#" + ic.pre + "anno_transmem").length) $("#" + ic.pre + "anno_transmem")[0].checked = false;
|
|
97531
97555
|
}
|
|
97532
|
-
async setAnnoTabIg(bSelection, template) { let ic = this.icn3d
|
|
97556
|
+
async setAnnoTabIg(bSelection, template) { let ic = this.icn3d, me = ic.icn3dui;
|
|
97557
|
+
let selAtoms = me.hashUtilsCls.cloneHash(ic.hAtoms);
|
|
97558
|
+
|
|
97533
97559
|
await this.updateIg(bSelection, template);
|
|
97534
97560
|
|
|
97561
|
+
// preserve previous selection
|
|
97562
|
+
ic.hAtoms = me.hashUtilsCls.cloneHash(selAtoms);
|
|
97563
|
+
|
|
97535
97564
|
$("[id^=" + ic.pre + "ig]").show();
|
|
97536
97565
|
if($("#" + ic.pre + "anno_ig").length) $("#" + ic.pre + "anno_ig")[0].checked = true;
|
|
97537
97566
|
}
|
|
@@ -106530,7 +106559,7 @@ class MmcifParser {
|
|
|
106530
106559
|
///// if(ic.deferredSymmetry !== undefined) ic.deferredSymmetry.resolve();
|
|
106531
106560
|
}
|
|
106532
106561
|
catch (err) {
|
|
106533
|
-
if(!me.bNode) console.log("
|
|
106562
|
+
if(!me.bNode) console.log("downloadMmcifSymmetry issues: " + err);
|
|
106534
106563
|
return;
|
|
106535
106564
|
}
|
|
106536
106565
|
}
|
|
@@ -106605,7 +106634,7 @@ class MmdbParser {
|
|
|
106605
106634
|
this.getNoData(mmdbid, bGi);
|
|
106606
106635
|
return;
|
|
106607
106636
|
}
|
|
106608
|
-
|
|
106637
|
+
|
|
106609
106638
|
if(Object.keys(data.atoms).length == 0) { // for large structures such as 3J3Q
|
|
106610
106639
|
// use mmtfid
|
|
106611
106640
|
let pdbid = data.pdbId;
|
|
@@ -111897,7 +111926,7 @@ class ParserUtils {
|
|
|
111897
111926
|
getResiNCBI(chainid, resi) { let ic = this.icn3d; ic.icn3dui;
|
|
111898
111927
|
let residNCBI = ic.resid2ncbi[chainid + '_' + resi];
|
|
111899
111928
|
let resiNCBI = (residNCBI) ? parseInt(residNCBI.substr(residNCBI.lastIndexOf('_') + 1)) : 0;
|
|
111900
|
-
|
|
111929
|
+
|
|
111901
111930
|
return resiNCBI;
|
|
111902
111931
|
}
|
|
111903
111932
|
}
|
|
@@ -113318,7 +113347,7 @@ class SetSeqAlign {
|
|
|
113318
113347
|
// start and end of MSA
|
|
113319
113348
|
let start_t = 9999, end_t = -1;
|
|
113320
113349
|
|
|
113321
|
-
|
|
113350
|
+
ic.chainsSeq[chainid1][0].resi - 1;
|
|
113322
113351
|
|
|
113323
113352
|
for(let index = 1, indexl = chainidArray.length; index < indexl; ++index) {
|
|
113324
113353
|
let chainIndex = index - 1;
|
|
@@ -113328,34 +113357,25 @@ class SetSeqAlign {
|
|
|
113328
113357
|
for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
|
|
113329
113358
|
let start1, end1;
|
|
113330
113359
|
|
|
113331
|
-
//
|
|
113332
|
-
//
|
|
113333
|
-
|
|
113334
|
-
|
|
113335
|
-
|
|
113336
|
-
|
|
113337
|
-
start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start) - 1;
|
|
113338
|
-
end1 = parseInt(ic.qt_start_end[chainIndex][i].t_end) - 1;
|
|
113339
|
-
// }
|
|
113360
|
+
// start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start) - 1;
|
|
113361
|
+
// end1 = parseInt(ic.qt_start_end[chainIndex][i].t_end) - 1;
|
|
113362
|
+
|
|
113363
|
+
start1 = ic.ParserUtilsCls.getResiNCBI(chainid1, ic.qt_start_end[chainIndex][i].t_start) - 1;
|
|
113364
|
+
end1 = ic.ParserUtilsCls.getResiNCBI(chainid1, ic.qt_start_end[chainIndex][i].t_end) - 1;
|
|
113365
|
+
|
|
113340
113366
|
for(let j = start1; j <= end1; ++j) {
|
|
113341
113367
|
let resi, resid;
|
|
113342
113368
|
|
|
113343
|
-
//
|
|
113344
|
-
//
|
|
113369
|
+
// let resiPos;
|
|
113370
|
+
// if(me.cfg.aligntool == 'tmalign') {
|
|
113371
|
+
// resiPos = j - baseResi;
|
|
113345
113372
|
// }
|
|
113346
113373
|
// else {
|
|
113347
|
-
|
|
113348
|
-
let resiPos;
|
|
113349
|
-
if(me.cfg.aligntool == 'tmalign') {
|
|
113350
|
-
resiPos = j - baseResi;
|
|
113351
|
-
}
|
|
113352
|
-
else {
|
|
113353
|
-
// resiPos = (bRealign) ? j : j - baseResi;
|
|
113354
|
-
resiPos = j;
|
|
113355
|
-
}
|
|
113356
|
-
resi = ic.ParserUtilsCls.getResi(chainidArray[0], resiPos);
|
|
113357
|
-
resid = chainidArray[0] + '_' + resi;
|
|
113374
|
+
// resiPos = j;
|
|
113358
113375
|
// }
|
|
113376
|
+
let resiPos = j;
|
|
113377
|
+
resi = ic.ParserUtilsCls.getResi(chainidArray[0], resiPos);
|
|
113378
|
+
resid = chainidArray[0] + '_' + resi;
|
|
113359
113379
|
|
|
113360
113380
|
resid2range_t[resid] = 1;
|
|
113361
113381
|
if(j < start_t) start_t = j;
|
|
@@ -113415,7 +113435,8 @@ class SetSeqAlign {
|
|
|
113415
113435
|
let resi = ic.chainsSeq[chainid1][j].resi;
|
|
113416
113436
|
let resid = chainid1 + '_' + resi;
|
|
113417
113437
|
|
|
113418
|
-
let jAdjusted = (me.cfg.aligntool != 'tmalign') ? j : j + baseResi;
|
|
113438
|
+
// let jAdjusted = (me.cfg.aligntool != 'tmalign') ? j : j + baseResi;
|
|
113439
|
+
let jAdjusted = ic.ParserUtilsCls.getResiNCBI(chainid1, resi) - 1;
|
|
113419
113440
|
|
|
113420
113441
|
//if(j + baseResi < start_t || j + baseResi > end_t) {
|
|
113421
113442
|
if(jAdjusted < start_t || jAdjusted > end_t) {
|
|
@@ -113604,8 +113625,10 @@ class SetSeqAlign {
|
|
|
113604
113625
|
insertNotAlignRes(chainid, start, len, bRealign) { let ic = this.icn3d; ic.icn3dui;
|
|
113605
113626
|
// insert non-aligned residues in query seq
|
|
113606
113627
|
for(let j = 0, jl = len; j < jl; ++j) {
|
|
113607
|
-
let resi2 = ic.ParserUtilsCls.getResi(chainid, start + j);
|
|
113608
|
-
let resn2 = this.getResn(chainid, start + j);
|
|
113628
|
+
// let resi2 = ic.ParserUtilsCls.getResi(chainid, start + j);
|
|
113629
|
+
// let resn2 = this.getResn(chainid, start + j);
|
|
113630
|
+
let resi2 = start + j;
|
|
113631
|
+
let resn2 = this.getResnFromResi(chainid, resi2);
|
|
113609
113632
|
let resn1 = '-';
|
|
113610
113633
|
let bAlign = false;
|
|
113611
113634
|
let resObject = this.getResObject(chainid, false, bAlign, resi2, resn2, resn1);
|
|
@@ -113613,13 +113636,15 @@ class SetSeqAlign {
|
|
|
113613
113636
|
}
|
|
113614
113637
|
}
|
|
113615
113638
|
|
|
113616
|
-
|
|
113617
|
-
let startResi = ic.ParserUtilsCls.getResi(chainid1, start);
|
|
113618
|
-
let endResi = ic.ParserUtilsCls.getResi(chainid1, end);
|
|
113619
|
-
|
|
113639
|
+
getTemplatePosFromOriResi(chainid1, start, end, bRealign) { let ic = this.icn3d; ic.icn3dui;
|
|
113640
|
+
// let startResi = ic.ParserUtilsCls.getResi(chainid1, start);
|
|
113641
|
+
// let endResi = ic.ParserUtilsCls.getResi(chainid1, end);
|
|
113642
|
+
let startResi = start;
|
|
113643
|
+
let endResi = end;
|
|
113644
|
+
|
|
113620
113645
|
let result1 = this.getResiPosInTemplate(chainid1, startResi);
|
|
113621
113646
|
let result2 = this.getResiPosInTemplate(chainid1, endResi);
|
|
113622
|
-
|
|
113647
|
+
|
|
113623
113648
|
return {"pos1": result1.pos, "pos2": result2.pos};
|
|
113624
113649
|
}
|
|
113625
113650
|
|
|
@@ -113684,7 +113709,8 @@ class SetSeqAlign {
|
|
|
113684
113709
|
let result;
|
|
113685
113710
|
|
|
113686
113711
|
for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
|
|
113687
|
-
let start1, start2, end1, end2, resiStart1, start1Pos
|
|
113712
|
+
let start1, start2, end1, end2, resiStart1, start1Pos;
|
|
113713
|
+
|
|
113688
113714
|
if(bRealign && me.cfg.aligntool == 'tmalign') { // real residue numbers are stored
|
|
113689
113715
|
start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start);
|
|
113690
113716
|
start2 = parseInt(ic.qt_start_end[chainIndex][i].q_start);
|
|
@@ -113699,7 +113725,7 @@ class SetSeqAlign {
|
|
|
113699
113725
|
// 1. before the mapped residues
|
|
113700
113726
|
resiStart1 = start1;
|
|
113701
113727
|
start1Pos = this.getPosFromResi(chainid1, ic.qt_start_end[chainIndex][i].t_start);
|
|
113702
|
-
|
|
113728
|
+
this.getPosFromResi(chainid1, ic.qt_start_end[chainIndex][i].t_end);
|
|
113703
113729
|
}
|
|
113704
113730
|
else {
|
|
113705
113731
|
start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start - 1);
|
|
@@ -113710,17 +113736,16 @@ class SetSeqAlign {
|
|
|
113710
113736
|
// 1. before the mapped residues
|
|
113711
113737
|
resiStart1 = ic.ParserUtilsCls.getResi(chainid1, start1);
|
|
113712
113738
|
start1Pos = start1;
|
|
113713
|
-
end1Pos = end1;
|
|
113714
113739
|
}
|
|
113715
113740
|
//let range = resid2range_t[chainid1 + '_' + resiStart1];
|
|
113716
|
-
|
|
113741
|
+
|
|
113717
113742
|
// if the mapping does not start from start_t, add gaps to the query seq
|
|
113718
113743
|
if(i == 0) {
|
|
113719
|
-
//result = this.
|
|
113720
|
-
result = this.
|
|
113744
|
+
//result = this.getTemplatePosFromOriResi(chainid1, start_t, start1, bRealign);
|
|
113745
|
+
result = this.getTemplatePosFromOriResi(chainid1, start_t, start1Pos, bRealign);
|
|
113721
113746
|
pos1 = result.pos1;
|
|
113722
113747
|
pos2 = result.pos2;
|
|
113723
|
-
|
|
113748
|
+
|
|
113724
113749
|
//if(start1 > start_t) {
|
|
113725
113750
|
if(start1Pos > start_t) {
|
|
113726
113751
|
for(let j = 0, jl = pos2 - pos1; j < jl; ++j) {
|
|
@@ -113730,7 +113755,7 @@ class SetSeqAlign {
|
|
|
113730
113755
|
}
|
|
113731
113756
|
else {
|
|
113732
113757
|
//let notAlnLen1 = start1 - (prevIndex1 + 1);
|
|
113733
|
-
result = this.
|
|
113758
|
+
result = this.getTemplatePosFromOriResi(chainid1, prevIndex1, start1, bRealign);
|
|
113734
113759
|
pos1 = result.pos1;
|
|
113735
113760
|
pos2 = result.pos2;
|
|
113736
113761
|
let notAlnLen1 = pos2 - (pos1 + 1);
|
|
@@ -113743,7 +113768,7 @@ class SetSeqAlign {
|
|
|
113743
113768
|
// add gaps before the query sequence
|
|
113744
113769
|
for(let j = 0, jl = notAlnLen1 - notAlnLen2; j < jl; ++j) {
|
|
113745
113770
|
ic.alnChainsSeq[chainid2].push(gapResObject2);
|
|
113746
|
-
}
|
|
113771
|
+
}
|
|
113747
113772
|
}
|
|
113748
113773
|
else {
|
|
113749
113774
|
// check the number of gaps before resiStart1 (n), and insert 'notAlnLen2 - notAlnLen1 - n' gaps
|
|
@@ -113752,8 +113777,8 @@ class SetSeqAlign {
|
|
|
113752
113777
|
}
|
|
113753
113778
|
|
|
113754
113779
|
// 2. In the mapped residues
|
|
113755
|
-
|
|
113756
|
-
result = this.
|
|
113780
|
+
result = this.getTemplatePosFromOriResi(chainid1, start1, end1, bRealign);
|
|
113781
|
+
//result = this.getTemplatePosFromOriResi(chainid1, start1Pos, end1Pos, bRealign);
|
|
113757
113782
|
pos1 = result.pos1;
|
|
113758
113783
|
pos2 = result.pos2;
|
|
113759
113784
|
|
|
@@ -113770,7 +113795,7 @@ class SetSeqAlign {
|
|
|
113770
113795
|
let resi2 = (bRealign) ? start2 + k : ic.ParserUtilsCls.getResi(chainid2, start2 + k);
|
|
113771
113796
|
let resn1 = this.getResnFromResi(chainid1, resi1); //this.getResn(chainid1, start1 + k);
|
|
113772
113797
|
let resn2 = this.getResnFromResi(chainid2, resi2); //this.getResn(chainid2, start2 + k);
|
|
113773
|
-
|
|
113798
|
+
|
|
113774
113799
|
let bAlign = true;
|
|
113775
113800
|
let resObject = this.getResObject(chainid2, false, bAlign, resi2, resn2, resn1);
|
|
113776
113801
|
ic.alnChainsSeq[chainid2].push(resObject);
|
|
@@ -113793,7 +113818,7 @@ class SetSeqAlign {
|
|
|
113793
113818
|
}
|
|
113794
113819
|
|
|
113795
113820
|
// add gaps at the end
|
|
113796
|
-
result = this.
|
|
113821
|
+
result = this.getTemplatePosFromOriResi(chainid1, prevIndex1, end_t, bRealign);
|
|
113797
113822
|
pos1 = result.pos1;
|
|
113798
113823
|
pos2 = result.pos2;
|
|
113799
113824
|
for(let i = pos1; i < pos2; ++i) {
|
|
@@ -116105,7 +116130,7 @@ class Vastplus {
|
|
|
116105
116130
|
}
|
|
116106
116131
|
|
|
116107
116132
|
let allPromise = Promise.allSettled(ajaxArray);
|
|
116108
|
-
try {
|
|
116133
|
+
// try {
|
|
116109
116134
|
let dataArray = await allPromise;
|
|
116110
116135
|
|
|
116111
116136
|
// 2. cluster pairs
|
|
@@ -116117,10 +116142,10 @@ class Vastplus {
|
|
|
116117
116142
|
await ic.pdbParserCls.loadPdbDataRender(true);
|
|
116118
116143
|
|
|
116119
116144
|
/// if(ic.deferredRealignByVastplus !== undefined) ic.deferredRealignByVastplus.resolve();
|
|
116120
|
-
}
|
|
116121
|
-
catch(err) {
|
|
116122
|
-
|
|
116123
|
-
}
|
|
116145
|
+
// }
|
|
116146
|
+
// catch(err) {
|
|
116147
|
+
// var aaa = 1; //alert("There are some problems in aligning the chains...");
|
|
116148
|
+
// }
|
|
116124
116149
|
}
|
|
116125
116150
|
|
|
116126
116151
|
setAlignment(struct1, struct2, chainid1, chainid2, bRealign) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -123171,15 +123196,16 @@ class Dssp {
|
|
|
123171
123196
|
let pdbAjaxArray = this.getPdbAjaxArray();
|
|
123172
123197
|
|
|
123173
123198
|
// try {
|
|
123199
|
+
let numRound = 0;
|
|
123200
|
+
|
|
123174
123201
|
if(!template) {
|
|
123175
123202
|
//let allPromise = Promise.allSettled(pdbAjaxArray);
|
|
123176
123203
|
//ic.pdbDataArray = await allPromise;
|
|
123177
123204
|
|
|
123178
123205
|
ic.pdbDataArray = await this.promiseWithFixedJobs(pdbAjaxArray);
|
|
123179
123206
|
|
|
123180
|
-
let numRound = 0;
|
|
123181
123207
|
let bNoMoreIg = await thisClass.parseRefPdbData(ic.pdbDataArray, template, undefined, numRound);
|
|
123182
|
-
|
|
123208
|
+
++numRound;
|
|
123183
123209
|
|
|
123184
123210
|
//while(!bNoMoreIg) {
|
|
123185
123211
|
while(!bNoMoreIg && numRound < 15) {
|
|
@@ -133668,7 +133694,7 @@ class iCn3DUI {
|
|
|
133668
133694
|
//even when multiple iCn3D viewers are shown together.
|
|
133669
133695
|
this.pre = this.cfg.divid + "_";
|
|
133670
133696
|
|
|
133671
|
-
this.REVISION = '3.45.
|
|
133697
|
+
this.REVISION = '3.45.1';
|
|
133672
133698
|
|
|
133673
133699
|
// In nodejs, iCn3D defines "window = {navigator: {}}", and added window = {navigator: {}, "__THREE__":"177"}
|
|
133674
133700
|
this.bNode = (Object.keys(window).length < 3) ? true : false;
|
|
@@ -134248,7 +134274,7 @@ iCn3DUI.prototype.getXMLHttpRqstPromise = function(url, dataType, responseType,
|
|
|
134248
134274
|
var aaa = 1; //alert("RCSB server has no corresponding electron density map for this structure.");
|
|
134249
134275
|
}
|
|
134250
134276
|
else {
|
|
134251
|
-
|
|
134277
|
+
console.log("The " + mapType + " file is unavailable...");
|
|
134252
134278
|
}
|
|
134253
134279
|
|
|
134254
134280
|
reject('error');
|