icn3d 3.30.5 → 3.30.7

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
@@ -12918,7 +12918,7 @@ class SetDialog {
12918
12918
  tpl2strandsig['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'] = "A--- A-- A- A B C C' C'' D E F G";
12919
12919
  tpl2strandsig['FAB-HEAVY_5esv_C1-n2'] = "A B C D E F G";
12920
12920
  tpl2strandsig['FAB-HEAVY_5esv_V-n1'] = "A B C C' C'' D E F G";
12921
- tpl2strandsig['FAB-LIGHT_5esv_C1-n2'] = "A B C C' E F G";
12921
+ tpl2strandsig['FAB-LIGHT_5esv_C1-n2'] = "A B C C' D E F G";
12922
12922
  tpl2strandsig['FAB-LIGHT_5esv_V-n1'] = "A A' B C C' C'' D E F G";
12923
12923
  tpl2strandsig['GHR_1axiB_human_C1-n1'] = "A B C C' D E F G";
12924
12924
  tpl2strandsig['ICOS_6x4gA_human_V'] = "A B C C' C'' D E F G";
@@ -38894,7 +38894,7 @@ class AnnoIg {
38894
38894
  // titleArray.push(igType + confidance + ' (TM:' + parseFloat(tmscore).toFixed(2) + ')');
38895
38895
  // fullTitleArray.push(igType + confidance + ' (TM:' + parseFloat(tmscore).toFixed(2) + '), template: ' + info.refpdbname + ', Seq. identity: ' + parseFloat(info.seqid).toFixed(2) + ', aligned residues: ' + info.nresAlign);
38896
38896
 
38897
- let igType = (parseFloat(tmscore) < 0.75 ) ? 'Ig' : ic.ref2igtype[info.refpdbname];
38897
+ let igType = (parseFloat(tmscore) < ic.refnumCls.TMThreshold ) ? 'Ig' : ic.ref2igtype[info.refpdbname];
38898
38898
  titleArray.push(igType + ' (TM:' + parseFloat(tmscore).toFixed(2) + ')');
38899
38899
  fullTitleArray.push(igType + ' (TM:' + parseFloat(tmscore).toFixed(2) + '), template: ' + info.refpdbname + ', Seq. identity: ' + parseFloat(info.seqid).toFixed(2) + ', aligned residues: ' + info.nresAlign);
38900
38900
 
@@ -66729,6 +66729,8 @@ class Dssp {
66729
66729
  class Refnum {
66730
66730
  constructor(icn3d) {
66731
66731
  this.icn3d = icn3d;
66732
+ this.TMThreshold = 0.85;
66733
+ this.topClusters = 5;
66732
66734
  }
66733
66735
 
66734
66736
  async hideIgRefNum() { let ic = this.icn3d; ic.icn3dui;
@@ -67286,21 +67288,30 @@ class Dssp {
67286
67288
 
67287
67289
  if(q_start > 2540 && q_start < 2560) {
67288
67290
  bBstrand = true;
67289
- let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
67290
- if(atom.ss == 'helix') bBSheet = false;
67291
67291
  }
67292
67292
  else if(q_start > 3540 && q_start < 3560) {
67293
67293
  bCstrand = true;
67294
- let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
67295
- if(atom.ss == 'helix') bCSheet = false;
67296
67294
  }
67297
67295
  else if(q_start > 7540 && q_start < 7560) {
67298
67296
  bEstrand = true;
67299
- let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
67300
- if(atom.ss == 'helix') bESheet = false;
67301
67297
  }
67302
67298
  else if(q_start > 8540 && q_start < 8560) {
67303
67299
  bFstrand = true;
67300
+ }
67301
+
67302
+ if(q_start == 2550) {
67303
+ let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
67304
+ if(atom.ss == 'helix') bBSheet = false;
67305
+ }
67306
+ else if(q_start == 3550) {
67307
+ let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
67308
+ if(atom.ss == 'helix') bCSheet = false;
67309
+ }
67310
+ else if(q_start == 7550) {
67311
+ let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
67312
+ if(atom.ss == 'helix') bESheet = false;
67313
+ }
67314
+ else if(q_start == 8550) {
67304
67315
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
67305
67316
  if(atom.ss == 'helix') bFSheet = false;
67306
67317
  }
@@ -67309,17 +67320,20 @@ class Dssp {
67309
67320
  if(bBstrand && bCstrand && bEstrand && bFstrand) break;
67310
67321
  }
67311
67322
 
67312
- if(!(bBstrand && bCstrand && bEstrand && bFstrand) || !(bBSheet && bCSheet && bESheet && bFSheet)) {
67313
- // if(!(bBstrand && bCstrand && bEstrand && bFstrand)) {
67314
- if(!me.bNode && !(bBstrand && bCstrand && bEstrand && bFstrand)) console.log("Some of the Ig strands B, C, E, F are missing in the domain " + domainid + "...");
67315
- if(!me.bNode && !(bBSheet && bCSheet && bESheet && bFSheet)) console.log("Some of the Ig strands B, C, E, F are not beta sheets...");
67316
- // 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 + "...");
67317
- if(ic.domainid2refpdbname[domainid][0] == refpdbname) {
67318
- delete ic.domainid2refpdbname[domainid];
67319
- delete ic.domainid2score[domainid];
67323
+ // if(refpdbname != 'CD19_6al5A_human-n1') { // relax for CD19
67324
+ if(!(bBstrand && bCstrand && bEstrand && bFstrand) || !(bBSheet && bCSheet && bESheet && bFSheet)) {
67325
+ // if(!(bBstrand && bCstrand && bEstrand && bFstrand)) {
67326
+ if(!me.bNode && !(bBstrand && bCstrand && bEstrand && bFstrand)) console.log("Some of the Ig strands B, C, E, F are missing in the domain " + domainid + "...");
67327
+ if(!me.bNode && !(bBSheet && bCSheet && bESheet && bFSheet)) console.log("Some of the Ig strands B, C, E, F are not beta sheets...");
67328
+ // 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 + "...");
67329
+ if(ic.domainid2refpdbname[domainid][0] == refpdbname) {
67330
+ delete ic.domainid2refpdbname[domainid];
67331
+ delete ic.domainid2score[domainid];
67332
+ }
67333
+ // continue;
67320
67334
  }
67321
- continue;
67322
- }
67335
+ // }
67336
+
67323
67337
  }
67324
67338
 
67325
67339
  if(!bRound1) {
@@ -67348,7 +67362,9 @@ class Dssp {
67348
67362
  ic.domainid2score[domainid] = queryData[0].score + '_' + queryData[0].frac_identical + '_' + queryData[0].num_res ;
67349
67363
 
67350
67364
  if(bRound1) {
67351
- ic.domainid2refpdbname[domainid] = score > 0.75 ? [refpdbname] : ['all_templates'];
67365
+ // ic.domainid2refpdbname[domainid] = score > 0.75 ? [refpdbname] : ['all_templates'];
67366
+ ic.domainid2refpdbname[domainid] = score >= this.TMThreshold ? [refpdbname] : ['all_templates'];
67367
+ // if(me.bNode) ic.domainid2refpdbname[domainid] = ['all_templates'];
67352
67368
  }
67353
67369
  else {
67354
67370
  ic.domainid2refpdbname[domainid] = [refpdbname];
@@ -67367,7 +67383,7 @@ class Dssp {
67367
67383
  }
67368
67384
  }
67369
67385
 
67370
- // combine the top four clusters for the 2nd round alignment
67386
+ // combine the top clusters for the 2nd round alignment
67371
67387
  if(bRound1) {
67372
67388
  for(let domainid in domainid2refpdbnamelist) {
67373
67389
  if(!me.bNode && ic.domainid2refpdbname[domainid][0] == 'all_templates') {
@@ -67376,8 +67392,8 @@ class Dssp {
67376
67392
  refpdbnameList.sort(function(a, b) {
67377
67393
  return refpdbname2score[b] - refpdbname2score[a]
67378
67394
  });
67379
- // top 4 templates
67380
- ic.domainid2refpdbname[domainid] = refpdbnameList.slice(0,4);
67395
+ // top templates
67396
+ ic.domainid2refpdbname[domainid] = refpdbnameList.slice(0, this.topClusters);
67381
67397
  }
67382
67398
  }
67383
67399
  }
@@ -67614,8 +67630,8 @@ class Dssp {
67614
67630
  let seg = segArray[i];
67615
67631
  if(!seg) continue;
67616
67632
 
67617
- let qStart = seg.q_start;
67618
- parseInt(seg.q_start);
67633
+ seg.q_start;
67634
+ let qStartInt = parseInt(seg.q_start);
67619
67635
  if(isNaN(seg.q_start)) seg.q_start.substr(seg.q_start.length - 1, 1);
67620
67636
 
67621
67637
  // one item in "seq"
@@ -67628,7 +67644,8 @@ class Dssp {
67628
67644
  let resid = chainid + '_' + seg.t_start;
67629
67645
  //let refnum = qStartInt.toString() + postfix;
67630
67646
  //let refnum = qStart + postfix;
67631
- let refnum = qStart;
67647
+ //let refnum = qStart;
67648
+ let refnum = qStartInt;
67632
67649
 
67633
67650
  let refnumLabel = this.getLabelFromRefnum(refnum);
67634
67651
  currStrand = (refnumLabel) ? refnumLabel.replace(new RegExp(refnum,'g'), '') : undefined;
@@ -68043,7 +68060,7 @@ class Dssp {
68043
68060
  if(!ic.chainid2refpdbname[chnid]) return false;
68044
68061
 
68045
68062
  // auto-generate ref numbers for loops
68046
- let currStrand = '', prevStrand = '';
68063
+ let currStrand = '', prevStrand = '', prevValidStrand = '';
68047
68064
  let refnumLabel, refnumStr_ori, refnumStr, postfix, strandPostfix, refnum, refnum3c, refnum2c;
68048
68065
  let bExtendedStrand = false, bSecThird9 = false;
68049
68066
 
@@ -68107,7 +68124,8 @@ class Dssp {
68107
68124
  if(!bSecThird9 || (bExtendedStrand && !bSecThird9)) {
68108
68125
  let lastTwo = parseInt(refnum.toString().substr(refnum.toString().length - 2, 2));
68109
68126
 
68110
- if(currStrand != prevStrand) { // reset currCnt
68127
+ // reset currCnt
68128
+ if(currStrand != prevStrand && currStrand != prevValidStrand) { // sometimes the same resid appear several times, e.g, 7M7B_H_135
68111
68129
  bFoundAnchor = false;
68112
68130
 
68113
68131
  if(strandHash[currStrand + postfix]) {
@@ -68209,6 +68227,8 @@ class Dssp {
68209
68227
  }
68210
68228
  }
68211
68229
  }
68230
+
68231
+ prevValidStrand = currStrand;
68212
68232
  }
68213
68233
  }
68214
68234
 
@@ -68296,6 +68316,7 @@ class Dssp {
68296
68316
  for(let il = strandArray.length, i = il - 1; i >= 0; --i) {
68297
68317
  // let strandTmp = strandArray[i].strand.substr(0, 1);
68298
68318
  let strandTmp = strandArray[i].strand;
68319
+
68299
68320
  if(strandTmp != 'G' && strandArray[i].endRefnum - strandArray[i].startRefnum + 1 < 3) { // remove the strand
68300
68321
  if(i != il - 1) { // modify
68301
68322
  strandArray[i + 1].loopResCnt += strandArray[i].loopResCnt + parseInt(strandArray[i].endResi) - parseInt(strandArray[i].startResi) + 1;
@@ -68312,7 +68333,7 @@ class Dssp {
68312
68333
  let domainid = ic.resid2domainid[resid];
68313
68334
  removeDomainidHash[domainid] = 1;
68314
68335
  continue;
68315
- }
68336
+ }
68316
68337
  }
68317
68338
  }
68318
68339
 
@@ -68429,10 +68450,12 @@ class Dssp {
68429
68450
  let halfLen = parseInt(len / 2.0 + 0.5);
68430
68451
 
68431
68452
  if(loopCnt <= halfLen) {
68432
- currRefnum = strandArray[prevStrandCnt].endRefnum + loopCnt;
68433
- refnumLabelNoPostfix = strandArray[prevStrandCnt].strand + currRefnum;
68434
- refnumLabel = refnumLabelNoPostfix + strandArray[prevStrandCnt].strandPostfix;
68435
- domainid = strandArray[prevStrandCnt].domainid;
68453
+ if(strandArray[prevStrandCnt]) {
68454
+ currRefnum = strandArray[prevStrandCnt].endRefnum + loopCnt;
68455
+ refnumLabelNoPostfix = strandArray[prevStrandCnt].strand + currRefnum;
68456
+ refnumLabel = refnumLabelNoPostfix + strandArray[prevStrandCnt].strandPostfix;
68457
+ domainid = strandArray[prevStrandCnt].domainid;
68458
+ }
68436
68459
  }
68437
68460
  else {
68438
68461
  currRefnum = strandArray[strandCnt].startRefnum - len + loopCnt - 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icn3d",
3
- "version": "3.30.5",
3
+ "version": "3.30.7",
4
4
  "main": "./icn3d.js",
5
5
  "exports": {
6
6
  ".": {