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.js CHANGED
@@ -11913,12 +11913,17 @@ class SetDialog {
11913
11913
 
11914
11914
  //html += me.htmlCls.setHtmlCls.getOptionHtml(['0', '10', '20', '30', '40', '50', '60', '70', '80', '90', '100'], 3);
11915
11915
  let group2tpl = {};
11916
- 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'];
11917
- 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'];
11918
- group2tpl['C2'] = ['CD2_1hnfA_human_C2-n2', 'Siglec3_5j0bB_human_C2-n2', 'LAG3_7tzgD_human_C2-n2', 'Contactin1_3s97C_human_C2-n2'];
11919
- 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'];
11920
- 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'];
11921
- 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'];
11916
+ 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'];
11917
+ 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'];
11918
+ group2tpl['C2'] = ['CD2_1hnfA_human_C2-n2', 'Contactin1_3s97C_human_C2-n2', 'LAG3_7tzgD_human_C2-n2', 'Siglec3_5j0bB_human_C2-n2'];
11919
+ 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'];
11920
+ 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'];
11921
+
11922
+ 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'];
11923
+
11924
+ group2tpl['FN3-like'] = ['BArrestin1_4jqiA_rat_n1', 'C3_2qkiD_human_n1', 'RBPJ_6py8C_human_Unk-n1', 'RBPJ_6py8C_human_Unk-n2'];
11925
+
11926
+ group2tpl['Other'] = ['CuZnSuperoxideDismutase_1hl5C_human', 'ECadherin_4zt1A_human_n2', 'LaminAC_1ifrA_human', 'ORF7a_1xakA_virus'];
11922
11927
 
11923
11928
  for(let group in group2tpl) {
11924
11929
  html += "<optgroup label='" + group + "'>";
@@ -11973,6 +11978,7 @@ class SetDialog {
11973
11978
  html += "</tr><tr>";
11974
11979
  html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_ig'>Ig Domains" + me.htmlCls.space2 + "</span></td>";
11975
11980
  */
11981
+
11976
11982
  html += "<td></td>";
11977
11983
  html += "</tr></table></div></div>";
11978
11984
 
@@ -36765,7 +36771,8 @@ class AnnoCddSite {
36765
36771
 
36766
36772
  //var setname = chnid + "_" + domain + "_" + index + "_" + r; //chnid + "_" + type + "_" + index + "_" + r;
36767
36773
  let setname = chnid + "_" + domain;
36768
- if(type != 'domain') setname += "_" + index + "_" + r; // + acc2domain[acc];
36774
+ // if(type != 'domain') setname += "_" + index + "_" + r;
36775
+ if(type != 'domain') setname = chnid + "_" + index + "_" + r + "_" + domain;
36769
36776
 
36770
36777
  if(type == 'domain') pssmid2fromArray[pssmid] = fromArray;
36771
36778
  if(type == 'domain') pssmid2toArray[pssmid] = toArray;
@@ -36836,14 +36843,12 @@ class AnnoCddSite {
36836
36843
 
36837
36844
  if(ic.seqStartLen && ic.seqStartLen[chnid]) html += ic.showSeqCls.insertMulGap(ic.seqEndLen[chnid], '-');
36838
36845
 
36839
- let atom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.chains[chnid]);
36840
- let colorStr =(atom.color === undefined || atom.color.getHexString() === 'FFFFFF') ? 'DDDDDD' : atom.color.getHexString();
36841
- let color =(atom.color !== undefined) ? colorStr : "CCCCCC";
36842
-
36843
36846
  if(ic.seqStartLen && ic.seqStartLen[chnid]) html2 += ic.showSeqCls.insertMulGapOverview(chnid, ic.seqStartLen[chnid]);
36844
36847
 
36845
36848
  if(me.cfg.blast_rep_id != chnid) { // regular
36846
36849
  for(let i = 0, il = fromArray.length; i < il; ++i) {
36850
+ let color = this.getColorFromPos(chnid, i, titleArray);
36851
+
36847
36852
  let emptyWidth;
36848
36853
  if(titleArray) {
36849
36854
  emptyWidth =(i == 0) ? Math.round(ic.seqAnnWidth *(fromArray[i]) / ic.maxAnnoLength) : Math.round(ic.seqAnnWidth *(fromArray[i] - toArray[i-1] - 1) / ic.maxAnnoLength);
@@ -36869,6 +36874,8 @@ class AnnoCddSite {
36869
36874
  toArray2.push(toArray[i]);
36870
36875
  }
36871
36876
  for(let i = 0, il = fromArray2.length; i < il; ++i) {
36877
+ let color = this.getColorFromPos(chnid, i, titleArray);
36878
+
36872
36879
  html2 += ic.showSeqCls.insertGapOverview(chnid, fromArray2[i]);
36873
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));
36874
36881
  html2 += '<div style="display:inline-block; width:' + emptyWidth + 'px;">&nbsp;</div>';
@@ -36893,6 +36900,24 @@ class AnnoCddSite {
36893
36900
  // getAdjustedResi(resi, chnid, matchedPos, chainsSeq, baseResi) { let ic = this.icn3d, me = ic.icn3dui;
36894
36901
  // return (resi >= matchedPos[chnid] && resi - matchedPos[chnid] < ic.chainsSeq[chnid].length) ? ic.chainsSeq[chnid][resi - matchedPos[chnid]].resi : baseResi[chnid] + 1 + resi;
36895
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
+ }
36896
36921
 
36897
36922
  showAnnoType(chnid, chnidBase, type, title, residueArray, resid2resids) { let ic = this.icn3d, me = ic.icn3dui;
36898
36923
  let html = '<div id="' + ic.pre + chnid + '_' + type + 'seq_sequence" class="icn3d-dl_sequence">';
@@ -37550,7 +37575,7 @@ class AnnoIg {
37550
37575
  async showIg(chnid, template) { let ic = this.icn3d; ic.icn3dui;
37551
37576
  if(!ic.bRunRefnum || Object.keys(ic.atoms).length > Object.keys(ic.hAtoms).length) {
37552
37577
  await ic.refnumCls.showIgRefNum(template);
37553
- ic.bRunRefnum = true;
37578
+ ic.bRunRefnum = true;
37554
37579
  }
37555
37580
 
37556
37581
  let type = 'ig';
@@ -37595,7 +37620,6 @@ class AnnoIg {
37595
37620
 
37596
37621
  showRefNum(giSeq, chnid, kabat_or_imgt, bCustom) { let ic = this.icn3d, me = ic.icn3dui;
37597
37622
  let html = '', html2 = '', html3 = '';
37598
- let type = 'ig';
37599
37623
 
37600
37624
  if(!ic.chainid2refpdbname[chnid]) return {html: html, html2: html2, html3: html3};
37601
37625
 
@@ -37634,7 +37658,7 @@ class AnnoIg {
37634
37658
  }
37635
37659
 
37636
37660
  // auto-generate ref numbers for loops
37637
- let bLoop = false, currStrand = '', prevStrand = '';
37661
+ let currStrand = '', prevStrand = '';
37638
37662
  let refnumLabel, refnumStr_ori, refnumStr, postfix, strandPostfix, refnum, refnum3c, refnum2c;
37639
37663
  let bExtendedStrand = false, bSecThird9 = false;
37640
37664
 
@@ -37670,7 +37694,7 @@ class AnnoIg {
37670
37694
  bFoundAnchor = false;
37671
37695
  }
37672
37696
 
37673
- 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
37674
37698
  bStart = false;
37675
37699
  }
37676
37700
 
@@ -37955,7 +37979,8 @@ class AnnoIg {
37955
37979
  }
37956
37980
  }
37957
37981
  else {
37958
- if(prevStrandCnt >= 0 && strandArray[prevStrandCnt].strand.substr(0, 1) == 'G') {
37982
+ if(prevStrandCnt >= 0
37983
+ && (strandArray[prevStrandCnt].strand.substr(0, 1) == 'F' || strandArray[prevStrandCnt].strand.substr(0, 1) == 'G')) {
37959
37984
  if(!bAfterGstrand) {
37960
37985
  //loopCnt = 0;
37961
37986
  refnumLabelNoPostfix = undefined;
@@ -38080,15 +38105,30 @@ class AnnoIg {
38080
38105
  }
38081
38106
  }
38082
38107
 
38108
+ // add color to atoms
38109
+ if(ic.bShowRefnum) {
38110
+ ic.opts.color = 'ig strand';
38111
+ ic.setColorCls.setColorByOptions(ic.opts, ic.dAtoms);
38112
+ }
38113
+
38114
+ return this.getIgAnnoHtml(chnid, giSeq, bCustom, kabat_or_imgt);
38115
+ }
38116
+
38117
+ getIgAnnoHtml(chnid, giSeq, bCustom, kabat_or_imgt) { let ic = this.icn3d, me = ic.icn3dui;
38118
+ let html = '', html2 = '', html3 = '';
38119
+ let type = 'ig';
38120
+
38083
38121
  if(!ic.chain2igArray) ic.chain2igArray = {};
38084
38122
  ic.chain2igArray[chnid] = [];
38085
38123
 
38086
38124
  let igElem = {};
38087
- bStart = false;
38088
38125
  let currStrand_ori;
38089
- prevStrand = undefined;
38126
+ let prevStrand = undefined;
38090
38127
  let prevPos;
38091
38128
 
38129
+ let bLoop = false, currStrand = '';
38130
+ let refnumLabel, refnumStr_ori, refnumStr;
38131
+
38092
38132
  // show tracks
38093
38133
  let htmlIg = '';
38094
38134
  for(let i = 0, il = giSeq.length; i < il; ++i) {
@@ -38122,7 +38162,6 @@ class AnnoIg {
38122
38162
  }
38123
38163
  else {
38124
38164
  refnumStr = refnumStr_ori;
38125
- refnum = parseInt(refnumStr);
38126
38165
  }
38127
38166
 
38128
38167
  let prevStrandFirstLet = (prevStrand) ? prevStrand.substr(0, 1) : '';
@@ -38225,11 +38264,11 @@ class AnnoIg {
38225
38264
  htmlTmp += '<span class="icn3d-residueNum"></span>';
38226
38265
  }
38227
38266
  else if(kabat_or_imgt == 1) {
38228
- htmlTmp += '<div class="icn3d-annoTitle" anno="0" title="Kabat Reference Numbers ' + refStruTitle + '">Kabat Ref. No.</div>';
38267
+ htmlTmp += '<div class="icn3d-annoTitle" anno="0" title="Kabat Reference Numbers">Kabat Ref. No.</div>';
38229
38268
  htmlTmp += '<span class="icn3d-residueNum"></span>';
38230
38269
  }
38231
38270
  else if(kabat_or_imgt == 2) {
38232
- htmlTmp += '<div class="icn3d-annoTitle" anno="0" title="IMGT Reference Numbers ' + refStruTitle + '">IMGT Ref. No.</div>';
38271
+ htmlTmp += '<div class="icn3d-annoTitle" anno="0" title="IMGT Reference Numbers">IMGT Ref. No.</div>';
38233
38272
  htmlTmp += '<span class="icn3d-residueNum"></span>';
38234
38273
  }
38235
38274
  else {
@@ -38256,6 +38295,7 @@ class AnnoIg {
38256
38295
  let igArray = ic.chain2igArray[chnid];
38257
38296
  if(igArray.length == 0) return {html: '', html2: '', html3: ''};
38258
38297
  let rangeArray = [], titleArray = [], fullTitleArray = [], domainArray = [];
38298
+
38259
38299
  for(let i = 0, il = igArray.length; i < il; ++i) {
38260
38300
  let domainid = igArray[i].domainid;
38261
38301
  let info = ic.domainid2info[domainid];
@@ -38277,9 +38317,9 @@ class AnnoIg {
38277
38317
  for(let i = 0, il = fromArray.length; i < il; ++i) {
38278
38318
  let resi = ic.ParserUtilsCls.getResi(chnid, fromArray[i]);
38279
38319
  let resid = chnid + "_" + resi;
38280
- let atom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid]);
38281
- let colorStr =(atom.color === undefined || atom.color.getHexString() === 'FFFFFF') ? 'DDDDDD' : atom.color.getHexString();
38282
- let color =(atom.color !== undefined) ? colorStr : "CCCCCC";
38320
+ let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
38321
+ let colorStr =(!atom || atom.color === undefined || atom.color.getHexString() === 'FFFFFF') ? 'DDDDDD' : atom.color.getHexString();
38322
+ let color =(atom && atom.color !== undefined) ? colorStr : "CCCCCC";
38283
38323
 
38284
38324
  let emptyWidth =(i == 0) ? Math.round(ic.seqAnnWidth *(fromArray[i]) / ic.maxAnnoLength) :
38285
38325
  Math.round(ic.seqAnnWidth *(fromArray[i] - toArray[i-1] - 1) / ic.maxAnnoLength);
@@ -39657,12 +39697,16 @@ class Domain3d {
39657
39697
 
39658
39698
  // this.elements from the this.top of the this.stack
39659
39699
  //elts = &this.elements[this.stack[this.top - 1]];
39700
+
39660
39701
  for(i = this.stack[this.top - 1], il = this.elements.length; i < il; ++i) {
39661
39702
  elts.push(this.elements[i]);
39662
39703
  }
39663
39704
 
39664
39705
  // generate the partition based on the cut //
39665
- for (i = ne = ne0 = ne1 = 0, prt = prt0, t = -1; i < k; i++) {
39706
+ // for (i = ne = ne0 = ne1 = 0, prt = prt0, t = -1; i < k; i++) {
39707
+ let bAtZero = true;
39708
+ prt = prt0;
39709
+ for (i = ne = ne0 = ne1 = 0, t = -1; i < k; i++) {
39666
39710
  // write the this.elements into prt //
39667
39711
  for (j = t + 1; j <= cut[i]; j++)
39668
39712
  prt[ne++] = elts[j];
@@ -39670,15 +39714,20 @@ class Domain3d {
39670
39714
  t = cut[i];
39671
39715
 
39672
39716
  // switch the partition //
39673
- if (prt == prt0) {
39717
+ // if (prt == prt0) {
39718
+ if (bAtZero) {
39674
39719
  ne0 = ne;
39675
39720
  prt = prt1;
39676
39721
  ne = ne1;
39722
+
39723
+ bAtZero = false;
39677
39724
  }
39678
39725
  else {
39679
39726
  ne1 = ne;
39680
39727
  prt = prt0;
39681
39728
  ne = ne0;
39729
+
39730
+ bAtZero = true;
39682
39731
  }
39683
39732
  }
39684
39733
 
@@ -39686,7 +39735,8 @@ class Domain3d {
39686
39735
  for (j = t + 1; j < n; j++)
39687
39736
  prt[ne++] = elts[j];
39688
39737
 
39689
- if (prt == prt0)
39738
+ // if (prt == prt0)
39739
+ if (bAtZero)
39690
39740
  ne0 = ne;
39691
39741
  else
39692
39742
  ne1 = ne;
@@ -40355,6 +40405,8 @@ class Domain3d {
40355
40405
  let ss1 = parseInt(ssPair[0]);
40356
40406
  let ss2 = parseInt(ssPair[1]);
40357
40407
 
40408
+ if(ctable[pair] < this.min_contacts) ctable[pair] = 0;
40409
+
40358
40410
  // both are sheets
40359
40411
  // min number of contacts: this.min_contacts
40360
40412
  if(substruct[ss1 - 1].Sheet && substruct[ss2 - 1].Sheet && ctable[pair] >= this.min_contacts ) {
@@ -40365,7 +40417,7 @@ class Domain3d {
40365
40417
  sheetNeighbor[ss2][ss1] = 1;
40366
40418
  }
40367
40419
  }
40368
-
40420
+
40369
40421
  //https://www.geeksforgeeks.org/number-groups-formed-graph-friends/
40370
40422
  let existing_groups = 0;
40371
40423
  let sheet2sheetnum = {};
@@ -40388,12 +40440,13 @@ class Domain3d {
40388
40440
  // get sheet2sheetnum
40389
40441
  // each neighboring sheet will be represented by the sheet with the smallest sse
40390
40442
  for(let groupnum in this.groupnum2sheet) {
40391
- let ssArray = this.groupnum2sheet[groupnum].sort();
40443
+ let ssArray = this.groupnum2sheet[groupnum].sort(function(a, b){return a-b});
40392
40444
  for(let i = 0, il = ssArray.length; i < il; ++i) {
40393
40445
  sheet2sheetnum[ssArray[i]] = ssArray[0];
40394
40446
  }
40395
40447
  }
40396
40448
 
40449
+ let invalidSheethash = {};
40397
40450
  for (let i = 0; i < nsse; i++) {
40398
40451
  if(substruct[i].Sheet) {
40399
40452
  let sheetsItem = {};
@@ -40406,6 +40459,8 @@ class Domain3d {
40406
40459
  sheetsItem.sheet_num = 0;
40407
40460
  sheetsItem.adj_strand2 = 0;
40408
40461
  sheetsItem.sse = i + 1;
40462
+
40463
+ invalidSheethash[sheetsItem.sse] = 1;
40409
40464
  }
40410
40465
 
40411
40466
  sheets.push(sheetsItem);
@@ -40437,7 +40492,7 @@ class Domain3d {
40437
40492
  }
40438
40493
  }
40439
40494
 
40440
- let minStrand = 6;
40495
+ let minStrand = 6; // number of residues in a strand
40441
40496
 
40442
40497
  if (hasSheets) {
40443
40498
  //sheets: array of sheets, each of which has the key: sheet_num (number of strands), adj_strand1, adj_strand2
@@ -40461,7 +40516,8 @@ class Domain3d {
40461
40516
  if (cnt> 0) {
40462
40517
  for (let i = 0; i < sheets.length; i++) {
40463
40518
  let bsrec = sheets[i];
40464
- this.group_num[bsrec.sse - 1] = bsrec.sheet_num;
40519
+ // this.group_num[bsrec.sse - 1] = bsrec.sheet_num;
40520
+ if(bsrec.sheet_num != 0) this.group_num[bsrec.sse - 1] = bsrec.sheet_num;
40465
40521
  }
40466
40522
  }
40467
40523
  }
@@ -40517,11 +40573,26 @@ class Domain3d {
40517
40573
  }
40518
40574
  }
40519
40575
  }
40520
-
40576
+
40521
40577
  list_parts.sort(function(v1, v2) {
40522
40578
  return v1[0] - v2[0];
40523
40579
  });
40524
40580
 
40581
+ // remove sheets less than 3 residues
40582
+ let list_partsTmp = [];
40583
+ for(let i = 0, il = list_parts.length; i < il; ++i) {
40584
+ let list_parts_item = [];
40585
+ for(let j = 0, jl = list_parts[i].length; j < jl; ++j) {
40586
+ let sse = list_parts[i][j];
40587
+ if(!invalidSheethash.hasOwnProperty(sse)) {
40588
+ list_parts_item.push(sse);
40589
+ }
40590
+ }
40591
+ if(list_parts_item.length >= this.min_sse) list_partsTmp.push(list_parts[i]);
40592
+ }
40593
+
40594
+ list_parts = list_partsTmp;
40595
+
40525
40596
  //for (lplet = list_parts.begin(); lplet != list_parts.end(); lpint++) {
40526
40597
  for (let index = 0, indexl = list_parts.length; index < indexl; ++index) {
40527
40598
  //vector<int> prts = *lpint;
@@ -43210,8 +43281,8 @@ class Annotation {
43210
43281
  // ic.bIgShown = true;
43211
43282
 
43212
43283
  if(ic.bShowRefnum) {
43213
- ic.opts.color = 'ig strand';
43214
- ic.setColorCls.setColorByOptions(ic.opts, ic.dAtoms);
43284
+ // ic.opts.color = 'ig strand';
43285
+ // ic.setColorCls.setColorByOptions(ic.opts, ic.dAtoms);
43215
43286
 
43216
43287
  ic.hlUpdateCls.updateHlAll();
43217
43288
  ic.drawCls.draw();
@@ -66468,42 +66539,50 @@ class Dssp {
66468
66539
  if(!bRound1 && queryData[0].segs) {
66469
66540
  let bBstrand = false, bCstrand = false, bEstrand = false, bFstrand = false;
66470
66541
  let bBSheet = true, bCSheet = true, bESheet = true, bFSheet = true;
66542
+ let BCnt = 0, CCnt = 0, ECnt = 0, FCnt = 0;
66471
66543
  let chainid = domainid.split(',')[0];
66472
66544
 
66473
66545
  for(let j = 0, jl = queryData[0].segs.length; j < jl; ++j) {
66474
66546
  let seg = queryData[0].segs[j];
66475
66547
  let resi = seg.t_start;
66476
66548
  let resid = chainid + '_' + resi;
66549
+ let q_start = parseInt(seg.q_start);
66477
66550
 
66478
- if(seg.q_start.indexOf('2550') != -1) {
66551
+ if(q_start > 2540 && q_start < 2560) {
66479
66552
  bBstrand = true;
66480
66553
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
66481
- bBSheet = (atom.ss == 'sheet');
66554
+ if(atom.ss == 'helix') bBSheet = false;
66555
+ ++BCnt;
66482
66556
  }
66483
- else if(seg.q_start.indexOf('3550') != -1) {
66557
+ else if(q_start > 3540 && q_start < 3560) {
66484
66558
  bCstrand = true;
66485
66559
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
66486
- bBSheet = (atom.ss == 'sheet');
66560
+ if(atom.ss == 'helix') bCSheet = false;
66561
+ ++CCnt;
66487
66562
  }
66488
- else if(seg.q_start.indexOf('7550') != -1) {
66563
+ else if(q_start > 7540 && q_start < 7560) {
66489
66564
  bEstrand = true;
66490
66565
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
66491
- bBSheet = (atom.ss == 'sheet');
66566
+ if(atom.ss == 'helix') bESheet = false;
66567
+ ++ECnt;
66492
66568
  }
66493
- else if(seg.q_start.indexOf('8550') != -1) {
66569
+ else if(q_start > 8540 && q_start < 8560) {
66494
66570
  bFstrand = true;
66495
66571
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
66496
- bBSheet = (atom.ss == 'sheet');
66572
+ if(atom.ss == 'helix') bFSheet = false;
66573
+ ++FCnt;
66497
66574
  }
66498
66575
 
66499
66576
  //if(bBstrand && bCstrand && bEstrand && bFstrand && bGstrand) break;
66500
66577
  if(bBstrand && bCstrand && bEstrand && bFstrand) break;
66501
66578
  }
66502
-
66503
- if(!(bBstrand && bCstrand && bEstrand && bFstrand) || !(bBSheet && bCSheet && bESheet && bFSheet)) {
66504
- //if(!(bBstrand && bCstrand && bEstrand && bFstrand)) {
66579
+
66580
+ if(!(bBstrand && bCstrand && bEstrand && bFstrand) || !(bBSheet && bCSheet && bESheet && bFSheet)
66581
+ || BCnt < 3 || CCnt < 3 || ECnt < 3 || FCnt < 3) {
66582
+ // if(!(bBstrand && bCstrand && bEstrand && bFstrand)) {
66505
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 + "...");
66506
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 + "...");
66507
66586
  if(ic.domainid2refpdbname[domainid] == refpdbname) {
66508
66587
  delete ic.domainid2refpdbname[domainid];
66509
66588
  delete ic.domainid2score[domainid];
@@ -66801,9 +66880,13 @@ class Dssp {
66801
66880
  refnumLabel = this.getLabelFromRefnum(refnum, currStrandFinal);
66802
66881
  }
66803
66882
 
66804
- ic.resid2refnum[resid] = refnumLabel;
66805
- ic.resid2refnum_ori[resid] = refnumLabel;
66806
- ic.resid2domainid[resid] = domainid;
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
+ }
66807
66890
 
66808
66891
  // final reference numbers will be assign in ic.annoIgCls.showRefNum()
66809
66892
 
@@ -67150,6 +67233,8 @@ class Dssp {
67150
67233
  }
67151
67234
 
67152
67235
  async promiseWithFixedJobs(ajaxArray) { let ic = this.icn3d, me = ic.icn3dui;
67236
+ if(!me.bNode) me.icn3d.ParserUtilsCls.showLoading();
67237
+
67153
67238
  let dataArray3 = [];
67154
67239
  //let allPromise = Promise.allSettled(ajaxArray);
67155
67240
  //dataArray3 = await allPromise;
@@ -67172,6 +67257,8 @@ class Dssp {
67172
67257
  dataArray3 = dataArray3.concat(currDataArray);
67173
67258
  }
67174
67259
 
67260
+ if(!me.bNode) me.icn3d.ParserUtilsCls.hideLoading();
67261
+
67175
67262
  return dataArray3;
67176
67263
  }
67177
67264
  }