icn3d 3.29.10 → 3.29.11

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 + "'>";
@@ -12873,10 +12878,10 @@ class SetDialog {
12873
12878
  html += "<td></td>";
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
+
12877
12882
  html += "<td></td>";
12878
12883
  html += "</tr></table></div></div>";
12879
-
12884
+ */
12880
12885
  return html;
12881
12886
  }
12882
12887
  }
@@ -37666,7 +37671,8 @@ class AnnoCddSite {
37666
37671
 
37667
37672
  //var setname = chnid + "_" + domain + "_" + index + "_" + r; //chnid + "_" + type + "_" + index + "_" + r;
37668
37673
  let setname = chnid + "_" + domain;
37669
- if(type != 'domain') setname += "_" + index + "_" + r; // + acc2domain[acc];
37674
+ // if(type != 'domain') setname += "_" + index + "_" + r;
37675
+ if(type != 'domain') setname = chnid + "_" + index + "_" + r + "_" + domain;
37670
37676
 
37671
37677
  if(type == 'domain') pssmid2fromArray[pssmid] = fromArray;
37672
37678
  if(type == 'domain') pssmid2toArray[pssmid] = toArray;
@@ -39126,11 +39132,11 @@ class AnnoIg {
39126
39132
  htmlTmp += '<span class="icn3d-residueNum"></span>';
39127
39133
  }
39128
39134
  else if(kabat_or_imgt == 1) {
39129
- htmlTmp += '<div class="icn3d-annoTitle" anno="0" title="Kabat Reference Numbers ' + refStruTitle + '">Kabat Ref. No.</div>';
39135
+ htmlTmp += '<div class="icn3d-annoTitle" anno="0" title="Kabat Reference Numbers">Kabat Ref. No.</div>';
39130
39136
  htmlTmp += '<span class="icn3d-residueNum"></span>';
39131
39137
  }
39132
39138
  else if(kabat_or_imgt == 2) {
39133
- htmlTmp += '<div class="icn3d-annoTitle" anno="0" title="IMGT Reference Numbers ' + refStruTitle + '">IMGT Ref. No.</div>';
39139
+ htmlTmp += '<div class="icn3d-annoTitle" anno="0" title="IMGT Reference Numbers">IMGT Ref. No.</div>';
39134
39140
  htmlTmp += '<span class="icn3d-residueNum"></span>';
39135
39141
  }
39136
39142
  else {
@@ -39157,6 +39163,7 @@ class AnnoIg {
39157
39163
  let igArray = ic.chain2igArray[chnid];
39158
39164
  if(igArray.length == 0) return {html: '', html2: '', html3: ''};
39159
39165
  let rangeArray = [], titleArray = [], fullTitleArray = [], domainArray = [];
39166
+
39160
39167
  for(let i = 0, il = igArray.length; i < il; ++i) {
39161
39168
  let domainid = igArray[i].domainid;
39162
39169
  let info = ic.domainid2info[domainid];
@@ -40558,12 +40565,16 @@ class Domain3d {
40558
40565
 
40559
40566
  // this.elements from the this.top of the this.stack
40560
40567
  //elts = &this.elements[this.stack[this.top - 1]];
40568
+
40561
40569
  for(i = this.stack[this.top - 1], il = this.elements.length; i < il; ++i) {
40562
40570
  elts.push(this.elements[i]);
40563
40571
  }
40564
40572
 
40565
40573
  // generate the partition based on the cut //
40566
- for (i = ne = ne0 = ne1 = 0, prt = prt0, t = -1; i < k; i++) {
40574
+ // for (i = ne = ne0 = ne1 = 0, prt = prt0, t = -1; i < k; i++) {
40575
+ let bAtZero = true;
40576
+ prt = prt0;
40577
+ for (i = ne = ne0 = ne1 = 0, t = -1; i < k; i++) {
40567
40578
  // write the this.elements into prt //
40568
40579
  for (j = t + 1; j <= cut[i]; j++)
40569
40580
  prt[ne++] = elts[j];
@@ -40571,15 +40582,20 @@ class Domain3d {
40571
40582
  t = cut[i];
40572
40583
 
40573
40584
  // switch the partition //
40574
- if (prt == prt0) {
40585
+ // if (prt == prt0) {
40586
+ if (bAtZero) {
40575
40587
  ne0 = ne;
40576
40588
  prt = prt1;
40577
40589
  ne = ne1;
40590
+
40591
+ bAtZero = false;
40578
40592
  }
40579
40593
  else {
40580
40594
  ne1 = ne;
40581
40595
  prt = prt0;
40582
40596
  ne = ne0;
40597
+
40598
+ bAtZero = true;
40583
40599
  }
40584
40600
  }
40585
40601
 
@@ -40587,7 +40603,8 @@ class Domain3d {
40587
40603
  for (j = t + 1; j < n; j++)
40588
40604
  prt[ne++] = elts[j];
40589
40605
 
40590
- if (prt == prt0)
40606
+ // if (prt == prt0)
40607
+ if (bAtZero)
40591
40608
  ne0 = ne;
40592
40609
  else
40593
40610
  ne1 = ne;
@@ -41256,6 +41273,8 @@ class Domain3d {
41256
41273
  let ss1 = parseInt(ssPair[0]);
41257
41274
  let ss2 = parseInt(ssPair[1]);
41258
41275
 
41276
+ if(ctable[pair] < this.min_contacts) ctable[pair] = 0;
41277
+
41259
41278
  // both are sheets
41260
41279
  // min number of contacts: this.min_contacts
41261
41280
  if(substruct[ss1 - 1].Sheet && substruct[ss2 - 1].Sheet && ctable[pair] >= this.min_contacts ) {
@@ -41266,7 +41285,7 @@ class Domain3d {
41266
41285
  sheetNeighbor[ss2][ss1] = 1;
41267
41286
  }
41268
41287
  }
41269
-
41288
+
41270
41289
  //https://www.geeksforgeeks.org/number-groups-formed-graph-friends/
41271
41290
  let existing_groups = 0;
41272
41291
  let sheet2sheetnum = {};
@@ -41289,12 +41308,13 @@ class Domain3d {
41289
41308
  // get sheet2sheetnum
41290
41309
  // each neighboring sheet will be represented by the sheet with the smallest sse
41291
41310
  for(let groupnum in this.groupnum2sheet) {
41292
- let ssArray = this.groupnum2sheet[groupnum].sort();
41311
+ let ssArray = this.groupnum2sheet[groupnum].sort(function(a, b){return a-b});
41293
41312
  for(let i = 0, il = ssArray.length; i < il; ++i) {
41294
41313
  sheet2sheetnum[ssArray[i]] = ssArray[0];
41295
41314
  }
41296
41315
  }
41297
41316
 
41317
+ let invalidSheethash = {};
41298
41318
  for (let i = 0; i < nsse; i++) {
41299
41319
  if(substruct[i].Sheet) {
41300
41320
  let sheetsItem = {};
@@ -41307,6 +41327,8 @@ class Domain3d {
41307
41327
  sheetsItem.sheet_num = 0;
41308
41328
  sheetsItem.adj_strand2 = 0;
41309
41329
  sheetsItem.sse = i + 1;
41330
+
41331
+ invalidSheethash[sheetsItem.sse] = 1;
41310
41332
  }
41311
41333
 
41312
41334
  sheets.push(sheetsItem);
@@ -41338,7 +41360,7 @@ class Domain3d {
41338
41360
  }
41339
41361
  }
41340
41362
 
41341
- let minStrand = 6;
41363
+ let minStrand = 6; // number of residues in a strand
41342
41364
 
41343
41365
  if (hasSheets) {
41344
41366
  //sheets: array of sheets, each of which has the key: sheet_num (number of strands), adj_strand1, adj_strand2
@@ -41362,7 +41384,8 @@ class Domain3d {
41362
41384
  if (cnt> 0) {
41363
41385
  for (let i = 0; i < sheets.length; i++) {
41364
41386
  let bsrec = sheets[i];
41365
- this.group_num[bsrec.sse - 1] = bsrec.sheet_num;
41387
+ // this.group_num[bsrec.sse - 1] = bsrec.sheet_num;
41388
+ if(bsrec.sheet_num != 0) this.group_num[bsrec.sse - 1] = bsrec.sheet_num;
41366
41389
  }
41367
41390
  }
41368
41391
  }
@@ -41418,11 +41441,25 @@ class Domain3d {
41418
41441
  }
41419
41442
  }
41420
41443
  }
41421
-
41444
+
41422
41445
  list_parts.sort(function(v1, v2) {
41423
41446
  return v1[0] - v2[0];
41424
41447
  });
41425
41448
 
41449
+ // remove sheets less than 3 residues
41450
+ let list_partsTmp = [];
41451
+ for(let i = 0, il = list_parts.length; i < il; ++i) {
41452
+ let list_parts_item = [];
41453
+ for(let j = 0, jl = list_parts[i].length; j < jl; ++j) {
41454
+ let sse = list_parts[i][j];
41455
+ if(!invalidSheethash.hasOwnProperty(sse)) {
41456
+ list_parts_item.push(sse);
41457
+ }
41458
+ }
41459
+ if(list_parts_item.length >= this.min_sse) list_partsTmp.push(list_parts[i]);
41460
+ }
41461
+ list_parts = list_partsTmp;
41462
+
41426
41463
  //for (lplet = list_parts.begin(); lplet != list_parts.end(); lpint++) {
41427
41464
  for (let index = 0, indexl = list_parts.length; index < indexl; ++index) {
41428
41465
  //vector<int> prts = *lpint;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icn3d",
3
- "version": "3.29.10",
3
+ "version": "3.29.11",
4
4
  "main": "./icn3d.js",
5
5
  "exports": {
6
6
  ".": {