icn3d 3.31.3 → 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
 
@@ -42072,7 +42072,7 @@ class AnnoIg {
42072
42072
 
42073
42073
  let igType = (parseFloat(tmscore) < ic.refnumCls.TMThreshold ) ? 'Ig' : ic.ref2igtype[info.refpdbname];
42074
42074
  titleArray.push(igType + ' (TM:' + parseFloat(tmscore).toFixed(2) + ')');
42075
- fullTitleArray.push(igType + ' (TM:' + parseFloat(tmscore).toFixed(2) + '), template: ' + info.refpdbname + ', type: ' + ic.ref2igtype[info.refpdbname] + ' Seq. identity: ' + parseFloat(info.seqid).toFixed(2) + ', aligned residues: ' + info.nresAlign);
42075
+ fullTitleArray.push(igType + ' (TM:' + parseFloat(tmscore).toFixed(2) + '), template: ' + info.refpdbname + ', type: ' + ic.ref2igtype[info.refpdbname] + ', Seq. identity: ' + parseFloat(info.seqid).toFixed(2) + ', aligned residues: ' + info.nresAlign);
42076
42076
 
42077
42077
  domainArray.push(igType);
42078
42078
 
@@ -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
  }
@@ -71795,7 +71794,7 @@ class Dssp {
71795
71794
  delete ic.domainid2refpdbname[domainid];
71796
71795
  delete ic.domainid2score[domainid];
71797
71796
  }
71798
- // continue;
71797
+ continue;
71799
71798
  }
71800
71799
  // }
71801
71800
 
@@ -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
 
@@ -72016,10 +72016,12 @@ class Dssp {
72016
72016
 
72017
72017
  if(refpdbname) {
72018
72018
  let message = "The reference PDB for domain " + domainid + " is " + refpdbname + ". The TM-score is " + score + ". The sequence identity is " + seqid + ". The number of aligned residues is " + nresAlign + ".";
72019
+
72019
72020
  if(!me.bNode) {
72020
72021
  console.log(message);
72021
72022
  me.htmlCls.clickMenuCls.setLogCmd(message, false, true);
72022
72023
  }
72024
+
72023
72025
  // ic.refPdbList.push(message);
72024
72026
  ic.domainid2info[domainid] = {'refpdbname': refpdbname, 'score': score, 'seqid': seqid, 'nresAlign': nresAlign};
72025
72027
  }
@@ -72166,7 +72168,7 @@ class Dssp {
72166
72168
  // only sheet or loop will be aligned
72167
72169
  if(atom.ss != 'helix') {
72168
72170
  ic.resid2refnum[resid] = refnumLabel;
72169
- ic.resid2refnum_ori[resid] = refnumLabel;
72171
+ // ic.resid2refnum_ori[resid] = refnumLabel;
72170
72172
  ic.resid2domainid[resid] = domainid;
72171
72173
  }
72172
72174
  //}
@@ -72223,7 +72225,7 @@ class Dssp {
72223
72225
  // loops may have numbers such as 1310, 1410
72224
72226
 
72225
72227
  let strand;
72226
-
72228
+ /*
72227
72229
  if(refnum < 1000) strand = undefined;
72228
72230
  else if(refnum >= 1200 && refnum < 1290) strand = "A---";
72229
72231
  else if(refnum >= 1320 && refnum < 1390) strand = "A--";
@@ -72246,6 +72248,34 @@ class Dssp {
72246
72248
  else if(refnum >= 9720 && refnum < 9790) strand = "G++";
72247
72249
  else if(refnum > 9900) strand = undefined;
72248
72250
  else strand = " ";
72251
+ */
72252
+
72253
+ // cover all ranges
72254
+ if(refnum < 1000) strand = undefined;
72255
+ else if(refnum >= 1200 && refnum < 1320) strand = "A---";
72256
+ else if(refnum >= 1320 && refnum < 1420) strand = "A--";
72257
+ else if(refnum >= 1420 && refnum < 1520) strand = "A-";
72258
+ else if(refnum >= 1520 && refnum < 1620) strand = "A";
72259
+ else if(refnum >= 1620 && refnum < 1720) strand = "A+";
72260
+ else if(refnum >= 1720 && refnum < 1820) strand = "A++";
72261
+ else if(refnum >= 1820 && refnum < 2000) strand = "A'";
72262
+ else if(refnum >= 2000 && refnum < 3000) strand = "B";
72263
+ else if(refnum >= 3000 && refnum < 3420) strand = "C--";
72264
+ else if(refnum >= 3420 && refnum < 3520) strand = "C-";
72265
+ else if(refnum >= 3520 && refnum < 4000) strand = "C";
72266
+ else if(refnum >= 4000 && refnum < 5000) strand = "C'";
72267
+ else if(refnum >= 5000 && refnum < 6000) strand = "C''";
72268
+ else if(refnum >= 6000 && refnum < 7000) strand = "D";
72269
+ else if(refnum >= 7000 && refnum < 7620) strand = "E";
72270
+ else if(refnum >= 7620 && refnum < 8000) strand = "E+";
72271
+ else if(refnum >= 8000 && refnum < 9000) strand = "F";
72272
+ else if(refnum >= 9000 && refnum < 9620) strand = "G";
72273
+ else if(refnum >= 9620 && refnum < 9720) strand = "G+";
72274
+ else if(refnum >= 9720 && refnum < 9820) strand = "G++";
72275
+ else if(refnum >= 9820 && refnum < 9900) strand = "G+++";
72276
+ else if(refnum > 9900) strand = undefined;
72277
+ else strand = " ";
72278
+
72249
72279
  if(prevStrand) strand = prevStrand;
72250
72280
 
72251
72281
  return strand
@@ -72567,7 +72597,7 @@ class Dssp {
72567
72597
  refnum3c = (refnum - parseInt(refnum/1000) * 1000).toString();
72568
72598
  refnum2c = (refnum - parseInt(refnum/100) * 100).toString();
72569
72599
 
72570
- // for extended strands, since A is 1550 and A+ is 1650, then the AA+ loop will be 1591, 1592, ... 1610, 1611, etc
72600
+ // for extended strands, since A is 1550 and A+ is 1650, then the AA+ loop will be 1591, 1592, ... 1618, 1619, etc
72571
72601
  bSecThird9 = refnum3c.substr(0,1) == '9' || refnum2c.substr(0,1) == '9' || refnum2c.substr(0,1) == '0' || refnum2c.substr(0,1) == '1';
72572
72602
  if(bSecThird9) ic.residIgLoop[residueid] = 1;
72573
72603
 
@@ -72713,6 +72743,7 @@ class Dssp {
72713
72743
  let domainid = ic.resid2domainid[currResid];
72714
72744
  if(currAtom.ssbegin) { // find the start of the sheet
72715
72745
  // update the following: startResi,startRefnum,endResi,endRefnum,loopResCnt,resCntBfAnchor,resCntAtAnchor
72746
+ let oriStartRefnum = strandArray[i].startRefnum;
72716
72747
  strandArray[i].startResi = currResi;
72717
72748
  strandArray[i].startRefnum -= j;
72718
72749
  strandArray[i].loopResCnt -= j;
@@ -72725,8 +72756,10 @@ class Dssp {
72725
72756
  currResi = ic.ParserUtilsCls.getResi(chnid, currPos);
72726
72757
  let currResid = chnid + '_' + currResi;
72727
72758
  delete ic.residIgLoop[currResid];
72759
+ ic.resid2refnum[currResid] = strandArray[i].strand + (oriStartRefnum - k).toString();
72760
+
72728
72761
  ic.resid2domainid[currResid] = domainid;
72729
- 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
72730
72763
  }
72731
72764
 
72732
72765
  break;
@@ -72745,6 +72778,7 @@ class Dssp {
72745
72778
  let domainid = ic.resid2domainid[currResid];
72746
72779
  if(currAtom.ssend) { // find the end of the sheet
72747
72780
  // update the following: startResi,startRefnum,endResi,endRefnum,loopResCnt,resCntBfAnchor,resCntAtAnchor
72781
+ let oriEndRefnum = strandArray[i].endRefnum;
72748
72782
  strandArray[i].endResi = currResi;
72749
72783
  strandArray[i].endRefnum += j;
72750
72784
  if(i < il - 1) {
@@ -72759,8 +72793,10 @@ class Dssp {
72759
72793
  currResi = ic.ParserUtilsCls.getResi(chnid, currPos);
72760
72794
  let currResid = chnid + '_' + currResi;
72761
72795
  delete ic.residIgLoop[currResid];
72796
+ ic.resid2refnum[currResid] = strandArray[i].strand + (oriEndRefnum + k).toString();
72797
+
72762
72798
  ic.resid2domainid[currResid] = domainid;
72763
- 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
72764
72800
  }
72765
72801
 
72766
72802
  break;
@@ -72791,7 +72827,7 @@ class Dssp {
72791
72827
  let domainid = ic.resid2domainid[resid];
72792
72828
  removeDomainidHash[domainid] = 1;
72793
72829
  continue;
72794
- }
72830
+ }
72795
72831
  }
72796
72832
  }
72797
72833
 
@@ -72984,6 +73020,7 @@ class Dssp {
72984
73020
  // remove domians without B,C,E,F strands
72985
73021
  if(removeDomainidHash.hasOwnProperty(domainid)) {
72986
73022
  delete ic.resid2refnum[residueid];
73023
+ delete ic.residIgLoop[residueid];
72987
73024
  delete ic.resid2domainid[residueid];
72988
73025
 
72989
73026
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icn3d",
3
- "version": "3.31.3",
3
+ "version": "3.31.5",
4
4
  "main": "./icn3d.js",
5
5
  "exports": {
6
6
  ".": {