icn3d 3.29.10 → 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.module.js CHANGED
@@ -12814,12 +12814,17 @@ class SetDialog {
12814
12814
 
12815
12815
  //html += me.htmlCls.setHtmlCls.getOptionHtml(['0', '10', '20', '30', '40', '50', '60', '70', '80', '90', '100'], 3);
12816
12816
  let group2tpl = {};
12817
- group2tpl['V'] = ['FAB-HEAVY_5esv_V-n1', 'FAB-LIGHT_5esv_V-n1', 'VNAR_1t6vN_shark_V', 'TCRa_6jxrm_human_V-n1', 'VISTA_6oilA_human_V', 'CD8a_1cd8A_human_V', 'PD1_4zqkB_human_V', 'ICOS_6x4gA_human_V', 'CD28_1yjdC_human_V', 'PDL1_4z18B_human_V-n1', 'CD2_1hnfA_human_V-n1', 'LAG3_7tzgD_human_V-n1'];
12818
- group2tpl['C1'] = ['FAB-LIGHT_5esv_C1-n2', 'GHR_1axiB_human_FN3-n1', 'VTCN1_Q7Z7D3_human_V-n2', 'B2Microglobulin_7phrL_human_C1', 'FAB-HEAVY_5esv_C1-n2', 'MHCIa_7phrH_human_C1', 'TCRa_6jxrm_human_C1-n2'];
12819
- group2tpl['C2'] = ['CD2_1hnfA_human_C2-n2', 'Siglec3_5j0bB_human_C2-n2', 'LAG3_7tzgD_human_C2-n2', 'Contactin1_3s97C_human_C2-n2'];
12820
- group2tpl['Iset'] = ['BTLA_2aw2A_human_Iset', 'Palladin_2dm3A_human_Iset-n1', 'Titin_4uowM_human_Unk-n152', 'JAM1_1nbqA_human_VorIset-n2', 'CD19_6al5A_human_C2orV-n1'];
12821
- group2tpl['FN3'] = ['InsulinR_8guyE_human_FN3-n1', 'IL6Rb_1bquB_human_FN3-n3', 'Sidekick2_1wf5A_human_FN3-n7', 'InsulinR_8guyE_human_FN3-n2', 'Contactin1_2ee2A_human_FN3-n9', 'IL6Rb_1bquB_human_FN3-n2'];
12822
- group2tpl['Other'] = ['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4', 'CoAtomerGamma1_1r4xA_human', 'TP34_2o6cA_bacteria', 'RBPJ_6py8C_human_Unk-n2', 'TP47_1o75A_bacteria', 'C3_2qkiD_human_n1', 'BArrestin1_4jqiA_rat_n1', 'RBPJ_6py8C_human_Unk-n1', 'CuZnSuperoxideDismutase_1hl5C_human', 'TEAD1_3kysC_human', 'ASF1A_2iijA_human', 'MPT63_1lmiA_bacteria', 'NaCaExchanger_2fwuA_dog_n2', 'ORF7a_1xakA_virus', 'ECadherin_4zt1A_human_n2', 'NaKATPaseTransporterBeta_2zxeB_spurdogshark', 'LaminAC_1ifrA_human', 'IsdA_2iteA_bacteria'];
12817
+ group2tpl['V'] = ['CD28_1yjdC_human_V', 'CD2_1hnfA_human_V-n1', 'CD8a_1cd8A_human_V', 'FAB-HEAVY_5esv_V-n1', 'FAB-LIGHT_5esv_V-n1', 'ICOS_6x4gA_human_V', 'LAG3_7tzgD_human_V-n1', 'PDL1_4z18B_human_V-n1', 'PD1_4zqkB_human_V', 'TCRa_6jxrm_human_V-n1', 'VISTA_6oilA_human_V', 'VNAR_1t6vN_shark_V'];
12818
+ group2tpl['C1'] = ['B2Microglobulin_7phrL_human_C1', 'FAB-LIGHT_5esv_C1-n2', 'FAB-HEAVY_5esv_C1-n2', 'GHR_1axiB_human_FN3-n1', 'MHCIa_7phrH_human_C1', 'TCRa_6jxrm_human_C1-n2', 'VTCN1_Q7Z7D3_human_V-n2'];
12819
+ group2tpl['C2'] = ['CD2_1hnfA_human_C2-n2', 'Contactin1_3s97C_human_C2-n2', 'LAG3_7tzgD_human_C2-n2', 'Siglec3_5j0bB_human_C2-n2'];
12820
+ group2tpl['I'] = ['BTLA_2aw2A_human_Iset', 'CD19_6al5A_human_C2orV-n1', 'JAM1_1nbqA_human_VorIset-n2', 'Palladin_2dm3A_human_Iset-n1', 'Titin_4uowM_human_Unk-n152'];
12821
+ group2tpl['E'] = ['ASF1A_2iijA_human', 'CoAtomerGamma1_1r4xA_human', 'Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4', 'IsdA_2iteA_bacteria', 'MPT63_1lmiA_bacteria', 'NaCaExchanger_2fwuA_dog_n2', 'NaKATPaseTransporterBeta_2zxeB_spurdogshark', 'TP34_2o6cA_bacteria', 'TP47_1o75A_bacteria', 'TEAD1_3kysC_human'];
12822
+
12823
+ group2tpl['FN3'] = ['Contactin1_2ee2A_human_FN3-n9', 'IL6Rb_1bquB_human_FN3-n2', 'IL6Rb_1bquB_human_FN3-n3', 'InsulinR_8guyE_human_FN3-n1', 'InsulinR_8guyE_human_FN3-n2', 'Sidekick2_1wf5A_human_FN3-n7'];
12824
+
12825
+ group2tpl['FN3-like'] = ['BArrestin1_4jqiA_rat_n1', 'C3_2qkiD_human_n1', 'RBPJ_6py8C_human_Unk-n1', 'RBPJ_6py8C_human_Unk-n2'];
12826
+
12827
+ group2tpl['Other'] = ['CuZnSuperoxideDismutase_1hl5C_human', 'ECadherin_4zt1A_human_n2', 'LaminAC_1ifrA_human', 'ORF7a_1xakA_virus'];
12823
12828
 
12824
12829
  for(let group in group2tpl) {
12825
12830
  html += "<optgroup label='" + group + "'>";
@@ -12874,6 +12879,7 @@ class SetDialog {
12874
12879
  html += "</tr><tr>";
12875
12880
  html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_ig'>Ig Domains" + me.htmlCls.space2 + "</span></td>";
12876
12881
  */
12882
+
12877
12883
  html += "<td></td>";
12878
12884
  html += "</tr></table></div></div>";
12879
12885
 
@@ -37666,7 +37672,8 @@ class AnnoCddSite {
37666
37672
 
37667
37673
  //var setname = chnid + "_" + domain + "_" + index + "_" + r; //chnid + "_" + type + "_" + index + "_" + r;
37668
37674
  let setname = chnid + "_" + domain;
37669
- if(type != 'domain') setname += "_" + index + "_" + r; // + acc2domain[acc];
37675
+ // if(type != 'domain') setname += "_" + index + "_" + r;
37676
+ if(type != 'domain') setname = chnid + "_" + index + "_" + r + "_" + domain;
37670
37677
 
37671
37678
  if(type == 'domain') pssmid2fromArray[pssmid] = fromArray;
37672
37679
  if(type == 'domain') pssmid2toArray[pssmid] = toArray;
@@ -37737,14 +37744,12 @@ class AnnoCddSite {
37737
37744
 
37738
37745
  if(ic.seqStartLen && ic.seqStartLen[chnid]) html += ic.showSeqCls.insertMulGap(ic.seqEndLen[chnid], '-');
37739
37746
 
37740
- let atom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.chains[chnid]);
37741
- let colorStr =(atom.color === undefined || atom.color.getHexString() === 'FFFFFF') ? 'DDDDDD' : atom.color.getHexString();
37742
- let color =(atom.color !== undefined) ? colorStr : "CCCCCC";
37743
-
37744
37747
  if(ic.seqStartLen && ic.seqStartLen[chnid]) html2 += ic.showSeqCls.insertMulGapOverview(chnid, ic.seqStartLen[chnid]);
37745
37748
 
37746
37749
  if(me.cfg.blast_rep_id != chnid) { // regular
37747
37750
  for(let i = 0, il = fromArray.length; i < il; ++i) {
37751
+ let color = this.getColorFromPos(chnid, i, titleArray);
37752
+
37748
37753
  let emptyWidth;
37749
37754
  if(titleArray) {
37750
37755
  emptyWidth =(i == 0) ? Math.round(ic.seqAnnWidth *(fromArray[i]) / ic.maxAnnoLength) : Math.round(ic.seqAnnWidth *(fromArray[i] - toArray[i-1] - 1) / ic.maxAnnoLength);
@@ -37770,6 +37775,8 @@ class AnnoCddSite {
37770
37775
  toArray2.push(toArray[i]);
37771
37776
  }
37772
37777
  for(let i = 0, il = fromArray2.length; i < il; ++i) {
37778
+ let color = this.getColorFromPos(chnid, i, titleArray);
37779
+
37773
37780
  html2 += ic.showSeqCls.insertGapOverview(chnid, fromArray2[i]);
37774
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));
37775
37782
  html2 += '<div style="display:inline-block; width:' + emptyWidth + 'px;">&nbsp;</div>';
@@ -37794,6 +37801,24 @@ class AnnoCddSite {
37794
37801
  // getAdjustedResi(resi, chnid, matchedPos, chainsSeq, baseResi) { let ic = this.icn3d, me = ic.icn3dui;
37795
37802
  // return (resi >= matchedPos[chnid] && resi - matchedPos[chnid] < ic.chainsSeq[chnid].length) ? ic.chainsSeq[chnid][resi - matchedPos[chnid]].resi : baseResi[chnid] + 1 + resi;
37796
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
+ }
37797
37822
 
37798
37823
  showAnnoType(chnid, chnidBase, type, title, residueArray, resid2resids) { let ic = this.icn3d, me = ic.icn3dui;
37799
37824
  let html = '<div id="' + ic.pre + chnid + '_' + type + 'seq_sequence" class="icn3d-dl_sequence">';
@@ -38451,7 +38476,7 @@ class AnnoIg {
38451
38476
  async showIg(chnid, template) { let ic = this.icn3d; ic.icn3dui;
38452
38477
  if(!ic.bRunRefnum || Object.keys(ic.atoms).length > Object.keys(ic.hAtoms).length) {
38453
38478
  await ic.refnumCls.showIgRefNum(template);
38454
- ic.bRunRefnum = true;
38479
+ ic.bRunRefnum = true;
38455
38480
  }
38456
38481
 
38457
38482
  let type = 'ig';
@@ -38496,7 +38521,6 @@ class AnnoIg {
38496
38521
 
38497
38522
  showRefNum(giSeq, chnid, kabat_or_imgt, bCustom) { let ic = this.icn3d, me = ic.icn3dui;
38498
38523
  let html = '', html2 = '', html3 = '';
38499
- let type = 'ig';
38500
38524
 
38501
38525
  if(!ic.chainid2refpdbname[chnid]) return {html: html, html2: html2, html3: html3};
38502
38526
 
@@ -38535,7 +38559,7 @@ class AnnoIg {
38535
38559
  }
38536
38560
 
38537
38561
  // auto-generate ref numbers for loops
38538
- let bLoop = false, currStrand = '', prevStrand = '';
38562
+ let currStrand = '', prevStrand = '';
38539
38563
  let refnumLabel, refnumStr_ori, refnumStr, postfix, strandPostfix, refnum, refnum3c, refnum2c;
38540
38564
  let bExtendedStrand = false, bSecThird9 = false;
38541
38565
 
@@ -38571,7 +38595,7 @@ class AnnoIg {
38571
38595
  bFoundAnchor = false;
38572
38596
  }
38573
38597
 
38574
- 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
38575
38599
  bStart = false;
38576
38600
  }
38577
38601
 
@@ -38856,7 +38880,8 @@ class AnnoIg {
38856
38880
  }
38857
38881
  }
38858
38882
  else {
38859
- if(prevStrandCnt >= 0 && strandArray[prevStrandCnt].strand.substr(0, 1) == 'G') {
38883
+ if(prevStrandCnt >= 0
38884
+ && (strandArray[prevStrandCnt].strand.substr(0, 1) == 'F' || strandArray[prevStrandCnt].strand.substr(0, 1) == 'G')) {
38860
38885
  if(!bAfterGstrand) {
38861
38886
  //loopCnt = 0;
38862
38887
  refnumLabelNoPostfix = undefined;
@@ -38981,15 +39006,30 @@ class AnnoIg {
38981
39006
  }
38982
39007
  }
38983
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
+
38984
39022
  if(!ic.chain2igArray) ic.chain2igArray = {};
38985
39023
  ic.chain2igArray[chnid] = [];
38986
39024
 
38987
39025
  let igElem = {};
38988
- bStart = false;
38989
39026
  let currStrand_ori;
38990
- prevStrand = undefined;
39027
+ let prevStrand = undefined;
38991
39028
  let prevPos;
38992
39029
 
39030
+ let bLoop = false, currStrand = '';
39031
+ let refnumLabel, refnumStr_ori, refnumStr;
39032
+
38993
39033
  // show tracks
38994
39034
  let htmlIg = '';
38995
39035
  for(let i = 0, il = giSeq.length; i < il; ++i) {
@@ -39023,7 +39063,6 @@ class AnnoIg {
39023
39063
  }
39024
39064
  else {
39025
39065
  refnumStr = refnumStr_ori;
39026
- refnum = parseInt(refnumStr);
39027
39066
  }
39028
39067
 
39029
39068
  let prevStrandFirstLet = (prevStrand) ? prevStrand.substr(0, 1) : '';
@@ -39126,11 +39165,11 @@ class AnnoIg {
39126
39165
  htmlTmp += '<span class="icn3d-residueNum"></span>';
39127
39166
  }
39128
39167
  else if(kabat_or_imgt == 1) {
39129
- htmlTmp += '<div class="icn3d-annoTitle" anno="0" title="Kabat Reference Numbers ' + refStruTitle + '">Kabat Ref. No.</div>';
39168
+ htmlTmp += '<div class="icn3d-annoTitle" anno="0" title="Kabat Reference Numbers">Kabat Ref. No.</div>';
39130
39169
  htmlTmp += '<span class="icn3d-residueNum"></span>';
39131
39170
  }
39132
39171
  else if(kabat_or_imgt == 2) {
39133
- htmlTmp += '<div class="icn3d-annoTitle" anno="0" title="IMGT Reference Numbers ' + refStruTitle + '">IMGT Ref. No.</div>';
39172
+ htmlTmp += '<div class="icn3d-annoTitle" anno="0" title="IMGT Reference Numbers">IMGT Ref. No.</div>';
39134
39173
  htmlTmp += '<span class="icn3d-residueNum"></span>';
39135
39174
  }
39136
39175
  else {
@@ -39157,6 +39196,7 @@ class AnnoIg {
39157
39196
  let igArray = ic.chain2igArray[chnid];
39158
39197
  if(igArray.length == 0) return {html: '', html2: '', html3: ''};
39159
39198
  let rangeArray = [], titleArray = [], fullTitleArray = [], domainArray = [];
39199
+
39160
39200
  for(let i = 0, il = igArray.length; i < il; ++i) {
39161
39201
  let domainid = igArray[i].domainid;
39162
39202
  let info = ic.domainid2info[domainid];
@@ -39178,9 +39218,9 @@ class AnnoIg {
39178
39218
  for(let i = 0, il = fromArray.length; i < il; ++i) {
39179
39219
  let resi = ic.ParserUtilsCls.getResi(chnid, fromArray[i]);
39180
39220
  let resid = chnid + "_" + resi;
39181
- let atom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid]);
39182
- let colorStr =(atom.color === undefined || atom.color.getHexString() === 'FFFFFF') ? 'DDDDDD' : atom.color.getHexString();
39183
- 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";
39184
39224
 
39185
39225
  let emptyWidth =(i == 0) ? Math.round(ic.seqAnnWidth *(fromArray[i]) / ic.maxAnnoLength) :
39186
39226
  Math.round(ic.seqAnnWidth *(fromArray[i] - toArray[i-1] - 1) / ic.maxAnnoLength);
@@ -40558,12 +40598,16 @@ class Domain3d {
40558
40598
 
40559
40599
  // this.elements from the this.top of the this.stack
40560
40600
  //elts = &this.elements[this.stack[this.top - 1]];
40601
+
40561
40602
  for(i = this.stack[this.top - 1], il = this.elements.length; i < il; ++i) {
40562
40603
  elts.push(this.elements[i]);
40563
40604
  }
40564
40605
 
40565
40606
  // generate the partition based on the cut //
40566
- for (i = ne = ne0 = ne1 = 0, prt = prt0, t = -1; i < k; i++) {
40607
+ // for (i = ne = ne0 = ne1 = 0, prt = prt0, t = -1; i < k; i++) {
40608
+ let bAtZero = true;
40609
+ prt = prt0;
40610
+ for (i = ne = ne0 = ne1 = 0, t = -1; i < k; i++) {
40567
40611
  // write the this.elements into prt //
40568
40612
  for (j = t + 1; j <= cut[i]; j++)
40569
40613
  prt[ne++] = elts[j];
@@ -40571,15 +40615,20 @@ class Domain3d {
40571
40615
  t = cut[i];
40572
40616
 
40573
40617
  // switch the partition //
40574
- if (prt == prt0) {
40618
+ // if (prt == prt0) {
40619
+ if (bAtZero) {
40575
40620
  ne0 = ne;
40576
40621
  prt = prt1;
40577
40622
  ne = ne1;
40623
+
40624
+ bAtZero = false;
40578
40625
  }
40579
40626
  else {
40580
40627
  ne1 = ne;
40581
40628
  prt = prt0;
40582
40629
  ne = ne0;
40630
+
40631
+ bAtZero = true;
40583
40632
  }
40584
40633
  }
40585
40634
 
@@ -40587,7 +40636,8 @@ class Domain3d {
40587
40636
  for (j = t + 1; j < n; j++)
40588
40637
  prt[ne++] = elts[j];
40589
40638
 
40590
- if (prt == prt0)
40639
+ // if (prt == prt0)
40640
+ if (bAtZero)
40591
40641
  ne0 = ne;
40592
40642
  else
40593
40643
  ne1 = ne;
@@ -41256,6 +41306,8 @@ class Domain3d {
41256
41306
  let ss1 = parseInt(ssPair[0]);
41257
41307
  let ss2 = parseInt(ssPair[1]);
41258
41308
 
41309
+ if(ctable[pair] < this.min_contacts) ctable[pair] = 0;
41310
+
41259
41311
  // both are sheets
41260
41312
  // min number of contacts: this.min_contacts
41261
41313
  if(substruct[ss1 - 1].Sheet && substruct[ss2 - 1].Sheet && ctable[pair] >= this.min_contacts ) {
@@ -41266,7 +41318,7 @@ class Domain3d {
41266
41318
  sheetNeighbor[ss2][ss1] = 1;
41267
41319
  }
41268
41320
  }
41269
-
41321
+
41270
41322
  //https://www.geeksforgeeks.org/number-groups-formed-graph-friends/
41271
41323
  let existing_groups = 0;
41272
41324
  let sheet2sheetnum = {};
@@ -41289,12 +41341,13 @@ class Domain3d {
41289
41341
  // get sheet2sheetnum
41290
41342
  // each neighboring sheet will be represented by the sheet with the smallest sse
41291
41343
  for(let groupnum in this.groupnum2sheet) {
41292
- let ssArray = this.groupnum2sheet[groupnum].sort();
41344
+ let ssArray = this.groupnum2sheet[groupnum].sort(function(a, b){return a-b});
41293
41345
  for(let i = 0, il = ssArray.length; i < il; ++i) {
41294
41346
  sheet2sheetnum[ssArray[i]] = ssArray[0];
41295
41347
  }
41296
41348
  }
41297
41349
 
41350
+ let invalidSheethash = {};
41298
41351
  for (let i = 0; i < nsse; i++) {
41299
41352
  if(substruct[i].Sheet) {
41300
41353
  let sheetsItem = {};
@@ -41307,6 +41360,8 @@ class Domain3d {
41307
41360
  sheetsItem.sheet_num = 0;
41308
41361
  sheetsItem.adj_strand2 = 0;
41309
41362
  sheetsItem.sse = i + 1;
41363
+
41364
+ invalidSheethash[sheetsItem.sse] = 1;
41310
41365
  }
41311
41366
 
41312
41367
  sheets.push(sheetsItem);
@@ -41338,7 +41393,7 @@ class Domain3d {
41338
41393
  }
41339
41394
  }
41340
41395
 
41341
- let minStrand = 6;
41396
+ let minStrand = 6; // number of residues in a strand
41342
41397
 
41343
41398
  if (hasSheets) {
41344
41399
  //sheets: array of sheets, each of which has the key: sheet_num (number of strands), adj_strand1, adj_strand2
@@ -41362,7 +41417,8 @@ class Domain3d {
41362
41417
  if (cnt> 0) {
41363
41418
  for (let i = 0; i < sheets.length; i++) {
41364
41419
  let bsrec = sheets[i];
41365
- this.group_num[bsrec.sse - 1] = bsrec.sheet_num;
41420
+ // this.group_num[bsrec.sse - 1] = bsrec.sheet_num;
41421
+ if(bsrec.sheet_num != 0) this.group_num[bsrec.sse - 1] = bsrec.sheet_num;
41366
41422
  }
41367
41423
  }
41368
41424
  }
@@ -41418,11 +41474,26 @@ class Domain3d {
41418
41474
  }
41419
41475
  }
41420
41476
  }
41421
-
41477
+
41422
41478
  list_parts.sort(function(v1, v2) {
41423
41479
  return v1[0] - v2[0];
41424
41480
  });
41425
41481
 
41482
+ // remove sheets less than 3 residues
41483
+ let list_partsTmp = [];
41484
+ for(let i = 0, il = list_parts.length; i < il; ++i) {
41485
+ let list_parts_item = [];
41486
+ for(let j = 0, jl = list_parts[i].length; j < jl; ++j) {
41487
+ let sse = list_parts[i][j];
41488
+ if(!invalidSheethash.hasOwnProperty(sse)) {
41489
+ list_parts_item.push(sse);
41490
+ }
41491
+ }
41492
+ if(list_parts_item.length >= this.min_sse) list_partsTmp.push(list_parts[i]);
41493
+ }
41494
+
41495
+ list_parts = list_partsTmp;
41496
+
41426
41497
  //for (lplet = list_parts.begin(); lplet != list_parts.end(); lpint++) {
41427
41498
  for (let index = 0, indexl = list_parts.length; index < indexl; ++index) {
41428
41499
  //vector<int> prts = *lpint;
@@ -44111,8 +44182,8 @@ class Annotation {
44111
44182
  // ic.bIgShown = true;
44112
44183
 
44113
44184
  if(ic.bShowRefnum) {
44114
- ic.opts.color = 'ig strand';
44115
- ic.setColorCls.setColorByOptions(ic.opts, ic.dAtoms);
44185
+ // ic.opts.color = 'ig strand';
44186
+ // ic.setColorCls.setColorByOptions(ic.opts, ic.dAtoms);
44116
44187
 
44117
44188
  ic.hlUpdateCls.updateHlAll();
44118
44189
  ic.drawCls.draw();
@@ -67369,42 +67440,50 @@ class Dssp {
67369
67440
  if(!bRound1 && queryData[0].segs) {
67370
67441
  let bBstrand = false, bCstrand = false, bEstrand = false, bFstrand = false;
67371
67442
  let bBSheet = true, bCSheet = true, bESheet = true, bFSheet = true;
67443
+ let BCnt = 0, CCnt = 0, ECnt = 0, FCnt = 0;
67372
67444
  let chainid = domainid.split(',')[0];
67373
67445
 
67374
67446
  for(let j = 0, jl = queryData[0].segs.length; j < jl; ++j) {
67375
67447
  let seg = queryData[0].segs[j];
67376
67448
  let resi = seg.t_start;
67377
67449
  let resid = chainid + '_' + resi;
67450
+ let q_start = parseInt(seg.q_start);
67378
67451
 
67379
- if(seg.q_start.indexOf('2550') != -1) {
67452
+ if(q_start > 2540 && q_start < 2560) {
67380
67453
  bBstrand = true;
67381
67454
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
67382
- bBSheet = (atom.ss == 'sheet');
67455
+ if(atom.ss == 'helix') bBSheet = false;
67456
+ ++BCnt;
67383
67457
  }
67384
- else if(seg.q_start.indexOf('3550') != -1) {
67458
+ else if(q_start > 3540 && q_start < 3560) {
67385
67459
  bCstrand = true;
67386
67460
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
67387
- bBSheet = (atom.ss == 'sheet');
67461
+ if(atom.ss == 'helix') bCSheet = false;
67462
+ ++CCnt;
67388
67463
  }
67389
- else if(seg.q_start.indexOf('7550') != -1) {
67464
+ else if(q_start > 7540 && q_start < 7560) {
67390
67465
  bEstrand = true;
67391
67466
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
67392
- bBSheet = (atom.ss == 'sheet');
67467
+ if(atom.ss == 'helix') bESheet = false;
67468
+ ++ECnt;
67393
67469
  }
67394
- else if(seg.q_start.indexOf('8550') != -1) {
67470
+ else if(q_start > 8540 && q_start < 8560) {
67395
67471
  bFstrand = true;
67396
67472
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
67397
- bBSheet = (atom.ss == 'sheet');
67473
+ if(atom.ss == 'helix') bFSheet = false;
67474
+ ++FCnt;
67398
67475
  }
67399
67476
 
67400
67477
  //if(bBstrand && bCstrand && bEstrand && bFstrand && bGstrand) break;
67401
67478
  if(bBstrand && bCstrand && bEstrand && bFstrand) break;
67402
67479
  }
67403
-
67404
- if(!(bBstrand && bCstrand && bEstrand && bFstrand) || !(bBSheet && bCSheet && bESheet && bFSheet)) {
67405
- //if(!(bBstrand && bCstrand && bEstrand && bFstrand)) {
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)) {
67406
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 + "...");
67407
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 + "...");
67408
67487
  if(ic.domainid2refpdbname[domainid] == refpdbname) {
67409
67488
  delete ic.domainid2refpdbname[domainid];
67410
67489
  delete ic.domainid2score[domainid];
@@ -67702,9 +67781,13 @@ class Dssp {
67702
67781
  refnumLabel = this.getLabelFromRefnum(refnum, currStrandFinal);
67703
67782
  }
67704
67783
 
67705
- ic.resid2refnum[resid] = refnumLabel;
67706
- ic.resid2refnum_ori[resid] = refnumLabel;
67707
- ic.resid2domainid[resid] = domainid;
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
+ }
67708
67791
 
67709
67792
  // final reference numbers will be assign in ic.annoIgCls.showRefNum()
67710
67793
 
@@ -68051,6 +68134,8 @@ class Dssp {
68051
68134
  }
68052
68135
 
68053
68136
  async promiseWithFixedJobs(ajaxArray) { let ic = this.icn3d, me = ic.icn3dui;
68137
+ if(!me.bNode) me.icn3d.ParserUtilsCls.showLoading();
68138
+
68054
68139
  let dataArray3 = [];
68055
68140
  //let allPromise = Promise.allSettled(ajaxArray);
68056
68141
  //dataArray3 = await allPromise;
@@ -68073,6 +68158,8 @@ class Dssp {
68073
68158
  dataArray3 = dataArray3.concat(currDataArray);
68074
68159
  }
68075
68160
 
68161
+ if(!me.bNode) me.icn3d.ParserUtilsCls.hideLoading();
68162
+
68076
68163
  return dataArray3;
68077
68164
  }
68078
68165
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icn3d",
3
- "version": "3.29.10",
3
+ "version": "3.29.12",
4
4
  "main": "./icn3d.js",
5
5
  "exports": {
6
6
  ".": {