icn3d 3.29.11 → 3.29.12
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 +82 -32
- package/icn3d.min.js +3 -3
- package/icn3d.module.js +82 -32
- package/package.json +1 -1
package/icn3d.module.js
CHANGED
|
@@ -12878,10 +12878,11 @@ class SetDialog {
|
|
|
12878
12878
|
html += "<td></td>";
|
|
12879
12879
|
html += "</tr><tr>";
|
|
12880
12880
|
html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_ig'>Ig Domains" + me.htmlCls.space2 + "</span></td>";
|
|
12881
|
+
*/
|
|
12881
12882
|
|
|
12882
12883
|
html += "<td></td>";
|
|
12883
12884
|
html += "</tr></table></div></div>";
|
|
12884
|
-
|
|
12885
|
+
|
|
12885
12886
|
return html;
|
|
12886
12887
|
}
|
|
12887
12888
|
}
|
|
@@ -37743,14 +37744,12 @@ class AnnoCddSite {
|
|
|
37743
37744
|
|
|
37744
37745
|
if(ic.seqStartLen && ic.seqStartLen[chnid]) html += ic.showSeqCls.insertMulGap(ic.seqEndLen[chnid], '-');
|
|
37745
37746
|
|
|
37746
|
-
let atom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.chains[chnid]);
|
|
37747
|
-
let colorStr =(atom.color === undefined || atom.color.getHexString() === 'FFFFFF') ? 'DDDDDD' : atom.color.getHexString();
|
|
37748
|
-
let color =(atom.color !== undefined) ? colorStr : "CCCCCC";
|
|
37749
|
-
|
|
37750
37747
|
if(ic.seqStartLen && ic.seqStartLen[chnid]) html2 += ic.showSeqCls.insertMulGapOverview(chnid, ic.seqStartLen[chnid]);
|
|
37751
37748
|
|
|
37752
37749
|
if(me.cfg.blast_rep_id != chnid) { // regular
|
|
37753
37750
|
for(let i = 0, il = fromArray.length; i < il; ++i) {
|
|
37751
|
+
let color = this.getColorFromPos(chnid, i, titleArray);
|
|
37752
|
+
|
|
37754
37753
|
let emptyWidth;
|
|
37755
37754
|
if(titleArray) {
|
|
37756
37755
|
emptyWidth =(i == 0) ? Math.round(ic.seqAnnWidth *(fromArray[i]) / ic.maxAnnoLength) : Math.round(ic.seqAnnWidth *(fromArray[i] - toArray[i-1] - 1) / ic.maxAnnoLength);
|
|
@@ -37776,6 +37775,8 @@ class AnnoCddSite {
|
|
|
37776
37775
|
toArray2.push(toArray[i]);
|
|
37777
37776
|
}
|
|
37778
37777
|
for(let i = 0, il = fromArray2.length; i < il; ++i) {
|
|
37778
|
+
let color = this.getColorFromPos(chnid, i, titleArray);
|
|
37779
|
+
|
|
37779
37780
|
html2 += ic.showSeqCls.insertGapOverview(chnid, fromArray2[i]);
|
|
37780
37781
|
let emptyWidth =(i == 0) ? Math.round(ic.seqAnnWidth *(fromArray2[i] - ic.baseResi[chnid] - 1) /(ic.maxAnnoLength + ic.nTotalGap)) : Math.round(ic.seqAnnWidth *(fromArray2[i] - toArray2[i-1] - 1) /(ic.maxAnnoLength + ic.nTotalGap));
|
|
37781
37782
|
html2 += '<div style="display:inline-block; width:' + emptyWidth + 'px;"> </div>';
|
|
@@ -37800,6 +37801,24 @@ class AnnoCddSite {
|
|
|
37800
37801
|
// getAdjustedResi(resi, chnid, matchedPos, chainsSeq, baseResi) { let ic = this.icn3d, me = ic.icn3dui;
|
|
37801
37802
|
// return (resi >= matchedPos[chnid] && resi - matchedPos[chnid] < ic.chainsSeq[chnid].length) ? ic.chainsSeq[chnid][resi - matchedPos[chnid]].resi : baseResi[chnid] + 1 + resi;
|
|
37802
37803
|
// }
|
|
37804
|
+
getColorFromPos(chainid, pos, bIg) { let ic = this.icn3d; ic.icn3dui;
|
|
37805
|
+
let color;
|
|
37806
|
+
|
|
37807
|
+
let resid = chainid + '_' + ic.ParserUtilsCls.getResi(chainid, pos);
|
|
37808
|
+
// if(!bIg) {
|
|
37809
|
+
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
37810
|
+
let colorStr =(!atom || atom.color === undefined || atom.color.getHexString() === 'FFFFFF') ? 'DDDDDD' : atom.color.getHexString();
|
|
37811
|
+
color =(atom && atom.color !== undefined) ? colorStr : "CCCCCC";
|
|
37812
|
+
// }
|
|
37813
|
+
// else {
|
|
37814
|
+
// let refnumLabel = ic.resid2refnum[resid];
|
|
37815
|
+
// let refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
|
|
37816
|
+
// let currStrand = refnumLabel.replace(new RegExp(refnumStr_ori,'g'), '');
|
|
37817
|
+
// color = ic.annoIgCls.getRefnumColor(currStrand, true).substr(1);
|
|
37818
|
+
// }
|
|
37819
|
+
|
|
37820
|
+
return color;
|
|
37821
|
+
}
|
|
37803
37822
|
|
|
37804
37823
|
showAnnoType(chnid, chnidBase, type, title, residueArray, resid2resids) { let ic = this.icn3d, me = ic.icn3dui;
|
|
37805
37824
|
let html = '<div id="' + ic.pre + chnid + '_' + type + 'seq_sequence" class="icn3d-dl_sequence">';
|
|
@@ -38457,7 +38476,7 @@ class AnnoIg {
|
|
|
38457
38476
|
async showIg(chnid, template) { let ic = this.icn3d; ic.icn3dui;
|
|
38458
38477
|
if(!ic.bRunRefnum || Object.keys(ic.atoms).length > Object.keys(ic.hAtoms).length) {
|
|
38459
38478
|
await ic.refnumCls.showIgRefNum(template);
|
|
38460
|
-
ic.bRunRefnum = true;
|
|
38479
|
+
ic.bRunRefnum = true;
|
|
38461
38480
|
}
|
|
38462
38481
|
|
|
38463
38482
|
let type = 'ig';
|
|
@@ -38502,7 +38521,6 @@ class AnnoIg {
|
|
|
38502
38521
|
|
|
38503
38522
|
showRefNum(giSeq, chnid, kabat_or_imgt, bCustom) { let ic = this.icn3d, me = ic.icn3dui;
|
|
38504
38523
|
let html = '', html2 = '', html3 = '';
|
|
38505
|
-
let type = 'ig';
|
|
38506
38524
|
|
|
38507
38525
|
if(!ic.chainid2refpdbname[chnid]) return {html: html, html2: html2, html3: html3};
|
|
38508
38526
|
|
|
@@ -38541,7 +38559,7 @@ class AnnoIg {
|
|
|
38541
38559
|
}
|
|
38542
38560
|
|
|
38543
38561
|
// auto-generate ref numbers for loops
|
|
38544
|
-
let
|
|
38562
|
+
let currStrand = '', prevStrand = '';
|
|
38545
38563
|
let refnumLabel, refnumStr_ori, refnumStr, postfix, strandPostfix, refnum, refnum3c, refnum2c;
|
|
38546
38564
|
let bExtendedStrand = false, bSecThird9 = false;
|
|
38547
38565
|
|
|
@@ -38577,7 +38595,7 @@ class AnnoIg {
|
|
|
38577
38595
|
bFoundAnchor = false;
|
|
38578
38596
|
}
|
|
38579
38597
|
|
|
38580
|
-
if(prevStrand.substr(0,1) == 'G' && !refnumLabel) { // indicate the end of an IG domain
|
|
38598
|
+
if((prevStrand.substr(0,1) == 'F' || prevStrand.substr(0,1) == 'G') && !refnumLabel) { // indicate the end of an IG domain
|
|
38581
38599
|
bStart = false;
|
|
38582
38600
|
}
|
|
38583
38601
|
|
|
@@ -38862,7 +38880,8 @@ class AnnoIg {
|
|
|
38862
38880
|
}
|
|
38863
38881
|
}
|
|
38864
38882
|
else {
|
|
38865
|
-
if(prevStrandCnt >= 0
|
|
38883
|
+
if(prevStrandCnt >= 0
|
|
38884
|
+
&& (strandArray[prevStrandCnt].strand.substr(0, 1) == 'F' || strandArray[prevStrandCnt].strand.substr(0, 1) == 'G')) {
|
|
38866
38885
|
if(!bAfterGstrand) {
|
|
38867
38886
|
//loopCnt = 0;
|
|
38868
38887
|
refnumLabelNoPostfix = undefined;
|
|
@@ -38987,15 +39006,30 @@ class AnnoIg {
|
|
|
38987
39006
|
}
|
|
38988
39007
|
}
|
|
38989
39008
|
|
|
39009
|
+
// add color to atoms
|
|
39010
|
+
if(ic.bShowRefnum) {
|
|
39011
|
+
ic.opts.color = 'ig strand';
|
|
39012
|
+
ic.setColorCls.setColorByOptions(ic.opts, ic.dAtoms);
|
|
39013
|
+
}
|
|
39014
|
+
|
|
39015
|
+
return this.getIgAnnoHtml(chnid, giSeq, bCustom, kabat_or_imgt);
|
|
39016
|
+
}
|
|
39017
|
+
|
|
39018
|
+
getIgAnnoHtml(chnid, giSeq, bCustom, kabat_or_imgt) { let ic = this.icn3d, me = ic.icn3dui;
|
|
39019
|
+
let html = '', html2 = '', html3 = '';
|
|
39020
|
+
let type = 'ig';
|
|
39021
|
+
|
|
38990
39022
|
if(!ic.chain2igArray) ic.chain2igArray = {};
|
|
38991
39023
|
ic.chain2igArray[chnid] = [];
|
|
38992
39024
|
|
|
38993
39025
|
let igElem = {};
|
|
38994
|
-
bStart = false;
|
|
38995
39026
|
let currStrand_ori;
|
|
38996
|
-
prevStrand = undefined;
|
|
39027
|
+
let prevStrand = undefined;
|
|
38997
39028
|
let prevPos;
|
|
38998
39029
|
|
|
39030
|
+
let bLoop = false, currStrand = '';
|
|
39031
|
+
let refnumLabel, refnumStr_ori, refnumStr;
|
|
39032
|
+
|
|
38999
39033
|
// show tracks
|
|
39000
39034
|
let htmlIg = '';
|
|
39001
39035
|
for(let i = 0, il = giSeq.length; i < il; ++i) {
|
|
@@ -39029,7 +39063,6 @@ class AnnoIg {
|
|
|
39029
39063
|
}
|
|
39030
39064
|
else {
|
|
39031
39065
|
refnumStr = refnumStr_ori;
|
|
39032
|
-
refnum = parseInt(refnumStr);
|
|
39033
39066
|
}
|
|
39034
39067
|
|
|
39035
39068
|
let prevStrandFirstLet = (prevStrand) ? prevStrand.substr(0, 1) : '';
|
|
@@ -39185,9 +39218,9 @@ class AnnoIg {
|
|
|
39185
39218
|
for(let i = 0, il = fromArray.length; i < il; ++i) {
|
|
39186
39219
|
let resi = ic.ParserUtilsCls.getResi(chnid, fromArray[i]);
|
|
39187
39220
|
let resid = chnid + "_" + resi;
|
|
39188
|
-
let atom = ic.firstAtomObjCls.
|
|
39189
|
-
let colorStr =(atom.color === undefined || atom.color.getHexString() === 'FFFFFF') ? 'DDDDDD' : atom.color.getHexString();
|
|
39190
|
-
let color =(atom.color !== undefined) ? colorStr : "CCCCCC";
|
|
39221
|
+
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
39222
|
+
let colorStr =(!atom || atom.color === undefined || atom.color.getHexString() === 'FFFFFF') ? 'DDDDDD' : atom.color.getHexString();
|
|
39223
|
+
let color =(atom && atom.color !== undefined) ? colorStr : "CCCCCC";
|
|
39191
39224
|
|
|
39192
39225
|
let emptyWidth =(i == 0) ? Math.round(ic.seqAnnWidth *(fromArray[i]) / ic.maxAnnoLength) :
|
|
39193
39226
|
Math.round(ic.seqAnnWidth *(fromArray[i] - toArray[i-1] - 1) / ic.maxAnnoLength);
|
|
@@ -41458,6 +41491,7 @@ class Domain3d {
|
|
|
41458
41491
|
}
|
|
41459
41492
|
if(list_parts_item.length >= this.min_sse) list_partsTmp.push(list_parts[i]);
|
|
41460
41493
|
}
|
|
41494
|
+
|
|
41461
41495
|
list_parts = list_partsTmp;
|
|
41462
41496
|
|
|
41463
41497
|
//for (lplet = list_parts.begin(); lplet != list_parts.end(); lpint++) {
|
|
@@ -44148,8 +44182,8 @@ class Annotation {
|
|
|
44148
44182
|
// ic.bIgShown = true;
|
|
44149
44183
|
|
|
44150
44184
|
if(ic.bShowRefnum) {
|
|
44151
|
-
ic.opts.color = 'ig strand';
|
|
44152
|
-
ic.setColorCls.setColorByOptions(ic.opts, ic.dAtoms);
|
|
44185
|
+
// ic.opts.color = 'ig strand';
|
|
44186
|
+
// ic.setColorCls.setColorByOptions(ic.opts, ic.dAtoms);
|
|
44153
44187
|
|
|
44154
44188
|
ic.hlUpdateCls.updateHlAll();
|
|
44155
44189
|
ic.drawCls.draw();
|
|
@@ -67406,42 +67440,50 @@ class Dssp {
|
|
|
67406
67440
|
if(!bRound1 && queryData[0].segs) {
|
|
67407
67441
|
let bBstrand = false, bCstrand = false, bEstrand = false, bFstrand = false;
|
|
67408
67442
|
let bBSheet = true, bCSheet = true, bESheet = true, bFSheet = true;
|
|
67443
|
+
let BCnt = 0, CCnt = 0, ECnt = 0, FCnt = 0;
|
|
67409
67444
|
let chainid = domainid.split(',')[0];
|
|
67410
67445
|
|
|
67411
67446
|
for(let j = 0, jl = queryData[0].segs.length; j < jl; ++j) {
|
|
67412
67447
|
let seg = queryData[0].segs[j];
|
|
67413
67448
|
let resi = seg.t_start;
|
|
67414
67449
|
let resid = chainid + '_' + resi;
|
|
67450
|
+
let q_start = parseInt(seg.q_start);
|
|
67415
67451
|
|
|
67416
|
-
if(
|
|
67452
|
+
if(q_start > 2540 && q_start < 2560) {
|
|
67417
67453
|
bBstrand = true;
|
|
67418
67454
|
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
67419
|
-
|
|
67455
|
+
if(atom.ss == 'helix') bBSheet = false;
|
|
67456
|
+
++BCnt;
|
|
67420
67457
|
}
|
|
67421
|
-
else if(
|
|
67458
|
+
else if(q_start > 3540 && q_start < 3560) {
|
|
67422
67459
|
bCstrand = true;
|
|
67423
67460
|
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
67424
|
-
|
|
67461
|
+
if(atom.ss == 'helix') bCSheet = false;
|
|
67462
|
+
++CCnt;
|
|
67425
67463
|
}
|
|
67426
|
-
else if(
|
|
67464
|
+
else if(q_start > 7540 && q_start < 7560) {
|
|
67427
67465
|
bEstrand = true;
|
|
67428
67466
|
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
67429
|
-
|
|
67467
|
+
if(atom.ss == 'helix') bESheet = false;
|
|
67468
|
+
++ECnt;
|
|
67430
67469
|
}
|
|
67431
|
-
else if(
|
|
67470
|
+
else if(q_start > 8540 && q_start < 8560) {
|
|
67432
67471
|
bFstrand = true;
|
|
67433
67472
|
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
67434
|
-
|
|
67473
|
+
if(atom.ss == 'helix') bFSheet = false;
|
|
67474
|
+
++FCnt;
|
|
67435
67475
|
}
|
|
67436
67476
|
|
|
67437
67477
|
//if(bBstrand && bCstrand && bEstrand && bFstrand && bGstrand) break;
|
|
67438
67478
|
if(bBstrand && bCstrand && bEstrand && bFstrand) break;
|
|
67439
67479
|
}
|
|
67440
|
-
|
|
67441
|
-
if(!(bBstrand && bCstrand && bEstrand && bFstrand) || !(bBSheet && bCSheet && bESheet && bFSheet)
|
|
67442
|
-
|
|
67480
|
+
|
|
67481
|
+
if(!(bBstrand && bCstrand && bEstrand && bFstrand) || !(bBSheet && bCSheet && bESheet && bFSheet)
|
|
67482
|
+
|| BCnt < 3 || CCnt < 3 || ECnt < 3 || FCnt < 3) {
|
|
67483
|
+
// if(!(bBstrand && bCstrand && bEstrand && bFstrand)) {
|
|
67443
67484
|
if(!me.bNode && !(bBstrand && bCstrand && bEstrand && bFstrand)) console.log("Some of the Ig strands B, C, E, F are missing in the domain " + domainid + "...");
|
|
67444
67485
|
if(!me.bNode && !(bBSheet && bCSheet && bESheet && bFSheet)) console.log("Some of the Ig strands B, C, E, F are not beta sheets...");
|
|
67486
|
+
if(!me.bNode && (BCnt < 3 || CCnt < 3 || ECnt < 3 || FCnt < 3)) console.log("Some of the Ig strands B, C, E, F are missing in the domain " + domainid + "...");
|
|
67445
67487
|
if(ic.domainid2refpdbname[domainid] == refpdbname) {
|
|
67446
67488
|
delete ic.domainid2refpdbname[domainid];
|
|
67447
67489
|
delete ic.domainid2score[domainid];
|
|
@@ -67739,9 +67781,13 @@ class Dssp {
|
|
|
67739
67781
|
refnumLabel = this.getLabelFromRefnum(refnum, currStrandFinal);
|
|
67740
67782
|
}
|
|
67741
67783
|
|
|
67742
|
-
ic.
|
|
67743
|
-
|
|
67744
|
-
|
|
67784
|
+
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
67785
|
+
// only sheet or loop will be aligned
|
|
67786
|
+
if(atom.ss != 'helix') {
|
|
67787
|
+
ic.resid2refnum[resid] = refnumLabel;
|
|
67788
|
+
ic.resid2refnum_ori[resid] = refnumLabel;
|
|
67789
|
+
ic.resid2domainid[resid] = domainid;
|
|
67790
|
+
}
|
|
67745
67791
|
|
|
67746
67792
|
// final reference numbers will be assign in ic.annoIgCls.showRefNum()
|
|
67747
67793
|
|
|
@@ -68088,6 +68134,8 @@ class Dssp {
|
|
|
68088
68134
|
}
|
|
68089
68135
|
|
|
68090
68136
|
async promiseWithFixedJobs(ajaxArray) { let ic = this.icn3d, me = ic.icn3dui;
|
|
68137
|
+
if(!me.bNode) me.icn3d.ParserUtilsCls.showLoading();
|
|
68138
|
+
|
|
68091
68139
|
let dataArray3 = [];
|
|
68092
68140
|
//let allPromise = Promise.allSettled(ajaxArray);
|
|
68093
68141
|
//dataArray3 = await allPromise;
|
|
@@ -68110,6 +68158,8 @@ class Dssp {
|
|
|
68110
68158
|
dataArray3 = dataArray3.concat(currDataArray);
|
|
68111
68159
|
}
|
|
68112
68160
|
|
|
68161
|
+
if(!me.bNode) me.icn3d.ParserUtilsCls.hideLoading();
|
|
68162
|
+
|
|
68113
68163
|
return dataArray3;
|
|
68114
68164
|
}
|
|
68115
68165
|
}
|