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.module.js CHANGED
@@ -9803,7 +9803,7 @@ class ClickMenu {
9803
9803
  let resid = residueArray[i];
9804
9804
 
9805
9805
  if(ic.resid2refnum) delete ic.resid2refnum[resid];
9806
- if(ic.resid2refnum_ori) delete ic.resid2refnum_ori[resid];
9806
+ // if(ic.resid2refnum_ori) delete ic.resid2refnum_ori[resid];
9807
9807
  if(ic.resid2domainid) delete ic.resid2domainid[resid];
9808
9808
  }
9809
9809
 
@@ -43417,13 +43417,11 @@ class Domain3d {
43417
43417
  init3ddomain() { let ic = this.icn3d; ic.icn3dui;
43418
43418
  //this.dcut = 8; // threshold for C-alpha interactions
43419
43419
 
43420
- // It seemed the threshold 7 angstrom works better
43421
- //this.dcut = 7; // threshold for C-alpha interactions
43422
43420
  this.dcut = 8; // threshold for C-alpha interactions
43423
43421
 
43424
43422
  // added by Jiyao
43425
- // pdbid 1CD8 requires a min contact 4, not 5
43426
- this.min_contacts = 4; //5; //3; // minimum number of contacts to be considered as neighbors
43423
+ // Ig domain should not be separated into two parts, set min as 2
43424
+ this.min_contacts = 2; //3; // minimum number of contacts to be considered as neighbors
43427
43425
 
43428
43426
  this.MAX_SSE = 512;
43429
43427
 
@@ -47139,8 +47137,10 @@ class Annotation {
47139
47137
  }
47140
47138
  }
47141
47139
 
47140
+ ic.bRunRefnumAgain = true;
47142
47141
  for(let chainid in ic.protein_chainid) {
47143
47142
  await ic.annoIgCls.showIg(chainid, template);
47143
+ ic.bRunRefnumAgain = false; // run it once for all chains
47144
47144
  }
47145
47145
  // }
47146
47146
  // ic.bIgShown = true;
@@ -55528,7 +55528,7 @@ class MmdbParser {
55528
55528
  if(Object.keys(data.atoms).length == 0) { // for large structures such as 3J3Q
55529
55529
  // use mmtfid
55530
55530
  let pdbid = data.pdbId;
55531
- await ic.bciffParserCls.downloadBcif(pdbid);
55531
+ await ic.bcifParserCls.downloadBcif(pdbid);
55532
55532
 
55533
55533
  return;
55534
55534
  }
@@ -71448,6 +71448,7 @@ class Dssp {
71448
71448
  ic.domainid2pdb = {};
71449
71449
 
71450
71450
  let bNoMoreIg = true;
71451
+ let bFoundDomain = false;
71451
71452
  for(let i = 0, il = struArray.length; i < il; ++i) {
71452
71453
  let struct = struArray[i];
71453
71454
  let chainidArray = ic.structures[struct];
@@ -71461,6 +71462,12 @@ class Dssp {
71461
71462
  if(!ic.domainid2refpdbname) ic.domainid2refpdbname = {};
71462
71463
  if(!ic.domainid2score) ic.domainid2score = {};
71463
71464
 
71465
+ if(domainAtomsArray.length == 0) {
71466
+ continue;
71467
+ }
71468
+
71469
+ bFoundDomain = true;
71470
+
71464
71471
  for(let k = 0, kl = domainAtomsArray.length; k < kl; ++k) {
71465
71472
  bNoMoreIg = false;
71466
71473
 
@@ -71474,6 +71481,10 @@ class Dssp {
71474
71481
  let resiSum = atomFirst.resi + ':' + atomLast.resi + ':' + Object.keys(domainAtomsArray[k]).length;
71475
71482
  //let domainid = chainid + '-' + k + '_' + Object.keys(domainAtomsArray[k]).length;
71476
71483
  let domainid = chainid + ',' + k + '_' + resiSum;
71484
+
71485
+ // clear score
71486
+ delete ic.domainid2score[domainid];
71487
+
71477
71488
  ic.domainid2pdb[domainid] = pdb_target;
71478
71489
 
71479
71490
  if(!template) {
@@ -71503,6 +71514,10 @@ class Dssp {
71503
71514
  }
71504
71515
  }
71505
71516
 
71517
+ if(!bFoundDomain) {
71518
+ return bNoMoreIg;
71519
+ }
71520
+
71506
71521
  //try {
71507
71522
  if(!template) {
71508
71523
  let dataArray2 = [];
@@ -71638,27 +71653,13 @@ class Dssp {
71638
71653
  // clear previous refnum assignment if any
71639
71654
  // delete ic.resid2refnum[resid];
71640
71655
  delete ic.residIgLoop[resid];
71656
+ delete ic.resid2domainid[resid];
71641
71657
  }
71642
71658
  }
71643
71659
 
71644
71660
  if(resCnt < minResidues) continue;
71645
71661
 
71646
71662
  domainAtomsArray.push(domainAtoms);
71647
- /*
71648
- let atomFirst = ic.firstAtomObjCls.getFirstAtomObj(domainAtoms);
71649
- let atomLast = ic.firstAtomObjCls.getLastAtomObj(domainAtoms);
71650
- let resiSum = atomFirst.resi + ':' + atomLast.resi + ':' + Object.keys(domainAtoms).length;
71651
-
71652
- for(let m = 0, ml = segArray.length; m < ml; m += 2) {
71653
- let startResi = segArray[m];
71654
- let endResi = segArray[m+1];
71655
- for(let n = parseInt(startResi); n <= parseInt(endResi); ++n) {
71656
- let resid = chainid + '_' + pos2resi[n - 1];
71657
- //domainAtoms = me.hashUtilsCls.unionHash(domainAtoms, ic.residues[resid]);
71658
- ic.resid2domainid[resid] = chainid + ',' + k + '_' + resiSum;
71659
- }
71660
- }
71661
- */
71662
71663
  }
71663
71664
  }
71664
71665
 
@@ -71698,6 +71699,7 @@ class Dssp {
71698
71699
  if(!ic.domainid2ig2imgt) ic.domainid2ig2imgt = {};
71699
71700
 
71700
71701
  let minResidues = 20;
71702
+
71701
71703
  for(let i = 0, il = domainidpairArray.length; i < il; ++i) {
71702
71704
  //let queryData = (me.bNode) ? dataArray[i] : dataArray[i].value; //[0];
71703
71705
  let queryData = (dataArray[i]) ? dataArray[i].value : undefined; //[0];
@@ -71717,15 +71719,12 @@ class Dssp {
71717
71719
 
71718
71720
  if(!bRound1) {
71719
71721
  if(queryData[0].score < tmscoreThreshold || queryData[0].num_res < minResidues) {
71720
- if(!me.bNode) console.log("domainid " + domainid + " and refpdbname " + refpdbname + " were skipped due to a TM-score less than " + tmscoreThreshold);
71722
+ if(!me.bNode) console.log("bRound1: " + bRound1 + ": domainid " + domainid + " and refpdbname " + refpdbname + " were skipped due to a TM-score less than " + tmscoreThreshold);
71721
71723
  continue;
71722
71724
  }
71723
71725
  }
71724
71726
  else {
71725
- // if(queryData[0].super_rmsd > rmsdThreshold || queryData[0].num_res < minResidues) {
71726
- // continue;
71727
- // }
71728
- if(queryData[0].score < tmscoreThreshold || queryData[0].num_res < minResidues) {
71727
+ if(queryData[0].score < tmscoreThreshold || queryData[0].num_res < minResidues / 2) {
71729
71728
  continue;
71730
71729
  }
71731
71730
  }
@@ -71874,6 +71873,7 @@ class Dssp {
71874
71873
  let domainid2segs = this.parseAlignData_part1(dataArray, domainidpairArray, bRound1);
71875
71874
 
71876
71875
  // no more Igs to detect
71876
+ // no need to rerun the rest residues any more
71877
71877
  if(Object.keys(domainid2segs).length == 0) {
71878
71878
  bNoMoreIg = true;
71879
71879
  return bNoMoreIg;
@@ -71945,7 +71945,7 @@ class Dssp {
71945
71945
 
71946
71946
  dataArray3 = await this.promiseWithFixedJobs(ajaxArray);
71947
71947
 
71948
- await this.parseAlignData(dataArray3, domainidpairArray3, false);
71948
+ bNoMoreIg = await this.parseAlignData(dataArray3, domainidpairArray3, false);
71949
71949
 
71950
71950
  // end of round 2
71951
71951
  return bNoMoreIg;
@@ -71995,7 +71995,7 @@ class Dssp {
71995
71995
 
71996
71996
  // assign ic.resid2refnum, ic.refnum2residArray, ic.chainsMapping
71997
71997
  if(!ic.resid2refnum) ic.resid2refnum = {};
71998
- if(!ic.resid2refnum_ori) ic.resid2refnum_ori = {};
71998
+ // if(!ic.resid2refnum_ori) ic.resid2refnum_ori = {};
71999
71999
  if(!ic.refnum2residArray) ic.refnum2residArray = {};
72000
72000
  if(!ic.chainsMapping) ic.chainsMapping = {};
72001
72001
 
@@ -72168,7 +72168,7 @@ class Dssp {
72168
72168
  // only sheet or loop will be aligned
72169
72169
  if(atom.ss != 'helix') {
72170
72170
  ic.resid2refnum[resid] = refnumLabel;
72171
- ic.resid2refnum_ori[resid] = refnumLabel;
72171
+ // ic.resid2refnum_ori[resid] = refnumLabel;
72172
72172
  ic.resid2domainid[resid] = domainid;
72173
72173
  }
72174
72174
  //}
@@ -72759,7 +72759,7 @@ class Dssp {
72759
72759
  ic.resid2refnum[currResid] = strandArray[i].strand + (oriStartRefnum - k).toString();
72760
72760
 
72761
72761
  ic.resid2domainid[currResid] = domainid;
72762
- ic.resid2refnum_ori[currResid] = 1; // a hash to check which residues were assigned
72762
+ // ic.resid2refnum_ori[currResid] = 1; // a hash to check which residues were assigned
72763
72763
  }
72764
72764
 
72765
72765
  break;
@@ -72796,7 +72796,7 @@ class Dssp {
72796
72796
  ic.resid2refnum[currResid] = strandArray[i].strand + (oriEndRefnum + k).toString();
72797
72797
 
72798
72798
  ic.resid2domainid[currResid] = domainid;
72799
- ic.resid2refnum_ori[currResid] = 1; // a hash to check which residues were assigned
72799
+ // ic.resid2refnum_ori[currResid] = 1; // a hash to check which residues were assigned
72800
72800
  }
72801
72801
 
72802
72802
  break;
@@ -72827,7 +72827,7 @@ class Dssp {
72827
72827
  let domainid = ic.resid2domainid[resid];
72828
72828
  removeDomainidHash[domainid] = 1;
72829
72829
  continue;
72830
- }
72830
+ }
72831
72831
  }
72832
72832
  }
72833
72833
 
@@ -73020,6 +73020,7 @@ class Dssp {
73020
73020
  // remove domians without B,C,E,F strands
73021
73021
  if(removeDomainidHash.hasOwnProperty(domainid)) {
73022
73022
  delete ic.resid2refnum[residueid];
73023
+ delete ic.residIgLoop[residueid];
73023
73024
  delete ic.resid2domainid[residueid];
73024
73025
 
73025
73026
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icn3d",
3
- "version": "3.31.4",
3
+ "version": "3.31.5",
4
4
  "main": "./icn3d.js",
5
5
  "exports": {
6
6
  ".": {