icn3d 3.30.5 → 3.30.6

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
@@ -12017,7 +12017,7 @@ class SetDialog {
12017
12017
  tpl2strandsig['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'] = "A--- A-- A- A B C C' C'' D E F G";
12018
12018
  tpl2strandsig['FAB-HEAVY_5esv_C1-n2'] = "A B C D E F G";
12019
12019
  tpl2strandsig['FAB-HEAVY_5esv_V-n1'] = "A B C C' C'' D E F G";
12020
- tpl2strandsig['FAB-LIGHT_5esv_C1-n2'] = "A B C C' E F G";
12020
+ tpl2strandsig['FAB-LIGHT_5esv_C1-n2'] = "A B C C' D E F G";
12021
12021
  tpl2strandsig['FAB-LIGHT_5esv_V-n1'] = "A A' B C C' C'' D E F G";
12022
12022
  tpl2strandsig['GHR_1axiB_human_C1-n1'] = "A B C C' D E F G";
12023
12023
  tpl2strandsig['ICOS_6x4gA_human_V'] = "A B C C' C'' D E F G";
@@ -37993,7 +37993,7 @@ class AnnoIg {
37993
37993
  // titleArray.push(igType + confidance + ' (TM:' + parseFloat(tmscore).toFixed(2) + ')');
37994
37994
  // fullTitleArray.push(igType + confidance + ' (TM:' + parseFloat(tmscore).toFixed(2) + '), template: ' + info.refpdbname + ', Seq. identity: ' + parseFloat(info.seqid).toFixed(2) + ', aligned residues: ' + info.nresAlign);
37995
37995
 
37996
- let igType = (parseFloat(tmscore) < 0.75 ) ? 'Ig' : ic.ref2igtype[info.refpdbname];
37996
+ let igType = (parseFloat(tmscore) < ic.refnumCls.TMThreshold ) ? 'Ig' : ic.ref2igtype[info.refpdbname];
37997
37997
  titleArray.push(igType + ' (TM:' + parseFloat(tmscore).toFixed(2) + ')');
37998
37998
  fullTitleArray.push(igType + ' (TM:' + parseFloat(tmscore).toFixed(2) + '), template: ' + info.refpdbname + ', Seq. identity: ' + parseFloat(info.seqid).toFixed(2) + ', aligned residues: ' + info.nresAlign);
37999
37999
 
@@ -65828,6 +65828,8 @@ class Dssp {
65828
65828
  class Refnum {
65829
65829
  constructor(icn3d) {
65830
65830
  this.icn3d = icn3d;
65831
+ this.TMThreshold = 0.85;
65832
+ this.topClusters = 5;
65831
65833
  }
65832
65834
 
65833
65835
  async hideIgRefNum() { let ic = this.icn3d; ic.icn3dui;
@@ -66408,17 +66410,20 @@ class Dssp {
66408
66410
  if(bBstrand && bCstrand && bEstrand && bFstrand) break;
66409
66411
  }
66410
66412
 
66411
- if(!(bBstrand && bCstrand && bEstrand && bFstrand) || !(bBSheet && bCSheet && bESheet && bFSheet)) {
66412
- // if(!(bBstrand && bCstrand && bEstrand && bFstrand)) {
66413
- if(!me.bNode && !(bBstrand && bCstrand && bEstrand && bFstrand)) console.log("Some of the Ig strands B, C, E, F are missing in the domain " + domainid + "...");
66414
- if(!me.bNode && !(bBSheet && bCSheet && bESheet && bFSheet)) console.log("Some of the Ig strands B, C, E, F are not beta sheets...");
66415
- // 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 + "...");
66416
- if(ic.domainid2refpdbname[domainid][0] == refpdbname) {
66417
- delete ic.domainid2refpdbname[domainid];
66418
- delete ic.domainid2score[domainid];
66413
+ // if(refpdbname != 'CD19_6al5A_human-n1') { // relax for CD19
66414
+ if(!(bBstrand && bCstrand && bEstrand && bFstrand) || !(bBSheet && bCSheet && bESheet && bFSheet)) {
66415
+ // if(!(bBstrand && bCstrand && bEstrand && bFstrand)) {
66416
+ if(!me.bNode && !(bBstrand && bCstrand && bEstrand && bFstrand)) console.log("Some of the Ig strands B, C, E, F are missing in the domain " + domainid + "...");
66417
+ if(!me.bNode && !(bBSheet && bCSheet && bESheet && bFSheet)) console.log("Some of the Ig strands B, C, E, F are not beta sheets...");
66418
+ // 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 + "...");
66419
+ if(ic.domainid2refpdbname[domainid][0] == refpdbname) {
66420
+ delete ic.domainid2refpdbname[domainid];
66421
+ delete ic.domainid2score[domainid];
66422
+ }
66423
+ continue;
66419
66424
  }
66420
- continue;
66421
- }
66425
+ // }
66426
+
66422
66427
  }
66423
66428
 
66424
66429
  if(!bRound1) {
@@ -66447,7 +66452,8 @@ class Dssp {
66447
66452
  ic.domainid2score[domainid] = queryData[0].score + '_' + queryData[0].frac_identical + '_' + queryData[0].num_res ;
66448
66453
 
66449
66454
  if(bRound1) {
66450
- ic.domainid2refpdbname[domainid] = score > 0.75 ? [refpdbname] : ['all_templates'];
66455
+ // ic.domainid2refpdbname[domainid] = score > 0.75 ? [refpdbname] : ['all_templates'];
66456
+ ic.domainid2refpdbname[domainid] = score >= this.TMThreshold ? [refpdbname] : ['all_templates'];
66451
66457
  }
66452
66458
  else {
66453
66459
  ic.domainid2refpdbname[domainid] = [refpdbname];
@@ -66466,7 +66472,7 @@ class Dssp {
66466
66472
  }
66467
66473
  }
66468
66474
 
66469
- // combine the top four clusters for the 2nd round alignment
66475
+ // combine the top clusters for the 2nd round alignment
66470
66476
  if(bRound1) {
66471
66477
  for(let domainid in domainid2refpdbnamelist) {
66472
66478
  if(!me.bNode && ic.domainid2refpdbname[domainid][0] == 'all_templates') {
@@ -66475,8 +66481,8 @@ class Dssp {
66475
66481
  refpdbnameList.sort(function(a, b) {
66476
66482
  return refpdbname2score[b] - refpdbname2score[a]
66477
66483
  });
66478
- // top 4 templates
66479
- ic.domainid2refpdbname[domainid] = refpdbnameList.slice(0,4);
66484
+ // top templates
66485
+ ic.domainid2refpdbname[domainid] = refpdbnameList.slice(0, this.topClusters);
66480
66486
  }
66481
66487
  }
66482
66488
  }
@@ -66713,8 +66719,8 @@ class Dssp {
66713
66719
  let seg = segArray[i];
66714
66720
  if(!seg) continue;
66715
66721
 
66716
- let qStart = seg.q_start;
66717
- parseInt(seg.q_start);
66722
+ seg.q_start;
66723
+ let qStartInt = parseInt(seg.q_start);
66718
66724
  if(isNaN(seg.q_start)) seg.q_start.substr(seg.q_start.length - 1, 1);
66719
66725
 
66720
66726
  // one item in "seq"
@@ -66727,7 +66733,8 @@ class Dssp {
66727
66733
  let resid = chainid + '_' + seg.t_start;
66728
66734
  //let refnum = qStartInt.toString() + postfix;
66729
66735
  //let refnum = qStart + postfix;
66730
- let refnum = qStart;
66736
+ //let refnum = qStart;
66737
+ let refnum = qStartInt;
66731
66738
 
66732
66739
  let refnumLabel = this.getLabelFromRefnum(refnum);
66733
66740
  currStrand = (refnumLabel) ? refnumLabel.replace(new RegExp(refnum,'g'), '') : undefined;
@@ -67142,7 +67149,7 @@ class Dssp {
67142
67149
  if(!ic.chainid2refpdbname[chnid]) return false;
67143
67150
 
67144
67151
  // auto-generate ref numbers for loops
67145
- let currStrand = '', prevStrand = '';
67152
+ let currStrand = '', prevStrand = '', prevValidStrand = '';
67146
67153
  let refnumLabel, refnumStr_ori, refnumStr, postfix, strandPostfix, refnum, refnum3c, refnum2c;
67147
67154
  let bExtendedStrand = false, bSecThird9 = false;
67148
67155
 
@@ -67206,7 +67213,8 @@ class Dssp {
67206
67213
  if(!bSecThird9 || (bExtendedStrand && !bSecThird9)) {
67207
67214
  let lastTwo = parseInt(refnum.toString().substr(refnum.toString().length - 2, 2));
67208
67215
 
67209
- if(currStrand != prevStrand) { // reset currCnt
67216
+ // reset currCnt
67217
+ if(currStrand != prevStrand && currStrand != prevValidStrand) { // sometimes the same resid appear several times, e.g, 7M7B_H_135
67210
67218
  bFoundAnchor = false;
67211
67219
 
67212
67220
  if(strandHash[currStrand + postfix]) {
@@ -67308,6 +67316,8 @@ class Dssp {
67308
67316
  }
67309
67317
  }
67310
67318
  }
67319
+
67320
+ prevValidStrand = currStrand;
67311
67321
  }
67312
67322
  }
67313
67323
 
@@ -67395,6 +67405,7 @@ class Dssp {
67395
67405
  for(let il = strandArray.length, i = il - 1; i >= 0; --i) {
67396
67406
  // let strandTmp = strandArray[i].strand.substr(0, 1);
67397
67407
  let strandTmp = strandArray[i].strand;
67408
+
67398
67409
  if(strandTmp != 'G' && strandArray[i].endRefnum - strandArray[i].startRefnum + 1 < 3) { // remove the strand
67399
67410
  if(i != il - 1) { // modify
67400
67411
  strandArray[i + 1].loopResCnt += strandArray[i].loopResCnt + parseInt(strandArray[i].endResi) - parseInt(strandArray[i].startResi) + 1;
@@ -67411,7 +67422,7 @@ class Dssp {
67411
67422
  let domainid = ic.resid2domainid[resid];
67412
67423
  removeDomainidHash[domainid] = 1;
67413
67424
  continue;
67414
- }
67425
+ }
67415
67426
  }
67416
67427
  }
67417
67428
 
@@ -67528,10 +67539,12 @@ class Dssp {
67528
67539
  let halfLen = parseInt(len / 2.0 + 0.5);
67529
67540
 
67530
67541
  if(loopCnt <= halfLen) {
67531
- currRefnum = strandArray[prevStrandCnt].endRefnum + loopCnt;
67532
- refnumLabelNoPostfix = strandArray[prevStrandCnt].strand + currRefnum;
67533
- refnumLabel = refnumLabelNoPostfix + strandArray[prevStrandCnt].strandPostfix;
67534
- domainid = strandArray[prevStrandCnt].domainid;
67542
+ if(strandArray[prevStrandCnt]) {
67543
+ currRefnum = strandArray[prevStrandCnt].endRefnum + loopCnt;
67544
+ refnumLabelNoPostfix = strandArray[prevStrandCnt].strand + currRefnum;
67545
+ refnumLabel = refnumLabelNoPostfix + strandArray[prevStrandCnt].strandPostfix;
67546
+ domainid = strandArray[prevStrandCnt].domainid;
67547
+ }
67535
67548
  }
67536
67549
  else {
67537
67550
  currRefnum = strandArray[strandCnt].startRefnum - len + loopCnt - 1;