icn3d 3.29.11 → 3.29.13
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 +81 -31
- package/icn3d.min.js +3 -3
- package/icn3d.module.js +81 -31
- package/package.json +1 -1
package/icn3d.js
CHANGED
|
@@ -11977,10 +11977,11 @@ class SetDialog {
|
|
|
11977
11977
|
html += "<td></td>";
|
|
11978
11978
|
html += "</tr><tr>";
|
|
11979
11979
|
html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_ig'>Ig Domains" + me.htmlCls.space2 + "</span></td>";
|
|
11980
|
+
*/
|
|
11980
11981
|
|
|
11981
11982
|
html += "<td></td>";
|
|
11982
11983
|
html += "</tr></table></div></div>";
|
|
11983
|
-
|
|
11984
|
+
|
|
11984
11985
|
return html;
|
|
11985
11986
|
}
|
|
11986
11987
|
}
|
|
@@ -36842,14 +36843,12 @@ class AnnoCddSite {
|
|
|
36842
36843
|
|
|
36843
36844
|
if(ic.seqStartLen && ic.seqStartLen[chnid]) html += ic.showSeqCls.insertMulGap(ic.seqEndLen[chnid], '-');
|
|
36844
36845
|
|
|
36845
|
-
let atom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.chains[chnid]);
|
|
36846
|
-
let colorStr =(atom.color === undefined || atom.color.getHexString() === 'FFFFFF') ? 'DDDDDD' : atom.color.getHexString();
|
|
36847
|
-
let color =(atom.color !== undefined) ? colorStr : "CCCCCC";
|
|
36848
|
-
|
|
36849
36846
|
if(ic.seqStartLen && ic.seqStartLen[chnid]) html2 += ic.showSeqCls.insertMulGapOverview(chnid, ic.seqStartLen[chnid]);
|
|
36850
36847
|
|
|
36851
36848
|
if(me.cfg.blast_rep_id != chnid) { // regular
|
|
36852
36849
|
for(let i = 0, il = fromArray.length; i < il; ++i) {
|
|
36850
|
+
let color = this.getColorFromPos(chnid, i, titleArray);
|
|
36851
|
+
|
|
36853
36852
|
let emptyWidth;
|
|
36854
36853
|
if(titleArray) {
|
|
36855
36854
|
emptyWidth =(i == 0) ? Math.round(ic.seqAnnWidth *(fromArray[i]) / ic.maxAnnoLength) : Math.round(ic.seqAnnWidth *(fromArray[i] - toArray[i-1] - 1) / ic.maxAnnoLength);
|
|
@@ -36875,6 +36874,8 @@ class AnnoCddSite {
|
|
|
36875
36874
|
toArray2.push(toArray[i]);
|
|
36876
36875
|
}
|
|
36877
36876
|
for(let i = 0, il = fromArray2.length; i < il; ++i) {
|
|
36877
|
+
let color = this.getColorFromPos(chnid, i, titleArray);
|
|
36878
|
+
|
|
36878
36879
|
html2 += ic.showSeqCls.insertGapOverview(chnid, fromArray2[i]);
|
|
36879
36880
|
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));
|
|
36880
36881
|
html2 += '<div style="display:inline-block; width:' + emptyWidth + 'px;"> </div>';
|
|
@@ -36899,6 +36900,24 @@ class AnnoCddSite {
|
|
|
36899
36900
|
// getAdjustedResi(resi, chnid, matchedPos, chainsSeq, baseResi) { let ic = this.icn3d, me = ic.icn3dui;
|
|
36900
36901
|
// return (resi >= matchedPos[chnid] && resi - matchedPos[chnid] < ic.chainsSeq[chnid].length) ? ic.chainsSeq[chnid][resi - matchedPos[chnid]].resi : baseResi[chnid] + 1 + resi;
|
|
36901
36902
|
// }
|
|
36903
|
+
getColorFromPos(chainid, pos, bIg) { let ic = this.icn3d; ic.icn3dui;
|
|
36904
|
+
let color;
|
|
36905
|
+
|
|
36906
|
+
let resid = chainid + '_' + ic.ParserUtilsCls.getResi(chainid, pos);
|
|
36907
|
+
// if(!bIg) {
|
|
36908
|
+
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
36909
|
+
let colorStr =(!atom || atom.color === undefined || atom.color.getHexString() === 'FFFFFF') ? 'DDDDDD' : atom.color.getHexString();
|
|
36910
|
+
color =(atom && atom.color !== undefined) ? colorStr : "CCCCCC";
|
|
36911
|
+
// }
|
|
36912
|
+
// else {
|
|
36913
|
+
// let refnumLabel = ic.resid2refnum[resid];
|
|
36914
|
+
// let refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
|
|
36915
|
+
// let currStrand = refnumLabel.replace(new RegExp(refnumStr_ori,'g'), '');
|
|
36916
|
+
// color = ic.annoIgCls.getRefnumColor(currStrand, true).substr(1);
|
|
36917
|
+
// }
|
|
36918
|
+
|
|
36919
|
+
return color;
|
|
36920
|
+
}
|
|
36902
36921
|
|
|
36903
36922
|
showAnnoType(chnid, chnidBase, type, title, residueArray, resid2resids) { let ic = this.icn3d, me = ic.icn3dui;
|
|
36904
36923
|
let html = '<div id="' + ic.pre + chnid + '_' + type + 'seq_sequence" class="icn3d-dl_sequence">';
|
|
@@ -37556,7 +37575,7 @@ class AnnoIg {
|
|
|
37556
37575
|
async showIg(chnid, template) { let ic = this.icn3d; ic.icn3dui;
|
|
37557
37576
|
if(!ic.bRunRefnum || Object.keys(ic.atoms).length > Object.keys(ic.hAtoms).length) {
|
|
37558
37577
|
await ic.refnumCls.showIgRefNum(template);
|
|
37559
|
-
ic.bRunRefnum = true;
|
|
37578
|
+
ic.bRunRefnum = true;
|
|
37560
37579
|
}
|
|
37561
37580
|
|
|
37562
37581
|
let type = 'ig';
|
|
@@ -37601,7 +37620,6 @@ class AnnoIg {
|
|
|
37601
37620
|
|
|
37602
37621
|
showRefNum(giSeq, chnid, kabat_or_imgt, bCustom) { let ic = this.icn3d, me = ic.icn3dui;
|
|
37603
37622
|
let html = '', html2 = '', html3 = '';
|
|
37604
|
-
let type = 'ig';
|
|
37605
37623
|
|
|
37606
37624
|
if(!ic.chainid2refpdbname[chnid]) return {html: html, html2: html2, html3: html3};
|
|
37607
37625
|
|
|
@@ -37640,7 +37658,7 @@ class AnnoIg {
|
|
|
37640
37658
|
}
|
|
37641
37659
|
|
|
37642
37660
|
// auto-generate ref numbers for loops
|
|
37643
|
-
let
|
|
37661
|
+
let currStrand = '', prevStrand = '';
|
|
37644
37662
|
let refnumLabel, refnumStr_ori, refnumStr, postfix, strandPostfix, refnum, refnum3c, refnum2c;
|
|
37645
37663
|
let bExtendedStrand = false, bSecThird9 = false;
|
|
37646
37664
|
|
|
@@ -37676,7 +37694,7 @@ class AnnoIg {
|
|
|
37676
37694
|
bFoundAnchor = false;
|
|
37677
37695
|
}
|
|
37678
37696
|
|
|
37679
|
-
if(prevStrand.substr(0,1) == 'G' && !refnumLabel) { // indicate the end of an IG domain
|
|
37697
|
+
if((prevStrand.substr(0,1) == 'F' || prevStrand.substr(0,1) == 'G') && !refnumLabel) { // indicate the end of an IG domain
|
|
37680
37698
|
bStart = false;
|
|
37681
37699
|
}
|
|
37682
37700
|
|
|
@@ -37810,7 +37828,13 @@ class AnnoIg {
|
|
|
37810
37828
|
|
|
37811
37829
|
// 2. remove strands with less than 3 residues except G strand
|
|
37812
37830
|
for(let il = strandArray.length, i = il - 1; i >= 0; --i) {
|
|
37813
|
-
|
|
37831
|
+
let strandTmp = strandArray[i].strand.substr(0, 1);
|
|
37832
|
+
if(strandTmp != 'G' && strandArray[i].endRefnum - strandArray[i].startRefnum + 1 < 3) { // remove the strand
|
|
37833
|
+
if(strandTmp == 'B' || strandTmp == 'C' || strandTmp == 'E' || strandTmp == 'F') {
|
|
37834
|
+
if(!me.bNode) console.log("Some of the Ig strands B, C, E, F are missing...");
|
|
37835
|
+
return {html: '', html2: '', html3: ''};
|
|
37836
|
+
}
|
|
37837
|
+
|
|
37814
37838
|
if(i != il - 1) { // modify
|
|
37815
37839
|
strandArray[i + 1].loopResCnt += strandArray[i].loopResCnt + parseInt(strandArray[i].endResi) - parseInt(strandArray[i].startResi) + 1;
|
|
37816
37840
|
}
|
|
@@ -37961,7 +37985,8 @@ class AnnoIg {
|
|
|
37961
37985
|
}
|
|
37962
37986
|
}
|
|
37963
37987
|
else {
|
|
37964
|
-
if(prevStrandCnt >= 0
|
|
37988
|
+
if(prevStrandCnt >= 0
|
|
37989
|
+
&& (strandArray[prevStrandCnt].strand.substr(0, 1) == 'F' || strandArray[prevStrandCnt].strand.substr(0, 1) == 'G')) {
|
|
37965
37990
|
if(!bAfterGstrand) {
|
|
37966
37991
|
//loopCnt = 0;
|
|
37967
37992
|
refnumLabelNoPostfix = undefined;
|
|
@@ -38086,15 +38111,30 @@ class AnnoIg {
|
|
|
38086
38111
|
}
|
|
38087
38112
|
}
|
|
38088
38113
|
|
|
38114
|
+
// add color to atoms
|
|
38115
|
+
if(ic.bShowRefnum) {
|
|
38116
|
+
ic.opts.color = 'ig strand';
|
|
38117
|
+
ic.setColorCls.setColorByOptions(ic.opts, ic.dAtoms);
|
|
38118
|
+
}
|
|
38119
|
+
|
|
38120
|
+
return this.getIgAnnoHtml(chnid, giSeq, bCustom, kabat_or_imgt);
|
|
38121
|
+
}
|
|
38122
|
+
|
|
38123
|
+
getIgAnnoHtml(chnid, giSeq, bCustom, kabat_or_imgt) { let ic = this.icn3d, me = ic.icn3dui;
|
|
38124
|
+
let html = '', html2 = '', html3 = '';
|
|
38125
|
+
let type = 'ig';
|
|
38126
|
+
|
|
38089
38127
|
if(!ic.chain2igArray) ic.chain2igArray = {};
|
|
38090
38128
|
ic.chain2igArray[chnid] = [];
|
|
38091
38129
|
|
|
38092
38130
|
let igElem = {};
|
|
38093
|
-
bStart = false;
|
|
38094
38131
|
let currStrand_ori;
|
|
38095
|
-
prevStrand = undefined;
|
|
38132
|
+
let prevStrand = undefined;
|
|
38096
38133
|
let prevPos;
|
|
38097
38134
|
|
|
38135
|
+
let bLoop = false, currStrand = '';
|
|
38136
|
+
let refnumLabel, refnumStr_ori, refnumStr;
|
|
38137
|
+
|
|
38098
38138
|
// show tracks
|
|
38099
38139
|
let htmlIg = '';
|
|
38100
38140
|
for(let i = 0, il = giSeq.length; i < il; ++i) {
|
|
@@ -38128,7 +38168,6 @@ class AnnoIg {
|
|
|
38128
38168
|
}
|
|
38129
38169
|
else {
|
|
38130
38170
|
refnumStr = refnumStr_ori;
|
|
38131
|
-
refnum = parseInt(refnumStr);
|
|
38132
38171
|
}
|
|
38133
38172
|
|
|
38134
38173
|
let prevStrandFirstLet = (prevStrand) ? prevStrand.substr(0, 1) : '';
|
|
@@ -38284,9 +38323,9 @@ class AnnoIg {
|
|
|
38284
38323
|
for(let i = 0, il = fromArray.length; i < il; ++i) {
|
|
38285
38324
|
let resi = ic.ParserUtilsCls.getResi(chnid, fromArray[i]);
|
|
38286
38325
|
let resid = chnid + "_" + resi;
|
|
38287
|
-
let atom = ic.firstAtomObjCls.
|
|
38288
|
-
let colorStr =(atom.color === undefined || atom.color.getHexString() === 'FFFFFF') ? 'DDDDDD' : atom.color.getHexString();
|
|
38289
|
-
let color =(atom.color !== undefined) ? colorStr : "CCCCCC";
|
|
38326
|
+
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
38327
|
+
let colorStr =(!atom || atom.color === undefined || atom.color.getHexString() === 'FFFFFF') ? 'DDDDDD' : atom.color.getHexString();
|
|
38328
|
+
let color =(atom && atom.color !== undefined) ? colorStr : "CCCCCC";
|
|
38290
38329
|
|
|
38291
38330
|
let emptyWidth =(i == 0) ? Math.round(ic.seqAnnWidth *(fromArray[i]) / ic.maxAnnoLength) :
|
|
38292
38331
|
Math.round(ic.seqAnnWidth *(fromArray[i] - toArray[i-1] - 1) / ic.maxAnnoLength);
|
|
@@ -40557,6 +40596,7 @@ class Domain3d {
|
|
|
40557
40596
|
}
|
|
40558
40597
|
if(list_parts_item.length >= this.min_sse) list_partsTmp.push(list_parts[i]);
|
|
40559
40598
|
}
|
|
40599
|
+
|
|
40560
40600
|
list_parts = list_partsTmp;
|
|
40561
40601
|
|
|
40562
40602
|
//for (lplet = list_parts.begin(); lplet != list_parts.end(); lpint++) {
|
|
@@ -43247,8 +43287,8 @@ class Annotation {
|
|
|
43247
43287
|
// ic.bIgShown = true;
|
|
43248
43288
|
|
|
43249
43289
|
if(ic.bShowRefnum) {
|
|
43250
|
-
ic.opts.color = 'ig strand';
|
|
43251
|
-
ic.setColorCls.setColorByOptions(ic.opts, ic.dAtoms);
|
|
43290
|
+
// ic.opts.color = 'ig strand';
|
|
43291
|
+
// ic.setColorCls.setColorByOptions(ic.opts, ic.dAtoms);
|
|
43252
43292
|
|
|
43253
43293
|
ic.hlUpdateCls.updateHlAll();
|
|
43254
43294
|
ic.drawCls.draw();
|
|
@@ -66511,26 +66551,27 @@ class Dssp {
|
|
|
66511
66551
|
let seg = queryData[0].segs[j];
|
|
66512
66552
|
let resi = seg.t_start;
|
|
66513
66553
|
let resid = chainid + '_' + resi;
|
|
66554
|
+
let q_start = parseInt(seg.q_start);
|
|
66514
66555
|
|
|
66515
|
-
if(
|
|
66556
|
+
if(q_start > 2540 && q_start < 2560) {
|
|
66516
66557
|
bBstrand = true;
|
|
66517
66558
|
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
66518
|
-
|
|
66559
|
+
if(atom.ss == 'helix') bBSheet = false;
|
|
66519
66560
|
}
|
|
66520
|
-
else if(
|
|
66561
|
+
else if(q_start > 3540 && q_start < 3560) {
|
|
66521
66562
|
bCstrand = true;
|
|
66522
66563
|
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
66523
|
-
|
|
66564
|
+
if(atom.ss == 'helix') bCSheet = false;
|
|
66524
66565
|
}
|
|
66525
|
-
else if(
|
|
66566
|
+
else if(q_start > 7540 && q_start < 7560) {
|
|
66526
66567
|
bEstrand = true;
|
|
66527
66568
|
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
66528
|
-
|
|
66569
|
+
if(atom.ss == 'helix') bESheet = false;
|
|
66529
66570
|
}
|
|
66530
|
-
else if(
|
|
66571
|
+
else if(q_start > 8540 && q_start < 8560) {
|
|
66531
66572
|
bFstrand = true;
|
|
66532
66573
|
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
66533
|
-
|
|
66574
|
+
if(atom.ss == 'helix') bFSheet = false;
|
|
66534
66575
|
}
|
|
66535
66576
|
|
|
66536
66577
|
//if(bBstrand && bCstrand && bEstrand && bFstrand && bGstrand) break;
|
|
@@ -66538,9 +66579,10 @@ class Dssp {
|
|
|
66538
66579
|
}
|
|
66539
66580
|
|
|
66540
66581
|
if(!(bBstrand && bCstrand && bEstrand && bFstrand) || !(bBSheet && bCSheet && bESheet && bFSheet)) {
|
|
66541
|
-
//if(!(bBstrand && bCstrand && bEstrand && bFstrand)) {
|
|
66582
|
+
// if(!(bBstrand && bCstrand && bEstrand && bFstrand)) {
|
|
66542
66583
|
if(!me.bNode && !(bBstrand && bCstrand && bEstrand && bFstrand)) console.log("Some of the Ig strands B, C, E, F are missing in the domain " + domainid + "...");
|
|
66543
66584
|
if(!me.bNode && !(bBSheet && bCSheet && bESheet && bFSheet)) console.log("Some of the Ig strands B, C, E, F are not beta sheets...");
|
|
66585
|
+
// 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 + "...");
|
|
66544
66586
|
if(ic.domainid2refpdbname[domainid] == refpdbname) {
|
|
66545
66587
|
delete ic.domainid2refpdbname[domainid];
|
|
66546
66588
|
delete ic.domainid2score[domainid];
|
|
@@ -66838,9 +66880,13 @@ class Dssp {
|
|
|
66838
66880
|
refnumLabel = this.getLabelFromRefnum(refnum, currStrandFinal);
|
|
66839
66881
|
}
|
|
66840
66882
|
|
|
66841
|
-
ic.
|
|
66842
|
-
|
|
66843
|
-
|
|
66883
|
+
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
66884
|
+
// only sheet or loop will be aligned
|
|
66885
|
+
if(atom.ss != 'helix') {
|
|
66886
|
+
ic.resid2refnum[resid] = refnumLabel;
|
|
66887
|
+
ic.resid2refnum_ori[resid] = refnumLabel;
|
|
66888
|
+
ic.resid2domainid[resid] = domainid;
|
|
66889
|
+
}
|
|
66844
66890
|
|
|
66845
66891
|
// final reference numbers will be assign in ic.annoIgCls.showRefNum()
|
|
66846
66892
|
|
|
@@ -67187,6 +67233,8 @@ class Dssp {
|
|
|
67187
67233
|
}
|
|
67188
67234
|
|
|
67189
67235
|
async promiseWithFixedJobs(ajaxArray) { let ic = this.icn3d, me = ic.icn3dui;
|
|
67236
|
+
if(!me.bNode) me.icn3d.ParserUtilsCls.showLoading();
|
|
67237
|
+
|
|
67190
67238
|
let dataArray3 = [];
|
|
67191
67239
|
//let allPromise = Promise.allSettled(ajaxArray);
|
|
67192
67240
|
//dataArray3 = await allPromise;
|
|
@@ -67209,6 +67257,8 @@ class Dssp {
|
|
|
67209
67257
|
dataArray3 = dataArray3.concat(currDataArray);
|
|
67210
67258
|
}
|
|
67211
67259
|
|
|
67260
|
+
if(!me.bNode) me.icn3d.ParserUtilsCls.hideLoading();
|
|
67261
|
+
|
|
67212
67262
|
return dataArray3;
|
|
67213
67263
|
}
|
|
67214
67264
|
}
|