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.js CHANGED
@@ -62303,10 +62303,12 @@ class SetDialog {
62303
62303
  html += "</select></div><br>";
62304
62304
 
62305
62305
  // some issues in aligning 4orz_C and 5esv_H due to insertion code
62306
- //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>";
62306
+ // 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>";
62307
+ 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>";
62307
62308
 
62308
- //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>";
62309
- 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>";
62309
+ // 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>";
62310
+
62311
+ // 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>";
62310
62312
 
62311
62313
  html += "</div>";
62312
62314
 
@@ -98792,8 +98794,9 @@ class ShowSeq {
98792
98794
  // 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;
98793
98795
  let resi = ic.ParserUtilsCls.getResi(chnid, i);
98794
98796
  let residueid = chnid + '_' + resi;
98797
+ let atom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[residueid]);
98795
98798
 
98796
- if( ic.residues.hasOwnProperty(residueid) ) {
98799
+ if( ic.residues.hasOwnProperty(residueid) && !atom.het ) {
98797
98800
  if(ic.secondaries[residueid] == 'H') {
98798
98801
  if(i % 2 == 0) {
98799
98802
  html += '<span class="icn3d-helix">';
@@ -98804,7 +98807,6 @@ class ShowSeq {
98804
98807
  html += '&nbsp;</span>';
98805
98808
  }
98806
98809
  else if(ic.secondaries[residueid] == 'E') {
98807
- let atom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[residueid]);
98808
98810
  if(atom.ssend) {
98809
98811
  if(ic.sheetcolor == 'green') {
98810
98812
  html += '<span class="icn3d-sheet2">';
@@ -100986,7 +100988,7 @@ class GetGraph {
100986
100988
  let pos = node.id.indexOf('.');
100987
100989
  let nodeName =(pos == -1) ? node.id : node.id.substr(0, pos);
100988
100990
  if(nodeName.length > 4) nodeName = nodeName.substr(0, 1) + '..' + nodeName.substr(nodeName.length - 2);
100989
-
100991
+
100990
100992
  let adjustx = 0, adjusty =(setName == 'a') ? -7 : 10;
100991
100993
  if(i % 2 == 1) adjusty =(setName == 'a') ? adjusty - 7 : adjusty + 7;
100992
100994
 
@@ -103603,10 +103605,6 @@ class AlignParser {
103603
103605
  //var ids_str =(alignArray.length === 2? 'uids=' : 'ids=') + align;
103604
103606
  let ids_str = 'ids=' + align;
103605
103607
 
103606
- // let url2 = me.htmlCls.baseUrl + 'vastplus/vastplus.cgi?v=2&cmd=c&b=1&s=1&w3d&' + ids_str;
103607
- // let url2 = me.htmlCls.baseUrl + 'vastplus/vastplus.cgi?v=2&cmd=c&b=1&s=1&w3d&' + ids_str;
103608
- // let url1 = me.htmlCls.baseUrl + 'vastplus/vastplus.cgi?v=2&cmd=c1&b=1&s=1&d=1&' + ids_str;
103609
-
103610
103608
  // combined url1 and url2
103611
103609
  let url2 = me.htmlCls.baseUrl + 'vastplus/vastplus.cgi?v=3&cmd=c&b=1&s=1&w3d&' + ids_str;
103612
103610
 
@@ -114646,7 +114644,8 @@ class SetSeqAlign {
114646
114644
  if(ic.alnChainsSeq[chainid1]) {
114647
114645
  for(let j = 0, jl = ic.alnChainsSeq[chainid1].length; j < jl; ++j) {
114648
114646
  //add gap before the mapping region
114649
- if(parseInt(ic.alnChainsSeq[chainid1][j].resi) == parseInt(resi_t)) {
114647
+ //if(parseInt(ic.alnChainsSeq[chainid1][j].resi) == parseInt(resi_t)) {
114648
+ if(ic.alnChainsSeq[chainid1][j].resi == resi_t) {
114650
114649
  pos_t = j;
114651
114650
  break;
114652
114651
  }
@@ -114774,10 +114773,17 @@ class SetSeqAlign {
114774
114773
 
114775
114774
  let nGapInTemplate = 0; // number of gaps inserted into the template sequence
114776
114775
  let startPosInTemplate = 0; // position in the template sequence to start the mapping
114776
+
114777
+ // need to improve when tmalign with residue number with postfix such as 52A in 4ORZ_C,5ESV_H
114778
+ // start and end should be positions, not original residue numbers.
114779
+ if(bRealign && me.cfg.aligntool == 'tmalign') {
114780
+ start_t = ic.ParserUtilsCls.getResi(chainid1, start_t);
114781
+ end_t = ic.ParserUtilsCls.getResi(chainid1, end_t);
114782
+ }
114777
114783
 
114778
114784
  for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
114779
114785
  let start1, start2, end1, end2, resiStart1, start1Pos;
114780
-
114786
+
114781
114787
  if(bRealign && me.cfg.aligntool == 'tmalign') { // real residue numbers are stored
114782
114788
  start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start);
114783
114789
  start2 = parseInt(ic.qt_start_end[chainIndex][i].q_start);
@@ -114810,13 +114816,13 @@ class SetSeqAlign {
114810
114816
  if(i == 0) {
114811
114817
  startPosInTemplate = start1Pos;
114812
114818
 
114813
- //result = this.getTemplatePosFromOriResi(chainid1, start_t, start1, bRealign);
114814
- result = this.getTemplatePosFromOriResi(chainid1, start_t, start1Pos, bRealign);
114819
+ result = this.getTemplatePosFromOriResi(chainid1, start_t, start1, bRealign);
114820
+ //result = this.getTemplatePosFromOriResi(chainid1, start_t, start1Pos, bRealign);
114815
114821
  pos1 = result.pos1;
114816
114822
  pos2 = result.pos2;
114817
114823
 
114818
- //if(start1 > start_t) {
114819
- if(start1Pos > start_t) {
114824
+ if(start1 > start_t) {
114825
+ //if(start1Pos > start_t) {
114820
114826
  for(let j = 0, jl = pos2 - pos1; j < jl; ++j) {
114821
114827
  ic.alnChainsSeq[chainid2].push(gapResObject2);
114822
114828
  }
@@ -114830,6 +114836,9 @@ class SetSeqAlign {
114830
114836
  let notAlnLen1 = pos2 - (pos1 + 1);
114831
114837
  let notAlnLen2 = start2 - (prevIndex2 + 1);
114832
114838
 
114839
+ notAlnLen1 = (notAlnLen1 < 0) ? 0 : notAlnLen1;
114840
+ notAlnLen2 = (notAlnLen2 < 0) ? 0 : notAlnLen2;
114841
+
114833
114842
  // insert non-aligned residues in query seq
114834
114843
  this.insertNotAlignRes(chainid2, prevIndex2+1, notAlnLen2, bRealign);
114835
114844
  if(notAlnLen1 >= notAlnLen2) {
@@ -114863,6 +114872,7 @@ class SetSeqAlign {
114863
114872
  else {
114864
114873
  let resi1 = (bRealign && me.cfg.aligntool == 'tmalign') ? start1 + k : ic.ParserUtilsCls.getResi(chainid1, start1 + k);
114865
114874
  let resi2 = (bRealign && me.cfg.aligntool == 'tmalign') ? start2 + k : ic.ParserUtilsCls.getResi(chainid2, start2 + k);
114875
+
114866
114876
  let resn1 = this.getResnFromResi(chainid1, resi1); //this.getResn(chainid1, start1 + k);
114867
114877
  let resn2 = this.getResnFromResi(chainid2, resi2); //this.getResn(chainid2, start2 + k);
114868
114878
 
@@ -115656,7 +115666,8 @@ class LoadPDB {
115656
115666
  // bModifyResi = true;
115657
115667
  // }
115658
115668
 
115659
- if(bOpm && resn === 'DUM') {
115669
+ // if(bOpm && resn === 'DUM') {
115670
+ if(resn === 'DUM') {
115660
115671
  elem = atom;
115661
115672
  chain = 'MEM';
115662
115673
  resi = 1;
@@ -128661,6 +128672,7 @@ class Diagram2d {
128661
128672
  // get the residues in the selection
128662
128673
  let ncbiresid = data;
128663
128674
  let resid = ic.ncbi2resid[ncbiresid];
128675
+ let resi = resid.substr(resid.lastIndexOf('_') + 1);
128664
128676
 
128665
128677
  if(ic.ig2ddgm_chainid && ic.resid2refnum && ic.resid2refnum[resid]) {
128666
128678
  let refnumLabel = ic.resid2refnum[resid];
@@ -128670,7 +128682,7 @@ class Diagram2d {
128670
128682
  thisClass.resetAllNodes('ig2ddgmSvg');
128671
128683
 
128672
128684
  // highlight the residue
128673
- $("#ig2ddgmSvg .c" + refnumStr).css({'font-size': '20px', 'font-weight': 'bold'});
128685
+ $("#ig2ddgmSvg .c" + refnumStr + ":contains('" + resi + "')").css({'font-size': '20px', 'font-weight': 'bold'});
128674
128686
  }
128675
128687
  });
128676
128688
  }
@@ -135863,7 +135875,7 @@ class iCn3DUI {
135863
135875
  //even when multiple iCn3D viewers are shown together.
135864
135876
  this.pre = this.cfg.divid + "_";
135865
135877
 
135866
- this.REVISION = '3.51.1';
135878
+ this.REVISION = '3.51.2';
135867
135879
 
135868
135880
  // In nodejs, iCn3D defines "window = {navigator: {}}", and added window = {navigator: {}, "__THREE__":"177"}
135869
135881
  this.bNode = (Object.keys(window).length < 3) ? true : false;