icn3d 3.45.2 → 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/icn3d.js +58 -57
- package/icn3d.min.js +3 -3
- package/icn3d.module.js +58 -57
- package/package.json +1 -1
package/icn3d.js
CHANGED
|
@@ -91530,6 +91530,7 @@ class AnnoIg {
|
|
|
91530
91530
|
html2 += htmlCnt + '<span class="icn3d-seqLine">';
|
|
91531
91531
|
|
|
91532
91532
|
if(ic.seqStartLen && ic.seqStartLen[chnid]) html2 += ic.showSeqCls.insertMulGapOverview(chnid, ic.seqStartLen[chnid]);
|
|
91533
|
+
// if(ic.seqStartLen && ic.seqStartLen[chnid]) html += ic.showSeqCls.insertMulGap(ic.seqStartLen[chnid], '-');
|
|
91533
91534
|
|
|
91534
91535
|
let prevDomainindex, color;
|
|
91535
91536
|
for(let i = 0, il = fromArray.length; i < il; ++i) {
|
|
@@ -96069,7 +96070,7 @@ class AddTrack {
|
|
|
96069
96070
|
|
|
96070
96071
|
// adjust the total length
|
|
96071
96072
|
if(ic.maxAnnoLength < ic.maxAnnoLengthOri + ic.seqStartLen[chainid] + ic.seqEndLen[chainid]) {
|
|
96072
|
-
|
|
96073
|
+
ic.maxAnnoLength = ic.maxAnnoLengthOri + ic.seqStartLen[chainid] + ic.seqEndLen[chainid];
|
|
96073
96074
|
}
|
|
96074
96075
|
|
|
96075
96076
|
// do not remove other tracks
|
|
@@ -96370,6 +96371,9 @@ class AddTrack {
|
|
|
96370
96371
|
|
|
96371
96372
|
me.htmlCls.clickMenuCls.setLogCmd("add exon track | chainid " + chainid + " | geneid " + geneid + " | startpos " + startpos + " | type " + type, true);
|
|
96372
96373
|
me.htmlCls.clickMenuCls.setLogCmd("set annotation custom", true);
|
|
96374
|
+
|
|
96375
|
+
// reset annotation tracks since exons may add extra space to the N-terminal
|
|
96376
|
+
ic.annotationCls.resetAnnoTabAll();
|
|
96373
96377
|
}
|
|
96374
96378
|
|
|
96375
96379
|
async addMsaTracks(chainid, startpos, type, fastaList) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -105654,7 +105658,7 @@ class MmcifParser {
|
|
|
105654
105658
|
///// if(ic.deferredSymmetry !== undefined) ic.deferredSymmetry.resolve();
|
|
105655
105659
|
}
|
|
105656
105660
|
catch (err) {
|
|
105657
|
-
if(!me.bNode) console.log("
|
|
105661
|
+
if(!me.bNode) console.log("downloadMmcifSymmetry issues: " + err);
|
|
105658
105662
|
return;
|
|
105659
105663
|
}
|
|
105660
105664
|
}
|
|
@@ -105729,7 +105733,7 @@ class MmdbParser {
|
|
|
105729
105733
|
this.getNoData(mmdbid, bGi);
|
|
105730
105734
|
return;
|
|
105731
105735
|
}
|
|
105732
|
-
|
|
105736
|
+
|
|
105733
105737
|
if(Object.keys(data.atoms).length == 0) { // for large structures such as 3J3Q
|
|
105734
105738
|
// use mmtfid
|
|
105735
105739
|
let pdbid = data.pdbId;
|
|
@@ -111021,7 +111025,7 @@ class ParserUtils {
|
|
|
111021
111025
|
getResiNCBI(chainid, resi) { let ic = this.icn3d; ic.icn3dui;
|
|
111022
111026
|
let residNCBI = ic.resid2ncbi[chainid + '_' + resi];
|
|
111023
111027
|
let resiNCBI = (residNCBI) ? parseInt(residNCBI.substr(residNCBI.lastIndexOf('_') + 1)) : 0;
|
|
111024
|
-
|
|
111028
|
+
|
|
111025
111029
|
return resiNCBI;
|
|
111026
111030
|
}
|
|
111027
111031
|
}
|
|
@@ -112442,7 +112446,7 @@ class SetSeqAlign {
|
|
|
112442
112446
|
// start and end of MSA
|
|
112443
112447
|
let start_t = 9999, end_t = -1;
|
|
112444
112448
|
|
|
112445
|
-
|
|
112449
|
+
ic.chainsSeq[chainid1][0].resi - 1;
|
|
112446
112450
|
|
|
112447
112451
|
for(let index = 1, indexl = chainidArray.length; index < indexl; ++index) {
|
|
112448
112452
|
let chainIndex = index - 1;
|
|
@@ -112452,34 +112456,25 @@ class SetSeqAlign {
|
|
|
112452
112456
|
for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
|
|
112453
112457
|
let start1, end1;
|
|
112454
112458
|
|
|
112455
|
-
//
|
|
112456
|
-
//
|
|
112457
|
-
|
|
112458
|
-
|
|
112459
|
-
|
|
112460
|
-
|
|
112461
|
-
start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start) - 1;
|
|
112462
|
-
end1 = parseInt(ic.qt_start_end[chainIndex][i].t_end) - 1;
|
|
112463
|
-
// }
|
|
112459
|
+
// start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start) - 1;
|
|
112460
|
+
// end1 = parseInt(ic.qt_start_end[chainIndex][i].t_end) - 1;
|
|
112461
|
+
|
|
112462
|
+
start1 = ic.ParserUtilsCls.getResiNCBI(chainid1, ic.qt_start_end[chainIndex][i].t_start) - 1;
|
|
112463
|
+
end1 = ic.ParserUtilsCls.getResiNCBI(chainid1, ic.qt_start_end[chainIndex][i].t_end) - 1;
|
|
112464
|
+
|
|
112464
112465
|
for(let j = start1; j <= end1; ++j) {
|
|
112465
112466
|
let resi, resid;
|
|
112466
112467
|
|
|
112467
|
-
//
|
|
112468
|
-
//
|
|
112468
|
+
// let resiPos;
|
|
112469
|
+
// if(me.cfg.aligntool == 'tmalign') {
|
|
112470
|
+
// resiPos = j - baseResi;
|
|
112469
112471
|
// }
|
|
112470
112472
|
// else {
|
|
112471
|
-
|
|
112472
|
-
let resiPos;
|
|
112473
|
-
if(me.cfg.aligntool == 'tmalign') {
|
|
112474
|
-
resiPos = j - baseResi;
|
|
112475
|
-
}
|
|
112476
|
-
else {
|
|
112477
|
-
// resiPos = (bRealign) ? j : j - baseResi;
|
|
112478
|
-
resiPos = j;
|
|
112479
|
-
}
|
|
112480
|
-
resi = ic.ParserUtilsCls.getResi(chainidArray[0], resiPos);
|
|
112481
|
-
resid = chainidArray[0] + '_' + resi;
|
|
112473
|
+
// resiPos = j;
|
|
112482
112474
|
// }
|
|
112475
|
+
let resiPos = j;
|
|
112476
|
+
resi = ic.ParserUtilsCls.getResi(chainidArray[0], resiPos);
|
|
112477
|
+
resid = chainidArray[0] + '_' + resi;
|
|
112483
112478
|
|
|
112484
112479
|
resid2range_t[resid] = 1;
|
|
112485
112480
|
if(j < start_t) start_t = j;
|
|
@@ -112539,7 +112534,8 @@ class SetSeqAlign {
|
|
|
112539
112534
|
let resi = ic.chainsSeq[chainid1][j].resi;
|
|
112540
112535
|
let resid = chainid1 + '_' + resi;
|
|
112541
112536
|
|
|
112542
|
-
let jAdjusted = (me.cfg.aligntool != 'tmalign') ? j : j + baseResi;
|
|
112537
|
+
// let jAdjusted = (me.cfg.aligntool != 'tmalign') ? j : j + baseResi;
|
|
112538
|
+
let jAdjusted = ic.ParserUtilsCls.getResiNCBI(chainid1, resi) - 1;
|
|
112543
112539
|
|
|
112544
112540
|
//if(j + baseResi < start_t || j + baseResi > end_t) {
|
|
112545
112541
|
if(jAdjusted < start_t || jAdjusted > end_t) {
|
|
@@ -112728,8 +112724,10 @@ class SetSeqAlign {
|
|
|
112728
112724
|
insertNotAlignRes(chainid, start, len, bRealign) { let ic = this.icn3d; ic.icn3dui;
|
|
112729
112725
|
// insert non-aligned residues in query seq
|
|
112730
112726
|
for(let j = 0, jl = len; j < jl; ++j) {
|
|
112731
|
-
let resi2 = ic.ParserUtilsCls.getResi(chainid, start + j);
|
|
112732
|
-
let resn2 = this.getResn(chainid, start + j);
|
|
112727
|
+
// let resi2 = ic.ParserUtilsCls.getResi(chainid, start + j);
|
|
112728
|
+
// let resn2 = this.getResn(chainid, start + j);
|
|
112729
|
+
let resi2 = start + j;
|
|
112730
|
+
let resn2 = this.getResnFromResi(chainid, resi2);
|
|
112733
112731
|
let resn1 = '-';
|
|
112734
112732
|
let bAlign = false;
|
|
112735
112733
|
let resObject = this.getResObject(chainid, false, bAlign, resi2, resn2, resn1);
|
|
@@ -112737,13 +112735,15 @@ class SetSeqAlign {
|
|
|
112737
112735
|
}
|
|
112738
112736
|
}
|
|
112739
112737
|
|
|
112740
|
-
|
|
112741
|
-
let startResi = ic.ParserUtilsCls.getResi(chainid1, start);
|
|
112742
|
-
let endResi = ic.ParserUtilsCls.getResi(chainid1, end);
|
|
112743
|
-
|
|
112738
|
+
getTemplatePosFromOriResi(chainid1, start, end, bRealign) { let ic = this.icn3d; ic.icn3dui;
|
|
112739
|
+
// let startResi = ic.ParserUtilsCls.getResi(chainid1, start);
|
|
112740
|
+
// let endResi = ic.ParserUtilsCls.getResi(chainid1, end);
|
|
112741
|
+
let startResi = start;
|
|
112742
|
+
let endResi = end;
|
|
112743
|
+
|
|
112744
112744
|
let result1 = this.getResiPosInTemplate(chainid1, startResi);
|
|
112745
112745
|
let result2 = this.getResiPosInTemplate(chainid1, endResi);
|
|
112746
|
-
|
|
112746
|
+
|
|
112747
112747
|
return {"pos1": result1.pos, "pos2": result2.pos};
|
|
112748
112748
|
}
|
|
112749
112749
|
|
|
@@ -112808,7 +112808,8 @@ class SetSeqAlign {
|
|
|
112808
112808
|
let result;
|
|
112809
112809
|
|
|
112810
112810
|
for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
|
|
112811
|
-
let start1, start2, end1, end2, resiStart1, start1Pos
|
|
112811
|
+
let start1, start2, end1, end2, resiStart1, start1Pos;
|
|
112812
|
+
|
|
112812
112813
|
if(bRealign && me.cfg.aligntool == 'tmalign') { // real residue numbers are stored
|
|
112813
112814
|
start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start);
|
|
112814
112815
|
start2 = parseInt(ic.qt_start_end[chainIndex][i].q_start);
|
|
@@ -112823,7 +112824,7 @@ class SetSeqAlign {
|
|
|
112823
112824
|
// 1. before the mapped residues
|
|
112824
112825
|
resiStart1 = start1;
|
|
112825
112826
|
start1Pos = this.getPosFromResi(chainid1, ic.qt_start_end[chainIndex][i].t_start);
|
|
112826
|
-
|
|
112827
|
+
this.getPosFromResi(chainid1, ic.qt_start_end[chainIndex][i].t_end);
|
|
112827
112828
|
}
|
|
112828
112829
|
else {
|
|
112829
112830
|
start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start - 1);
|
|
@@ -112834,17 +112835,16 @@ class SetSeqAlign {
|
|
|
112834
112835
|
// 1. before the mapped residues
|
|
112835
112836
|
resiStart1 = ic.ParserUtilsCls.getResi(chainid1, start1);
|
|
112836
112837
|
start1Pos = start1;
|
|
112837
|
-
end1Pos = end1;
|
|
112838
112838
|
}
|
|
112839
112839
|
//let range = resid2range_t[chainid1 + '_' + resiStart1];
|
|
112840
|
-
|
|
112840
|
+
|
|
112841
112841
|
// if the mapping does not start from start_t, add gaps to the query seq
|
|
112842
112842
|
if(i == 0) {
|
|
112843
|
-
//result = this.
|
|
112844
|
-
result = this.
|
|
112843
|
+
//result = this.getTemplatePosFromOriResi(chainid1, start_t, start1, bRealign);
|
|
112844
|
+
result = this.getTemplatePosFromOriResi(chainid1, start_t, start1Pos, bRealign);
|
|
112845
112845
|
pos1 = result.pos1;
|
|
112846
112846
|
pos2 = result.pos2;
|
|
112847
|
-
|
|
112847
|
+
|
|
112848
112848
|
//if(start1 > start_t) {
|
|
112849
112849
|
if(start1Pos > start_t) {
|
|
112850
112850
|
for(let j = 0, jl = pos2 - pos1; j < jl; ++j) {
|
|
@@ -112854,7 +112854,7 @@ class SetSeqAlign {
|
|
|
112854
112854
|
}
|
|
112855
112855
|
else {
|
|
112856
112856
|
//let notAlnLen1 = start1 - (prevIndex1 + 1);
|
|
112857
|
-
result = this.
|
|
112857
|
+
result = this.getTemplatePosFromOriResi(chainid1, prevIndex1, start1, bRealign);
|
|
112858
112858
|
pos1 = result.pos1;
|
|
112859
112859
|
pos2 = result.pos2;
|
|
112860
112860
|
let notAlnLen1 = pos2 - (pos1 + 1);
|
|
@@ -112867,7 +112867,7 @@ class SetSeqAlign {
|
|
|
112867
112867
|
// add gaps before the query sequence
|
|
112868
112868
|
for(let j = 0, jl = notAlnLen1 - notAlnLen2; j < jl; ++j) {
|
|
112869
112869
|
ic.alnChainsSeq[chainid2].push(gapResObject2);
|
|
112870
|
-
}
|
|
112870
|
+
}
|
|
112871
112871
|
}
|
|
112872
112872
|
else {
|
|
112873
112873
|
// check the number of gaps before resiStart1 (n), and insert 'notAlnLen2 - notAlnLen1 - n' gaps
|
|
@@ -112876,8 +112876,8 @@ class SetSeqAlign {
|
|
|
112876
112876
|
}
|
|
112877
112877
|
|
|
112878
112878
|
// 2. In the mapped residues
|
|
112879
|
-
|
|
112880
|
-
result = this.
|
|
112879
|
+
result = this.getTemplatePosFromOriResi(chainid1, start1, end1, bRealign);
|
|
112880
|
+
//result = this.getTemplatePosFromOriResi(chainid1, start1Pos, end1Pos, bRealign);
|
|
112881
112881
|
pos1 = result.pos1;
|
|
112882
112882
|
pos2 = result.pos2;
|
|
112883
112883
|
|
|
@@ -112894,7 +112894,7 @@ class SetSeqAlign {
|
|
|
112894
112894
|
let resi2 = (bRealign) ? start2 + k : ic.ParserUtilsCls.getResi(chainid2, start2 + k);
|
|
112895
112895
|
let resn1 = this.getResnFromResi(chainid1, resi1); //this.getResn(chainid1, start1 + k);
|
|
112896
112896
|
let resn2 = this.getResnFromResi(chainid2, resi2); //this.getResn(chainid2, start2 + k);
|
|
112897
|
-
|
|
112897
|
+
|
|
112898
112898
|
let bAlign = true;
|
|
112899
112899
|
let resObject = this.getResObject(chainid2, false, bAlign, resi2, resn2, resn1);
|
|
112900
112900
|
ic.alnChainsSeq[chainid2].push(resObject);
|
|
@@ -112917,7 +112917,7 @@ class SetSeqAlign {
|
|
|
112917
112917
|
}
|
|
112918
112918
|
|
|
112919
112919
|
// add gaps at the end
|
|
112920
|
-
result = this.
|
|
112920
|
+
result = this.getTemplatePosFromOriResi(chainid1, prevIndex1, end_t, bRealign);
|
|
112921
112921
|
pos1 = result.pos1;
|
|
112922
112922
|
pos2 = result.pos2;
|
|
112923
112923
|
for(let i = pos1; i < pos2; ++i) {
|
|
@@ -115229,7 +115229,7 @@ class Vastplus {
|
|
|
115229
115229
|
}
|
|
115230
115230
|
|
|
115231
115231
|
let allPromise = Promise.allSettled(ajaxArray);
|
|
115232
|
-
try {
|
|
115232
|
+
// try {
|
|
115233
115233
|
let dataArray = await allPromise;
|
|
115234
115234
|
|
|
115235
115235
|
// 2. cluster pairs
|
|
@@ -115241,10 +115241,10 @@ class Vastplus {
|
|
|
115241
115241
|
await ic.pdbParserCls.loadPdbDataRender(true);
|
|
115242
115242
|
|
|
115243
115243
|
/// if(ic.deferredRealignByVastplus !== undefined) ic.deferredRealignByVastplus.resolve();
|
|
115244
|
-
}
|
|
115245
|
-
catch(err) {
|
|
115246
|
-
|
|
115247
|
-
}
|
|
115244
|
+
// }
|
|
115245
|
+
// catch(err) {
|
|
115246
|
+
// var aaa = 1; //alert("There are some problems in aligning the chains...");
|
|
115247
|
+
// }
|
|
115248
115248
|
}
|
|
115249
115249
|
|
|
115250
115250
|
setAlignment(struct1, struct2, chainid1, chainid2, bRealign) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -122295,15 +122295,16 @@ class Dssp {
|
|
|
122295
122295
|
let pdbAjaxArray = this.getPdbAjaxArray();
|
|
122296
122296
|
|
|
122297
122297
|
// try {
|
|
122298
|
+
let numRound = 0;
|
|
122299
|
+
|
|
122298
122300
|
if(!template) {
|
|
122299
122301
|
//let allPromise = Promise.allSettled(pdbAjaxArray);
|
|
122300
122302
|
//ic.pdbDataArray = await allPromise;
|
|
122301
122303
|
|
|
122302
122304
|
ic.pdbDataArray = await this.promiseWithFixedJobs(pdbAjaxArray);
|
|
122303
122305
|
|
|
122304
|
-
let numRound = 0;
|
|
122305
122306
|
let bNoMoreIg = await thisClass.parseRefPdbData(ic.pdbDataArray, template, undefined, numRound);
|
|
122306
|
-
|
|
122307
|
+
++numRound;
|
|
122307
122308
|
|
|
122308
122309
|
//while(!bNoMoreIg) {
|
|
122309
122310
|
while(!bNoMoreIg && numRound < 15) {
|
|
@@ -132792,7 +132793,7 @@ class iCn3DUI {
|
|
|
132792
132793
|
//even when multiple iCn3D viewers are shown together.
|
|
132793
132794
|
this.pre = this.cfg.divid + "_";
|
|
132794
132795
|
|
|
132795
|
-
this.REVISION = '3.45.
|
|
132796
|
+
this.REVISION = '3.45.1';
|
|
132796
132797
|
|
|
132797
132798
|
// In nodejs, iCn3D defines "window = {navigator: {}}", and added window = {navigator: {}, "__THREE__":"177"}
|
|
132798
132799
|
this.bNode = (Object.keys(window).length < 3) ? true : false;
|
|
@@ -133372,7 +133373,7 @@ iCn3DUI.prototype.getXMLHttpRqstPromise = function(url, dataType, responseType,
|
|
|
133372
133373
|
var aaa = 1; //alert("RCSB server has no corresponding electron density map for this structure.");
|
|
133373
133374
|
}
|
|
133374
133375
|
else {
|
|
133375
|
-
|
|
133376
|
+
console.log("The " + mapType + " file is unavailable...");
|
|
133376
133377
|
}
|
|
133377
133378
|
|
|
133378
133379
|
reject('error');
|