icn3d 3.51.2 → 3.51.3

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
@@ -63204,10 +63204,12 @@ class SetDialog {
63204
63204
  html += "</select></div><br>";
63205
63205
 
63206
63206
  // some issues in aligning 4orz_C and 5esv_H due to insertion code
63207
- //html += "<div><b>2a</b>. <div style='display:inline-block; width:170px'>Align to First Chain:</div> " + me.htmlCls.buttonStr + "applyRealignByStructMsa_tmalign'>Realign with TM-align</button>" + me.htmlCls.buttonStr + "applyRealignByStructMsa' style='margin-left:30px'>Realign with VAST</button></div><br>";
63207
+ // html += "<div><b>2</b>. <div style='display:inline-block; width:170px'>Align to First Chain:</div> " + me.htmlCls.buttonStr + "applyRealignByStructMsa_tmalign'>Realign with TM-align</button>" + me.htmlCls.buttonStr + "applyRealignByStructMsa' style='margin-left:30px'>Realign with VAST</button></div><br>";
63208
+ html += "<div><b>2</b>. " + me.htmlCls.buttonStr + "applyRealignByStructMsa_tmalign'>Realign with TM-align</button>" + me.htmlCls.buttonStr + "applyRealignByStructMsa' style='margin-left:30px'>Realign with VAST</button></div><br>";
63208
63209
 
63209
- //html += "<div>or <b>2b</b>. <div style='display:inline-block; width:155px'>Align All Chains Pairwise:</div> " + me.htmlCls.buttonStr + "applyRealignByStruct_tmalign'>Realign with TM-align</button>" + me.htmlCls.buttonStr + "applyRealignByStruct' style='margin-left:30px'>Realign with VAST</button></div><br>";
63210
- html += "<div><b>2</b>. " + me.htmlCls.buttonStr + "applyRealignByStruct_tmalign'>Realign with TM-align</button>" + me.htmlCls.buttonStr + "applyRealignByStruct' style='margin-left:30px'>Realign with VAST</button></div><br>";
63210
+ // html += "<div>or <b>2b</b>. <div style='display:inline-block; width:155px'>Align All Chains Pairwise:</div> " + me.htmlCls.buttonStr + "applyRealignByStruct_tmalign'>Realign with TM-align</button>" + me.htmlCls.buttonStr + "applyRealignByStruct' style='margin-left:30px'>Realign with VAST</button></div><br>";
63211
+
63212
+ // html += "<div><b>2</b>. " + me.htmlCls.buttonStr + "applyRealignByStruct_tmalign'>Realign with TM-align</button>" + me.htmlCls.buttonStr + "applyRealignByStruct' style='margin-left:30px'>Realign with VAST</button></div><br>";
63211
63213
 
63212
63214
  html += "</div>";
63213
63215
 
@@ -99693,8 +99695,9 @@ class ShowSeq {
99693
99695
  // let resi =(i >= ic.matchedPos[chnid] && i - ic.matchedPos[chnid] < ic.chainsSeq[chnid].length) ? ic.chainsSeq[chnid][i - ic.matchedPos[chnid]].resi : ic.baseResi[chnid] + 1 + i;
99694
99696
  let resi = ic.ParserUtilsCls.getResi(chnid, i);
99695
99697
  let residueid = chnid + '_' + resi;
99698
+ let atom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[residueid]);
99696
99699
 
99697
- if( ic.residues.hasOwnProperty(residueid) ) {
99700
+ if( ic.residues.hasOwnProperty(residueid) && !atom.het ) {
99698
99701
  if(ic.secondaries[residueid] == 'H') {
99699
99702
  if(i % 2 == 0) {
99700
99703
  html += '<span class="icn3d-helix">';
@@ -99705,7 +99708,6 @@ class ShowSeq {
99705
99708
  html += '&nbsp;</span>';
99706
99709
  }
99707
99710
  else if(ic.secondaries[residueid] == 'E') {
99708
- let atom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[residueid]);
99709
99711
  if(atom.ssend) {
99710
99712
  if(ic.sheetcolor == 'green') {
99711
99713
  html += '<span class="icn3d-sheet2">';
@@ -101887,7 +101889,7 @@ class GetGraph {
101887
101889
  let pos = node.id.indexOf('.');
101888
101890
  let nodeName =(pos == -1) ? node.id : node.id.substr(0, pos);
101889
101891
  if(nodeName.length > 4) nodeName = nodeName.substr(0, 1) + '..' + nodeName.substr(nodeName.length - 2);
101890
-
101892
+
101891
101893
  let adjustx = 0, adjusty =(setName == 'a') ? -7 : 10;
101892
101894
  if(i % 2 == 1) adjusty =(setName == 'a') ? adjusty - 7 : adjusty + 7;
101893
101895
 
@@ -104504,10 +104506,6 @@ class AlignParser {
104504
104506
  //var ids_str =(alignArray.length === 2? 'uids=' : 'ids=') + align;
104505
104507
  let ids_str = 'ids=' + align;
104506
104508
 
104507
- // let url2 = me.htmlCls.baseUrl + 'vastplus/vastplus.cgi?v=2&cmd=c&b=1&s=1&w3d&' + ids_str;
104508
- // let url2 = me.htmlCls.baseUrl + 'vastplus/vastplus.cgi?v=2&cmd=c&b=1&s=1&w3d&' + ids_str;
104509
- // let url1 = me.htmlCls.baseUrl + 'vastplus/vastplus.cgi?v=2&cmd=c1&b=1&s=1&d=1&' + ids_str;
104510
-
104511
104509
  // combined url1 and url2
104512
104510
  let url2 = me.htmlCls.baseUrl + 'vastplus/vastplus.cgi?v=3&cmd=c&b=1&s=1&w3d&' + ids_str;
104513
104511
 
@@ -115547,7 +115545,8 @@ class SetSeqAlign {
115547
115545
  if(ic.alnChainsSeq[chainid1]) {
115548
115546
  for(let j = 0, jl = ic.alnChainsSeq[chainid1].length; j < jl; ++j) {
115549
115547
  //add gap before the mapping region
115550
- if(parseInt(ic.alnChainsSeq[chainid1][j].resi) == parseInt(resi_t)) {
115548
+ //if(parseInt(ic.alnChainsSeq[chainid1][j].resi) == parseInt(resi_t)) {
115549
+ if(ic.alnChainsSeq[chainid1][j].resi == resi_t) {
115551
115550
  pos_t = j;
115552
115551
  break;
115553
115552
  }
@@ -115675,10 +115674,17 @@ class SetSeqAlign {
115675
115674
 
115676
115675
  let nGapInTemplate = 0; // number of gaps inserted into the template sequence
115677
115676
  let startPosInTemplate = 0; // position in the template sequence to start the mapping
115677
+
115678
+ // need to improve when tmalign with residue number with postfix such as 52A in 4ORZ_C,5ESV_H
115679
+ // start and end should be positions, not original residue numbers.
115680
+ if(bRealign && me.cfg.aligntool == 'tmalign') {
115681
+ start_t = ic.ParserUtilsCls.getResi(chainid1, start_t);
115682
+ end_t = ic.ParserUtilsCls.getResi(chainid1, end_t);
115683
+ }
115678
115684
 
115679
115685
  for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
115680
115686
  let start1, start2, end1, end2, resiStart1, start1Pos;
115681
-
115687
+
115682
115688
  if(bRealign && me.cfg.aligntool == 'tmalign') { // real residue numbers are stored
115683
115689
  start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start);
115684
115690
  start2 = parseInt(ic.qt_start_end[chainIndex][i].q_start);
@@ -115711,13 +115717,13 @@ class SetSeqAlign {
115711
115717
  if(i == 0) {
115712
115718
  startPosInTemplate = start1Pos;
115713
115719
 
115714
- //result = this.getTemplatePosFromOriResi(chainid1, start_t, start1, bRealign);
115715
- result = this.getTemplatePosFromOriResi(chainid1, start_t, start1Pos, bRealign);
115720
+ result = this.getTemplatePosFromOriResi(chainid1, start_t, start1, bRealign);
115721
+ //result = this.getTemplatePosFromOriResi(chainid1, start_t, start1Pos, bRealign);
115716
115722
  pos1 = result.pos1;
115717
115723
  pos2 = result.pos2;
115718
115724
 
115719
- //if(start1 > start_t) {
115720
- if(start1Pos > start_t) {
115725
+ if(start1 > start_t) {
115726
+ //if(start1Pos > start_t) {
115721
115727
  for(let j = 0, jl = pos2 - pos1; j < jl; ++j) {
115722
115728
  ic.alnChainsSeq[chainid2].push(gapResObject2);
115723
115729
  }
@@ -115731,6 +115737,9 @@ class SetSeqAlign {
115731
115737
  let notAlnLen1 = pos2 - (pos1 + 1);
115732
115738
  let notAlnLen2 = start2 - (prevIndex2 + 1);
115733
115739
 
115740
+ notAlnLen1 = (notAlnLen1 < 0) ? 0 : notAlnLen1;
115741
+ notAlnLen2 = (notAlnLen2 < 0) ? 0 : notAlnLen2;
115742
+
115734
115743
  // insert non-aligned residues in query seq
115735
115744
  this.insertNotAlignRes(chainid2, prevIndex2+1, notAlnLen2, bRealign);
115736
115745
  if(notAlnLen1 >= notAlnLen2) {
@@ -115764,6 +115773,7 @@ class SetSeqAlign {
115764
115773
  else {
115765
115774
  let resi1 = (bRealign && me.cfg.aligntool == 'tmalign') ? start1 + k : ic.ParserUtilsCls.getResi(chainid1, start1 + k);
115766
115775
  let resi2 = (bRealign && me.cfg.aligntool == 'tmalign') ? start2 + k : ic.ParserUtilsCls.getResi(chainid2, start2 + k);
115776
+
115767
115777
  let resn1 = this.getResnFromResi(chainid1, resi1); //this.getResn(chainid1, start1 + k);
115768
115778
  let resn2 = this.getResnFromResi(chainid2, resi2); //this.getResn(chainid2, start2 + k);
115769
115779
 
@@ -116557,7 +116567,8 @@ class LoadPDB {
116557
116567
  // bModifyResi = true;
116558
116568
  // }
116559
116569
 
116560
- if(bOpm && resn === 'DUM') {
116570
+ // if(bOpm && resn === 'DUM') {
116571
+ if(resn === 'DUM') {
116561
116572
  elem = atom;
116562
116573
  chain = 'MEM';
116563
116574
  resi = 1;
@@ -129562,6 +129573,7 @@ class Diagram2d {
129562
129573
  // get the residues in the selection
129563
129574
  let ncbiresid = data;
129564
129575
  let resid = ic.ncbi2resid[ncbiresid];
129576
+ let resi = resid.substr(resid.lastIndexOf('_') + 1);
129565
129577
 
129566
129578
  if(ic.ig2ddgm_chainid && ic.resid2refnum && ic.resid2refnum[resid]) {
129567
129579
  let refnumLabel = ic.resid2refnum[resid];
@@ -129571,7 +129583,7 @@ class Diagram2d {
129571
129583
  thisClass.resetAllNodes('ig2ddgmSvg');
129572
129584
 
129573
129585
  // highlight the residue
129574
- $("#ig2ddgmSvg .c" + refnumStr).css({'font-size': '20px', 'font-weight': 'bold'});
129586
+ $("#ig2ddgmSvg .c" + refnumStr + ":contains('" + resi + "')").css({'font-size': '20px', 'font-weight': 'bold'});
129575
129587
  }
129576
129588
  });
129577
129589
  }
@@ -136764,7 +136776,7 @@ class iCn3DUI {
136764
136776
  //even when multiple iCn3D viewers are shown together.
136765
136777
  this.pre = this.cfg.divid + "_";
136766
136778
 
136767
- this.REVISION = '3.51.1';
136779
+ this.REVISION = '3.51.2';
136768
136780
 
136769
136781
  // In nodejs, iCn3D defines "window = {navigator: {}}", and added window = {navigator: {}, "__THREE__":"177"}
136770
136782
  this.bNode = (Object.keys(window).length < 3) ? true : false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icn3d",
3
- "version": "3.51.2",
3
+ "version": "3.51.3",
4
4
  "main": "./icn3d.js",
5
5
  "exports": {
6
6
  ".": {