icn3d 3.31.4 → 3.31.5

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
@@ -8902,7 +8902,7 @@ class ClickMenu {
8902
8902
  let resid = residueArray[i];
8903
8903
 
8904
8904
  if(ic.resid2refnum) delete ic.resid2refnum[resid];
8905
- if(ic.resid2refnum_ori) delete ic.resid2refnum_ori[resid];
8905
+ // if(ic.resid2refnum_ori) delete ic.resid2refnum_ori[resid];
8906
8906
  if(ic.resid2domainid) delete ic.resid2domainid[resid];
8907
8907
  }
8908
8908
 
@@ -42516,13 +42516,11 @@ class Domain3d {
42516
42516
  init3ddomain() { let ic = this.icn3d; ic.icn3dui;
42517
42517
  //this.dcut = 8; // threshold for C-alpha interactions
42518
42518
 
42519
- // It seemed the threshold 7 angstrom works better
42520
- //this.dcut = 7; // threshold for C-alpha interactions
42521
42519
  this.dcut = 8; // threshold for C-alpha interactions
42522
42520
 
42523
42521
  // added by Jiyao
42524
- // pdbid 1CD8 requires a min contact 4, not 5
42525
- this.min_contacts = 4; //5; //3; // minimum number of contacts to be considered as neighbors
42522
+ // Ig domain should not be separated into two parts, set min as 2
42523
+ this.min_contacts = 2; //3; // minimum number of contacts to be considered as neighbors
42526
42524
 
42527
42525
  this.MAX_SSE = 512;
42528
42526
 
@@ -46238,8 +46236,10 @@ class Annotation {
46238
46236
  }
46239
46237
  }
46240
46238
 
46239
+ ic.bRunRefnumAgain = true;
46241
46240
  for(let chainid in ic.protein_chainid) {
46242
46241
  await ic.annoIgCls.showIg(chainid, template);
46242
+ ic.bRunRefnumAgain = false; // run it once for all chains
46243
46243
  }
46244
46244
  // }
46245
46245
  // ic.bIgShown = true;
@@ -54627,7 +54627,7 @@ class MmdbParser {
54627
54627
  if(Object.keys(data.atoms).length == 0) { // for large structures such as 3J3Q
54628
54628
  // use mmtfid
54629
54629
  let pdbid = data.pdbId;
54630
- await ic.bciffParserCls.downloadBcif(pdbid);
54630
+ await ic.bcifParserCls.downloadBcif(pdbid);
54631
54631
 
54632
54632
  return;
54633
54633
  }
@@ -70547,6 +70547,7 @@ class Dssp {
70547
70547
  ic.domainid2pdb = {};
70548
70548
 
70549
70549
  let bNoMoreIg = true;
70550
+ let bFoundDomain = false;
70550
70551
  for(let i = 0, il = struArray.length; i < il; ++i) {
70551
70552
  let struct = struArray[i];
70552
70553
  let chainidArray = ic.structures[struct];
@@ -70560,6 +70561,12 @@ class Dssp {
70560
70561
  if(!ic.domainid2refpdbname) ic.domainid2refpdbname = {};
70561
70562
  if(!ic.domainid2score) ic.domainid2score = {};
70562
70563
 
70564
+ if(domainAtomsArray.length == 0) {
70565
+ continue;
70566
+ }
70567
+
70568
+ bFoundDomain = true;
70569
+
70563
70570
  for(let k = 0, kl = domainAtomsArray.length; k < kl; ++k) {
70564
70571
  bNoMoreIg = false;
70565
70572
 
@@ -70573,6 +70580,10 @@ class Dssp {
70573
70580
  let resiSum = atomFirst.resi + ':' + atomLast.resi + ':' + Object.keys(domainAtomsArray[k]).length;
70574
70581
  //let domainid = chainid + '-' + k + '_' + Object.keys(domainAtomsArray[k]).length;
70575
70582
  let domainid = chainid + ',' + k + '_' + resiSum;
70583
+
70584
+ // clear score
70585
+ delete ic.domainid2score[domainid];
70586
+
70576
70587
  ic.domainid2pdb[domainid] = pdb_target;
70577
70588
 
70578
70589
  if(!template) {
@@ -70602,6 +70613,10 @@ class Dssp {
70602
70613
  }
70603
70614
  }
70604
70615
 
70616
+ if(!bFoundDomain) {
70617
+ return bNoMoreIg;
70618
+ }
70619
+
70605
70620
  //try {
70606
70621
  if(!template) {
70607
70622
  let dataArray2 = [];
@@ -70737,27 +70752,13 @@ class Dssp {
70737
70752
  // clear previous refnum assignment if any
70738
70753
  // delete ic.resid2refnum[resid];
70739
70754
  delete ic.residIgLoop[resid];
70755
+ delete ic.resid2domainid[resid];
70740
70756
  }
70741
70757
  }
70742
70758
 
70743
70759
  if(resCnt < minResidues) continue;
70744
70760
 
70745
70761
  domainAtomsArray.push(domainAtoms);
70746
- /*
70747
- let atomFirst = ic.firstAtomObjCls.getFirstAtomObj(domainAtoms);
70748
- let atomLast = ic.firstAtomObjCls.getLastAtomObj(domainAtoms);
70749
- let resiSum = atomFirst.resi + ':' + atomLast.resi + ':' + Object.keys(domainAtoms).length;
70750
-
70751
- for(let m = 0, ml = segArray.length; m < ml; m += 2) {
70752
- let startResi = segArray[m];
70753
- let endResi = segArray[m+1];
70754
- for(let n = parseInt(startResi); n <= parseInt(endResi); ++n) {
70755
- let resid = chainid + '_' + pos2resi[n - 1];
70756
- //domainAtoms = me.hashUtilsCls.unionHash(domainAtoms, ic.residues[resid]);
70757
- ic.resid2domainid[resid] = chainid + ',' + k + '_' + resiSum;
70758
- }
70759
- }
70760
- */
70761
70762
  }
70762
70763
  }
70763
70764
 
@@ -70797,6 +70798,7 @@ class Dssp {
70797
70798
  if(!ic.domainid2ig2imgt) ic.domainid2ig2imgt = {};
70798
70799
 
70799
70800
  let minResidues = 20;
70801
+
70800
70802
  for(let i = 0, il = domainidpairArray.length; i < il; ++i) {
70801
70803
  //let queryData = (me.bNode) ? dataArray[i] : dataArray[i].value; //[0];
70802
70804
  let queryData = (dataArray[i]) ? dataArray[i].value : undefined; //[0];
@@ -70816,15 +70818,12 @@ class Dssp {
70816
70818
 
70817
70819
  if(!bRound1) {
70818
70820
  if(queryData[0].score < tmscoreThreshold || queryData[0].num_res < minResidues) {
70819
- if(!me.bNode) console.log("domainid " + domainid + " and refpdbname " + refpdbname + " were skipped due to a TM-score less than " + tmscoreThreshold);
70821
+ if(!me.bNode) console.log("bRound1: " + bRound1 + ": domainid " + domainid + " and refpdbname " + refpdbname + " were skipped due to a TM-score less than " + tmscoreThreshold);
70820
70822
  continue;
70821
70823
  }
70822
70824
  }
70823
70825
  else {
70824
- // if(queryData[0].super_rmsd > rmsdThreshold || queryData[0].num_res < minResidues) {
70825
- // continue;
70826
- // }
70827
- if(queryData[0].score < tmscoreThreshold || queryData[0].num_res < minResidues) {
70826
+ if(queryData[0].score < tmscoreThreshold || queryData[0].num_res < minResidues / 2) {
70828
70827
  continue;
70829
70828
  }
70830
70829
  }
@@ -70973,6 +70972,7 @@ class Dssp {
70973
70972
  let domainid2segs = this.parseAlignData_part1(dataArray, domainidpairArray, bRound1);
70974
70973
 
70975
70974
  // no more Igs to detect
70975
+ // no need to rerun the rest residues any more
70976
70976
  if(Object.keys(domainid2segs).length == 0) {
70977
70977
  bNoMoreIg = true;
70978
70978
  return bNoMoreIg;
@@ -71044,7 +71044,7 @@ class Dssp {
71044
71044
 
71045
71045
  dataArray3 = await this.promiseWithFixedJobs(ajaxArray);
71046
71046
 
71047
- await this.parseAlignData(dataArray3, domainidpairArray3, false);
71047
+ bNoMoreIg = await this.parseAlignData(dataArray3, domainidpairArray3, false);
71048
71048
 
71049
71049
  // end of round 2
71050
71050
  return bNoMoreIg;
@@ -71094,7 +71094,7 @@ class Dssp {
71094
71094
 
71095
71095
  // assign ic.resid2refnum, ic.refnum2residArray, ic.chainsMapping
71096
71096
  if(!ic.resid2refnum) ic.resid2refnum = {};
71097
- if(!ic.resid2refnum_ori) ic.resid2refnum_ori = {};
71097
+ // if(!ic.resid2refnum_ori) ic.resid2refnum_ori = {};
71098
71098
  if(!ic.refnum2residArray) ic.refnum2residArray = {};
71099
71099
  if(!ic.chainsMapping) ic.chainsMapping = {};
71100
71100
 
@@ -71267,7 +71267,7 @@ class Dssp {
71267
71267
  // only sheet or loop will be aligned
71268
71268
  if(atom.ss != 'helix') {
71269
71269
  ic.resid2refnum[resid] = refnumLabel;
71270
- ic.resid2refnum_ori[resid] = refnumLabel;
71270
+ // ic.resid2refnum_ori[resid] = refnumLabel;
71271
71271
  ic.resid2domainid[resid] = domainid;
71272
71272
  }
71273
71273
  //}
@@ -71858,7 +71858,7 @@ class Dssp {
71858
71858
  ic.resid2refnum[currResid] = strandArray[i].strand + (oriStartRefnum - k).toString();
71859
71859
 
71860
71860
  ic.resid2domainid[currResid] = domainid;
71861
- ic.resid2refnum_ori[currResid] = 1; // a hash to check which residues were assigned
71861
+ // ic.resid2refnum_ori[currResid] = 1; // a hash to check which residues were assigned
71862
71862
  }
71863
71863
 
71864
71864
  break;
@@ -71895,7 +71895,7 @@ class Dssp {
71895
71895
  ic.resid2refnum[currResid] = strandArray[i].strand + (oriEndRefnum + k).toString();
71896
71896
 
71897
71897
  ic.resid2domainid[currResid] = domainid;
71898
- ic.resid2refnum_ori[currResid] = 1; // a hash to check which residues were assigned
71898
+ // ic.resid2refnum_ori[currResid] = 1; // a hash to check which residues were assigned
71899
71899
  }
71900
71900
 
71901
71901
  break;
@@ -71926,7 +71926,7 @@ class Dssp {
71926
71926
  let domainid = ic.resid2domainid[resid];
71927
71927
  removeDomainidHash[domainid] = 1;
71928
71928
  continue;
71929
- }
71929
+ }
71930
71930
  }
71931
71931
  }
71932
71932
 
@@ -72119,6 +72119,7 @@ class Dssp {
72119
72119
  // remove domians without B,C,E,F strands
72120
72120
  if(removeDomainidHash.hasOwnProperty(domainid)) {
72121
72121
  delete ic.resid2refnum[residueid];
72122
+ delete ic.residIgLoop[residueid];
72122
72123
  delete ic.resid2domainid[residueid];
72123
72124
 
72124
72125
  continue;