icn3d 3.30.2 → 3.30.4

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
@@ -5828,7 +5828,7 @@ class ClickMenu {
5828
5828
  if(!ic.bAnnoShown) await ic.showAnnoCls.showAnnotations();
5829
5829
  await ic.annotationCls.setAnnoTabIg(bSelection, template);
5830
5830
 
5831
- // ic.bRunRefnumAgain = false;
5831
+ ic.bRunRefnumAgain = false;
5832
5832
  }
5833
5833
 
5834
5834
  clickMenu1() { let me = this.icn3dui; me.icn3d;
@@ -7414,7 +7414,7 @@ class ClickMenu {
7414
7414
  // ic.drawCls.draw();
7415
7415
  // }
7416
7416
 
7417
- // ic.bRunRefnumAgain = false;
7417
+ ic.bRunRefnumAgain = false;
7418
7418
  });
7419
7419
 
7420
7420
  me.myEventCls.onIds("#" + me.pre + "mn6_igrefTpl", "click", async function(e) { me.icn3d; //e.preventDefault();
@@ -14993,7 +14993,7 @@ class AlignSeq {
14993
14993
  alignChainArray = Object.keys(ic.alnChains);
14994
14994
 
14995
14995
  if (bReverse) alignChainArray = alignChainArray.reverse();
14996
-
14996
+
14997
14997
  let maxSeqCnt = 0;
14998
14998
 
14999
14999
  let chainHash = {};
@@ -37720,8 +37720,6 @@ class AnnoIg {
37720
37720
  $("#" + ic.pre + "dt_" + type + "_" + chnid).html(html);
37721
37721
  $("#" + ic.pre + "ov_" + type + "_" + chnid).html(html2);
37722
37722
  $("#" + ic.pre + "tt_" + type + "_" + chnid).html(html3);
37723
-
37724
- ic.bRunRefnumAgain = false;
37725
37723
  }
37726
37724
 
37727
37725
  showAllRefNum(giSeq, chnid) { let ic = this.icn3d; ic.icn3dui;
@@ -42509,7 +42507,7 @@ class Annotation {
42509
42507
 
42510
42508
  ic.bRunRefnumAgain = true;
42511
42509
  await this.updateIg();
42512
- // ic.bRunRefnumAgain = false;
42510
+ ic.bRunRefnumAgain = false;
42513
42511
 
42514
42512
  this.updateInteraction();
42515
42513
  }
@@ -42591,8 +42589,9 @@ class Annotation {
42591
42589
 
42592
42590
  $("[id^=" + ic.pre + "transmem]").show();
42593
42591
  }
42594
- if($("#" + ic.pre + "anno_ig").length && $("#" + ic.pre + "anno_ig")[0].checked) {
42595
- // ic.bRunRefnumAgain = true;
42592
+ if($("#" + ic.pre + "anno_ig").length && $("#" + ic.pre + "anno_ig")[0].checked || ic.bShowRefnum) {
42593
+ // no need to redo ref num calculation
42594
+ ic.bRunRefnumAgain = false;
42596
42595
 
42597
42596
  await this.updateIg();
42598
42597
 
@@ -42705,6 +42704,7 @@ class Annotation {
42705
42704
  if($("#" + ic.pre + "anno_transmem").length) $("#" + ic.pre + "anno_transmem")[0].checked = false;
42706
42705
  }
42707
42706
  async setAnnoTabIg(bSelection, template) { let ic = this.icn3d; ic.icn3dui;
42707
+
42708
42708
  await this.updateIg(bSelection, template);
42709
42709
 
42710
42710
  $("[id^=" + ic.pre + "ig]").show();
@@ -42867,7 +42867,7 @@ class Annotation {
42867
42867
  await thisClass.setAnnoTabIg();
42868
42868
  me.htmlCls.clickMenuCls.setLogCmd("set annotation ig", true);
42869
42869
 
42870
- // ic.bRunRefnumAgain = false;
42870
+ ic.bRunRefnumAgain = false;
42871
42871
  }
42872
42872
  else {
42873
42873
  thisClass.hideAnnoTabIg();
@@ -49091,7 +49091,7 @@ class ChainalignParser {
49091
49091
  await this.downloadChainalignmentPart3(chainresiCalphaHash2, chainidArray, ic.hAtoms);
49092
49092
  }
49093
49093
 
49094
- setMsa(chainidArray, bVastplus, bRealign) { let ic = this.icn3d, me = ic.icn3dui;
49094
+ setMsa(chainidArray, bVastplus, bRealign) { let ic = this.icn3d, me = ic.icn3dui;
49095
49095
  // get aligned length for each pair
49096
49096
  let index_alignLen = [];
49097
49097
  for(let index = 1, indexl = chainidArray.length; index < indexl; ++index) {
@@ -49914,6 +49914,7 @@ class ChainalignParser {
49914
49914
  // vastplusAtype: 0: VAST, global, 1: VAST, invarant core, 2: TM-align, global
49915
49915
  // VAST+ on the fly
49916
49916
  let structArray = Object.keys(ic.structures);
49917
+ if(vastplusAtype == 2) me.cfg.aligntool = 'tmalign';
49917
49918
  await ic.vastplusCls.vastplusAlign(structArray, vastplusAtype);
49918
49919
  }
49919
49920
 
@@ -55682,7 +55683,8 @@ class ParserUtils {
55682
55683
 
55683
55684
  // display the structure right away. load the mns and sequences later
55684
55685
  setTimeout(async function(){
55685
- if(ic.bInitial) {
55686
+ if(ic.bInitial) {
55687
+ // if(!ic.bAnnoShown || ic.bResetAnno) {
55686
55688
  // if(me.cfg.showsets) {
55687
55689
  // ic.definedSetsCls.showSets();
55688
55690
  // }
@@ -57356,7 +57358,14 @@ class SetSeqAlign {
57356
57358
  // resi = ic.qt_start_end[chainIndex][i].t_start;
57357
57359
  // }
57358
57360
  // else {
57359
- let resiPos = (bRealign || me.cfg.aligntool != 'tmalign') ? j : j - baseResi;
57361
+ // let resiPos = (bRealign || me.cfg.aligntool != 'tmalign') ? j : j - baseResi;
57362
+ let resiPos;
57363
+ if(me.cfg.aligntool == 'tmalign') {
57364
+ resiPos = j - baseResi;
57365
+ }
57366
+ else {
57367
+ resiPos = (bRealign) ? j : j - baseResi;
57368
+ }
57360
57369
  resi = ic.ParserUtilsCls.getResi(chainidArray[0], resiPos);
57361
57370
  // }
57362
57371
 
@@ -59150,6 +59159,7 @@ class Vastplus {
59150
59159
  }
59151
59160
 
59152
59161
  let bRealign = true, atype = 2; // VAST+ based on TM-align
59162
+ me.cfg.aligntool = 'tmalign';
59153
59163
  await ic.vastplusCls.vastplusAlign(Object.keys(structHash), atype, bRealign);
59154
59164
  }
59155
59165
 
@@ -60094,7 +60104,7 @@ class ApplyCommand {
60094
60104
  else if(command == 'set annotation ig') {
60095
60105
  ic.bRunRefnumAgain = true;
60096
60106
  await ic.annotationCls.setAnnoTabIg();
60097
- // ic.bRunRefnumAgain = false;
60107
+ ic.bRunRefnumAgain = false;
60098
60108
  }
60099
60109
  else if(command == 'ig refnum on') {
60100
60110
  ic.bRunRefnumAgain = true;
@@ -60102,7 +60112,7 @@ class ApplyCommand {
60102
60112
  if(!ic.bAnnoShown) await ic.showAnnoCls.showAnnotations();
60103
60113
  await ic.annotationCls.setAnnoTabIg(true);
60104
60114
 
60105
- // ic.bRunRefnumAgain = false;
60115
+ ic.bRunRefnumAgain = false;
60106
60116
  }
60107
60117
  else if(command == 'highlight level up') {
60108
60118
  ic.resid2specCls.switchHighlightLevelUp();
@@ -62825,7 +62835,7 @@ class LoadScript {
62825
62835
  if(!ic.bAnnoShown) await ic.showAnnoCls.showAnnotations();
62826
62836
  await ic.annotationCls.setAnnoTabIg(true);
62827
62837
 
62828
- // ic.bRunRefnumAgain = false;
62838
+ ic.bRunRefnumAgain = false;
62829
62839
  }
62830
62840
  else if(lastCommand.indexOf('set annotation 3ddomain') == 0) {
62831
62841
  thisClass.applyCommand3ddomain(lastCommand);
@@ -66252,7 +66262,7 @@ class Dssp {
66252
66262
  let endResi = parseInt(segArray[m+1]);
66253
66263
 
66254
66264
  for(let n = startResi; n <= endResi; ++n) {
66255
- let resid = chainid + '_' + pos2resi[n];
66265
+ let resid = chainid + '_' + pos2resi[n - 1];
66256
66266
  ++resCnt;
66257
66267
  domainAtoms = me.hashUtilsCls.unionHash(domainAtoms, ic.residues[resid]);
66258
66268
 
@@ -66274,7 +66284,7 @@ class Dssp {
66274
66284
  let startResi = segArray[m];
66275
66285
  let endResi = segArray[m+1];
66276
66286
  for(let n = parseInt(startResi); n <= parseInt(endResi); ++n) {
66277
- let resid = chainid + '_' + pos2resi[n];
66287
+ let resid = chainid + '_' + pos2resi[n - 1];
66278
66288
  //domainAtoms = me.hashUtilsCls.unionHash(domainAtoms, ic.residues[resid]);
66279
66289
  ic.resid2domainid[resid] = chainid + ',' + k + '_' + resiSum;
66280
66290
  }
@@ -66456,8 +66466,6 @@ class Dssp {
66456
66466
  }
66457
66467
  }
66458
66468
 
66459
- //!!!
66460
-
66461
66469
  // combine the top four clusters for the 2nd round alignment
66462
66470
  if(bRound1) {
66463
66471
  for(let domainid in domainid2refpdbnamelist) {
@@ -67391,13 +67399,15 @@ class Dssp {
67391
67399
  if(i != il - 1) { // modify
67392
67400
  strandArray[i + 1].loopResCnt += strandArray[i].loopResCnt + parseInt(strandArray[i].endResi) - parseInt(strandArray[i].startResi) + 1;
67393
67401
  }
67402
+
67403
+ // assign before removing
67404
+ let resid = chnid + '_' + strandArray[i].startResi;
67394
67405
 
67395
67406
  strandArray.splice(i, 1);
67396
67407
 
67397
67408
  if(strandTmp == 'B' || strandTmp == 'C' || strandTmp == 'E' || strandTmp == 'F') {
67398
67409
  if(!me.bNode) console.log("Ig strand " + strandTmp + " is removed since it is too short...");
67399
67410
 
67400
- let resid = chnid + '_' + strandArray[i].startResi;
67401
67411
  let domainid = ic.resid2domainid[resid];
67402
67412
  removeDomainidHash[domainid] = 1;
67403
67413
  continue;