icn3d 3.45.2 → 3.45.4
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.module.js
CHANGED
|
@@ -92431,6 +92431,7 @@ class AnnoIg {
|
|
|
92431
92431
|
html2 += htmlCnt + '<span class="icn3d-seqLine">';
|
|
92432
92432
|
|
|
92433
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], '-');
|
|
92434
92435
|
|
|
92435
92436
|
let prevDomainindex, color;
|
|
92436
92437
|
for(let i = 0, il = fromArray.length; i < il; ++i) {
|
|
@@ -96970,7 +96971,7 @@ class AddTrack {
|
|
|
96970
96971
|
|
|
96971
96972
|
// adjust the total length
|
|
96972
96973
|
if(ic.maxAnnoLength < ic.maxAnnoLengthOri + ic.seqStartLen[chainid] + ic.seqEndLen[chainid]) {
|
|
96973
|
-
|
|
96974
|
+
ic.maxAnnoLength = ic.maxAnnoLengthOri + ic.seqStartLen[chainid] + ic.seqEndLen[chainid];
|
|
96974
96975
|
}
|
|
96975
96976
|
|
|
96976
96977
|
// do not remove other tracks
|
|
@@ -97271,6 +97272,9 @@ class AddTrack {
|
|
|
97271
97272
|
|
|
97272
97273
|
me.htmlCls.clickMenuCls.setLogCmd("add exon track | chainid " + chainid + " | geneid " + geneid + " | startpos " + startpos + " | type " + type, true);
|
|
97273
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();
|
|
97274
97278
|
}
|
|
97275
97279
|
|
|
97276
97280
|
async addMsaTracks(chainid, startpos, type, fastaList) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -106555,7 +106559,7 @@ class MmcifParser {
|
|
|
106555
106559
|
///// if(ic.deferredSymmetry !== undefined) ic.deferredSymmetry.resolve();
|
|
106556
106560
|
}
|
|
106557
106561
|
catch (err) {
|
|
106558
|
-
if(!me.bNode) console.log("
|
|
106562
|
+
if(!me.bNode) console.log("downloadMmcifSymmetry issues: " + err);
|
|
106559
106563
|
return;
|
|
106560
106564
|
}
|
|
106561
106565
|
}
|
|
@@ -106630,7 +106634,7 @@ class MmdbParser {
|
|
|
106630
106634
|
this.getNoData(mmdbid, bGi);
|
|
106631
106635
|
return;
|
|
106632
106636
|
}
|
|
106633
|
-
|
|
106637
|
+
|
|
106634
106638
|
if(Object.keys(data.atoms).length == 0) { // for large structures such as 3J3Q
|
|
106635
106639
|
// use mmtfid
|
|
106636
106640
|
let pdbid = data.pdbId;
|
|
@@ -111922,7 +111926,7 @@ class ParserUtils {
|
|
|
111922
111926
|
getResiNCBI(chainid, resi) { let ic = this.icn3d; ic.icn3dui;
|
|
111923
111927
|
let residNCBI = ic.resid2ncbi[chainid + '_' + resi];
|
|
111924
111928
|
let resiNCBI = (residNCBI) ? parseInt(residNCBI.substr(residNCBI.lastIndexOf('_') + 1)) : 0;
|
|
111925
|
-
|
|
111929
|
+
|
|
111926
111930
|
return resiNCBI;
|
|
111927
111931
|
}
|
|
111928
111932
|
}
|
|
@@ -113343,7 +113347,7 @@ class SetSeqAlign {
|
|
|
113343
113347
|
// start and end of MSA
|
|
113344
113348
|
let start_t = 9999, end_t = -1;
|
|
113345
113349
|
|
|
113346
|
-
|
|
113350
|
+
ic.chainsSeq[chainid1][0].resi - 1;
|
|
113347
113351
|
|
|
113348
113352
|
for(let index = 1, indexl = chainidArray.length; index < indexl; ++index) {
|
|
113349
113353
|
let chainIndex = index - 1;
|
|
@@ -113353,34 +113357,25 @@ class SetSeqAlign {
|
|
|
113353
113357
|
for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
|
|
113354
113358
|
let start1, end1;
|
|
113355
113359
|
|
|
113356
|
-
//
|
|
113357
|
-
//
|
|
113358
|
-
|
|
113359
|
-
|
|
113360
|
-
|
|
113361
|
-
|
|
113362
|
-
start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start) - 1;
|
|
113363
|
-
end1 = parseInt(ic.qt_start_end[chainIndex][i].t_end) - 1;
|
|
113364
|
-
// }
|
|
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
|
+
|
|
113365
113366
|
for(let j = start1; j <= end1; ++j) {
|
|
113366
113367
|
let resi, resid;
|
|
113367
113368
|
|
|
113368
|
-
//
|
|
113369
|
-
//
|
|
113369
|
+
// let resiPos;
|
|
113370
|
+
// if(me.cfg.aligntool == 'tmalign') {
|
|
113371
|
+
// resiPos = j - baseResi;
|
|
113370
113372
|
// }
|
|
113371
113373
|
// else {
|
|
113372
|
-
|
|
113373
|
-
let resiPos;
|
|
113374
|
-
if(me.cfg.aligntool == 'tmalign') {
|
|
113375
|
-
resiPos = j - baseResi;
|
|
113376
|
-
}
|
|
113377
|
-
else {
|
|
113378
|
-
// resiPos = (bRealign) ? j : j - baseResi;
|
|
113379
|
-
resiPos = j;
|
|
113380
|
-
}
|
|
113381
|
-
resi = ic.ParserUtilsCls.getResi(chainidArray[0], resiPos);
|
|
113382
|
-
resid = chainidArray[0] + '_' + resi;
|
|
113374
|
+
// resiPos = j;
|
|
113383
113375
|
// }
|
|
113376
|
+
let resiPos = j;
|
|
113377
|
+
resi = ic.ParserUtilsCls.getResi(chainidArray[0], resiPos);
|
|
113378
|
+
resid = chainidArray[0] + '_' + resi;
|
|
113384
113379
|
|
|
113385
113380
|
resid2range_t[resid] = 1;
|
|
113386
113381
|
if(j < start_t) start_t = j;
|
|
@@ -113440,7 +113435,8 @@ class SetSeqAlign {
|
|
|
113440
113435
|
let resi = ic.chainsSeq[chainid1][j].resi;
|
|
113441
113436
|
let resid = chainid1 + '_' + resi;
|
|
113442
113437
|
|
|
113443
|
-
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;
|
|
113444
113440
|
|
|
113445
113441
|
//if(j + baseResi < start_t || j + baseResi > end_t) {
|
|
113446
113442
|
if(jAdjusted < start_t || jAdjusted > end_t) {
|
|
@@ -113629,8 +113625,10 @@ class SetSeqAlign {
|
|
|
113629
113625
|
insertNotAlignRes(chainid, start, len, bRealign) { let ic = this.icn3d; ic.icn3dui;
|
|
113630
113626
|
// insert non-aligned residues in query seq
|
|
113631
113627
|
for(let j = 0, jl = len; j < jl; ++j) {
|
|
113632
|
-
let resi2 = ic.ParserUtilsCls.getResi(chainid, start + j);
|
|
113633
|
-
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);
|
|
113634
113632
|
let resn1 = '-';
|
|
113635
113633
|
let bAlign = false;
|
|
113636
113634
|
let resObject = this.getResObject(chainid, false, bAlign, resi2, resn2, resn1);
|
|
@@ -113638,13 +113636,15 @@ class SetSeqAlign {
|
|
|
113638
113636
|
}
|
|
113639
113637
|
}
|
|
113640
113638
|
|
|
113641
|
-
|
|
113642
|
-
let startResi = ic.ParserUtilsCls.getResi(chainid1, start);
|
|
113643
|
-
let endResi = ic.ParserUtilsCls.getResi(chainid1, end);
|
|
113644
|
-
|
|
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
|
+
|
|
113645
113645
|
let result1 = this.getResiPosInTemplate(chainid1, startResi);
|
|
113646
113646
|
let result2 = this.getResiPosInTemplate(chainid1, endResi);
|
|
113647
|
-
|
|
113647
|
+
|
|
113648
113648
|
return {"pos1": result1.pos, "pos2": result2.pos};
|
|
113649
113649
|
}
|
|
113650
113650
|
|
|
@@ -113709,7 +113709,8 @@ class SetSeqAlign {
|
|
|
113709
113709
|
let result;
|
|
113710
113710
|
|
|
113711
113711
|
for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
|
|
113712
|
-
let start1, start2, end1, end2, resiStart1, start1Pos
|
|
113712
|
+
let start1, start2, end1, end2, resiStart1, start1Pos;
|
|
113713
|
+
|
|
113713
113714
|
if(bRealign && me.cfg.aligntool == 'tmalign') { // real residue numbers are stored
|
|
113714
113715
|
start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start);
|
|
113715
113716
|
start2 = parseInt(ic.qt_start_end[chainIndex][i].q_start);
|
|
@@ -113724,7 +113725,7 @@ class SetSeqAlign {
|
|
|
113724
113725
|
// 1. before the mapped residues
|
|
113725
113726
|
resiStart1 = start1;
|
|
113726
113727
|
start1Pos = this.getPosFromResi(chainid1, ic.qt_start_end[chainIndex][i].t_start);
|
|
113727
|
-
|
|
113728
|
+
this.getPosFromResi(chainid1, ic.qt_start_end[chainIndex][i].t_end);
|
|
113728
113729
|
}
|
|
113729
113730
|
else {
|
|
113730
113731
|
start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start - 1);
|
|
@@ -113735,17 +113736,16 @@ class SetSeqAlign {
|
|
|
113735
113736
|
// 1. before the mapped residues
|
|
113736
113737
|
resiStart1 = ic.ParserUtilsCls.getResi(chainid1, start1);
|
|
113737
113738
|
start1Pos = start1;
|
|
113738
|
-
end1Pos = end1;
|
|
113739
113739
|
}
|
|
113740
113740
|
//let range = resid2range_t[chainid1 + '_' + resiStart1];
|
|
113741
|
-
|
|
113741
|
+
|
|
113742
113742
|
// if the mapping does not start from start_t, add gaps to the query seq
|
|
113743
113743
|
if(i == 0) {
|
|
113744
|
-
//result = this.
|
|
113745
|
-
result = this.
|
|
113744
|
+
//result = this.getTemplatePosFromOriResi(chainid1, start_t, start1, bRealign);
|
|
113745
|
+
result = this.getTemplatePosFromOriResi(chainid1, start_t, start1Pos, bRealign);
|
|
113746
113746
|
pos1 = result.pos1;
|
|
113747
113747
|
pos2 = result.pos2;
|
|
113748
|
-
|
|
113748
|
+
|
|
113749
113749
|
//if(start1 > start_t) {
|
|
113750
113750
|
if(start1Pos > start_t) {
|
|
113751
113751
|
for(let j = 0, jl = pos2 - pos1; j < jl; ++j) {
|
|
@@ -113755,7 +113755,7 @@ class SetSeqAlign {
|
|
|
113755
113755
|
}
|
|
113756
113756
|
else {
|
|
113757
113757
|
//let notAlnLen1 = start1 - (prevIndex1 + 1);
|
|
113758
|
-
result = this.
|
|
113758
|
+
result = this.getTemplatePosFromOriResi(chainid1, prevIndex1, start1, bRealign);
|
|
113759
113759
|
pos1 = result.pos1;
|
|
113760
113760
|
pos2 = result.pos2;
|
|
113761
113761
|
let notAlnLen1 = pos2 - (pos1 + 1);
|
|
@@ -113768,7 +113768,7 @@ class SetSeqAlign {
|
|
|
113768
113768
|
// add gaps before the query sequence
|
|
113769
113769
|
for(let j = 0, jl = notAlnLen1 - notAlnLen2; j < jl; ++j) {
|
|
113770
113770
|
ic.alnChainsSeq[chainid2].push(gapResObject2);
|
|
113771
|
-
}
|
|
113771
|
+
}
|
|
113772
113772
|
}
|
|
113773
113773
|
else {
|
|
113774
113774
|
// check the number of gaps before resiStart1 (n), and insert 'notAlnLen2 - notAlnLen1 - n' gaps
|
|
@@ -113777,8 +113777,8 @@ class SetSeqAlign {
|
|
|
113777
113777
|
}
|
|
113778
113778
|
|
|
113779
113779
|
// 2. In the mapped residues
|
|
113780
|
-
|
|
113781
|
-
result = this.
|
|
113780
|
+
result = this.getTemplatePosFromOriResi(chainid1, start1, end1, bRealign);
|
|
113781
|
+
//result = this.getTemplatePosFromOriResi(chainid1, start1Pos, end1Pos, bRealign);
|
|
113782
113782
|
pos1 = result.pos1;
|
|
113783
113783
|
pos2 = result.pos2;
|
|
113784
113784
|
|
|
@@ -113795,7 +113795,7 @@ class SetSeqAlign {
|
|
|
113795
113795
|
let resi2 = (bRealign) ? start2 + k : ic.ParserUtilsCls.getResi(chainid2, start2 + k);
|
|
113796
113796
|
let resn1 = this.getResnFromResi(chainid1, resi1); //this.getResn(chainid1, start1 + k);
|
|
113797
113797
|
let resn2 = this.getResnFromResi(chainid2, resi2); //this.getResn(chainid2, start2 + k);
|
|
113798
|
-
|
|
113798
|
+
|
|
113799
113799
|
let bAlign = true;
|
|
113800
113800
|
let resObject = this.getResObject(chainid2, false, bAlign, resi2, resn2, resn1);
|
|
113801
113801
|
ic.alnChainsSeq[chainid2].push(resObject);
|
|
@@ -113818,7 +113818,7 @@ class SetSeqAlign {
|
|
|
113818
113818
|
}
|
|
113819
113819
|
|
|
113820
113820
|
// add gaps at the end
|
|
113821
|
-
result = this.
|
|
113821
|
+
result = this.getTemplatePosFromOriResi(chainid1, prevIndex1, end_t, bRealign);
|
|
113822
113822
|
pos1 = result.pos1;
|
|
113823
113823
|
pos2 = result.pos2;
|
|
113824
113824
|
for(let i = pos1; i < pos2; ++i) {
|
|
@@ -116130,7 +116130,7 @@ class Vastplus {
|
|
|
116130
116130
|
}
|
|
116131
116131
|
|
|
116132
116132
|
let allPromise = Promise.allSettled(ajaxArray);
|
|
116133
|
-
try {
|
|
116133
|
+
// try {
|
|
116134
116134
|
let dataArray = await allPromise;
|
|
116135
116135
|
|
|
116136
116136
|
// 2. cluster pairs
|
|
@@ -116142,10 +116142,10 @@ class Vastplus {
|
|
|
116142
116142
|
await ic.pdbParserCls.loadPdbDataRender(true);
|
|
116143
116143
|
|
|
116144
116144
|
/// if(ic.deferredRealignByVastplus !== undefined) ic.deferredRealignByVastplus.resolve();
|
|
116145
|
-
}
|
|
116146
|
-
catch(err) {
|
|
116147
|
-
|
|
116148
|
-
}
|
|
116145
|
+
// }
|
|
116146
|
+
// catch(err) {
|
|
116147
|
+
// var aaa = 1; //alert("There are some problems in aligning the chains...");
|
|
116148
|
+
// }
|
|
116149
116149
|
}
|
|
116150
116150
|
|
|
116151
116151
|
setAlignment(struct1, struct2, chainid1, chainid2, bRealign) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -123196,15 +123196,16 @@ class Dssp {
|
|
|
123196
123196
|
let pdbAjaxArray = this.getPdbAjaxArray();
|
|
123197
123197
|
|
|
123198
123198
|
// try {
|
|
123199
|
+
let numRound = 0;
|
|
123200
|
+
|
|
123199
123201
|
if(!template) {
|
|
123200
123202
|
//let allPromise = Promise.allSettled(pdbAjaxArray);
|
|
123201
123203
|
//ic.pdbDataArray = await allPromise;
|
|
123202
123204
|
|
|
123203
123205
|
ic.pdbDataArray = await this.promiseWithFixedJobs(pdbAjaxArray);
|
|
123204
123206
|
|
|
123205
|
-
let numRound = 0;
|
|
123206
123207
|
let bNoMoreIg = await thisClass.parseRefPdbData(ic.pdbDataArray, template, undefined, numRound);
|
|
123207
|
-
|
|
123208
|
+
++numRound;
|
|
123208
123209
|
|
|
123209
123210
|
//while(!bNoMoreIg) {
|
|
123210
123211
|
while(!bNoMoreIg && numRound < 15) {
|
|
@@ -133693,7 +133694,7 @@ class iCn3DUI {
|
|
|
133693
133694
|
//even when multiple iCn3D viewers are shown together.
|
|
133694
133695
|
this.pre = this.cfg.divid + "_";
|
|
133695
133696
|
|
|
133696
|
-
this.REVISION = '3.45.
|
|
133697
|
+
this.REVISION = '3.45.2';
|
|
133697
133698
|
|
|
133698
133699
|
// In nodejs, iCn3D defines "window = {navigator: {}}", and added window = {navigator: {}, "__THREE__":"177"}
|
|
133699
133700
|
this.bNode = (Object.keys(window).length < 3) ? true : false;
|
|
@@ -134273,7 +134274,7 @@ iCn3DUI.prototype.getXMLHttpRqstPromise = function(url, dataType, responseType,
|
|
|
134273
134274
|
var aaa = 1; //alert("RCSB server has no corresponding electron density map for this structure.");
|
|
134274
134275
|
}
|
|
134275
134276
|
else {
|
|
134276
|
-
|
|
134277
|
+
console.log("The " + mapType + " file is unavailable...");
|
|
134277
134278
|
}
|
|
134278
134279
|
|
|
134279
134280
|
reject('error');
|