icn3d 3.51.1 → 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">';
@@ -101886,6 +101888,8 @@ class GetGraph {
101886
101888
  "#" + ic.hColor.getHexString().toUpperCase();
101887
101889
  let pos = node.id.indexOf('.');
101888
101890
  let nodeName =(pos == -1) ? node.id : node.id.substr(0, pos);
101891
+ if(nodeName.length > 4) nodeName = nodeName.substr(0, 1) + '..' + nodeName.substr(nodeName.length - 2);
101892
+
101889
101893
  let adjustx = 0, adjusty =(setName == 'a') ? -7 : 10;
101890
101894
  if(i % 2 == 1) adjusty =(setName == 'a') ? adjusty - 7 : adjusty + 7;
101891
101895
 
@@ -104502,10 +104506,6 @@ class AlignParser {
104502
104506
  //var ids_str =(alignArray.length === 2? 'uids=' : 'ids=') + align;
104503
104507
  let ids_str = 'ids=' + align;
104504
104508
 
104505
- // let url2 = me.htmlCls.baseUrl + 'vastplus/vastplus.cgi?v=2&cmd=c&b=1&s=1&w3d&' + ids_str;
104506
- // let url2 = me.htmlCls.baseUrl + 'vastplus/vastplus.cgi?v=2&cmd=c&b=1&s=1&w3d&' + ids_str;
104507
- // let url1 = me.htmlCls.baseUrl + 'vastplus/vastplus.cgi?v=2&cmd=c1&b=1&s=1&d=1&' + ids_str;
104508
-
104509
104509
  // combined url1 and url2
104510
104510
  let url2 = me.htmlCls.baseUrl + 'vastplus/vastplus.cgi?v=3&cmd=c&b=1&s=1&w3d&' + ids_str;
104511
104511
 
@@ -115545,7 +115545,8 @@ class SetSeqAlign {
115545
115545
  if(ic.alnChainsSeq[chainid1]) {
115546
115546
  for(let j = 0, jl = ic.alnChainsSeq[chainid1].length; j < jl; ++j) {
115547
115547
  //add gap before the mapping region
115548
- 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) {
115549
115550
  pos_t = j;
115550
115551
  break;
115551
115552
  }
@@ -115673,10 +115674,17 @@ class SetSeqAlign {
115673
115674
 
115674
115675
  let nGapInTemplate = 0; // number of gaps inserted into the template sequence
115675
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
+ }
115676
115684
 
115677
115685
  for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
115678
115686
  let start1, start2, end1, end2, resiStart1, start1Pos;
115679
-
115687
+
115680
115688
  if(bRealign && me.cfg.aligntool == 'tmalign') { // real residue numbers are stored
115681
115689
  start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start);
115682
115690
  start2 = parseInt(ic.qt_start_end[chainIndex][i].q_start);
@@ -115709,13 +115717,13 @@ class SetSeqAlign {
115709
115717
  if(i == 0) {
115710
115718
  startPosInTemplate = start1Pos;
115711
115719
 
115712
- //result = this.getTemplatePosFromOriResi(chainid1, start_t, start1, bRealign);
115713
- 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);
115714
115722
  pos1 = result.pos1;
115715
115723
  pos2 = result.pos2;
115716
115724
 
115717
- //if(start1 > start_t) {
115718
- if(start1Pos > start_t) {
115725
+ if(start1 > start_t) {
115726
+ //if(start1Pos > start_t) {
115719
115727
  for(let j = 0, jl = pos2 - pos1; j < jl; ++j) {
115720
115728
  ic.alnChainsSeq[chainid2].push(gapResObject2);
115721
115729
  }
@@ -115729,6 +115737,9 @@ class SetSeqAlign {
115729
115737
  let notAlnLen1 = pos2 - (pos1 + 1);
115730
115738
  let notAlnLen2 = start2 - (prevIndex2 + 1);
115731
115739
 
115740
+ notAlnLen1 = (notAlnLen1 < 0) ? 0 : notAlnLen1;
115741
+ notAlnLen2 = (notAlnLen2 < 0) ? 0 : notAlnLen2;
115742
+
115732
115743
  // insert non-aligned residues in query seq
115733
115744
  this.insertNotAlignRes(chainid2, prevIndex2+1, notAlnLen2, bRealign);
115734
115745
  if(notAlnLen1 >= notAlnLen2) {
@@ -115762,6 +115773,7 @@ class SetSeqAlign {
115762
115773
  else {
115763
115774
  let resi1 = (bRealign && me.cfg.aligntool == 'tmalign') ? start1 + k : ic.ParserUtilsCls.getResi(chainid1, start1 + k);
115764
115775
  let resi2 = (bRealign && me.cfg.aligntool == 'tmalign') ? start2 + k : ic.ParserUtilsCls.getResi(chainid2, start2 + k);
115776
+
115765
115777
  let resn1 = this.getResnFromResi(chainid1, resi1); //this.getResn(chainid1, start1 + k);
115766
115778
  let resn2 = this.getResnFromResi(chainid2, resi2); //this.getResn(chainid2, start2 + k);
115767
115779
 
@@ -116555,7 +116567,8 @@ class LoadPDB {
116555
116567
  // bModifyResi = true;
116556
116568
  // }
116557
116569
 
116558
- if(bOpm && resn === 'DUM') {
116570
+ // if(bOpm && resn === 'DUM') {
116571
+ if(resn === 'DUM') {
116559
116572
  elem = atom;
116560
116573
  chain = 'MEM';
116561
116574
  resi = 1;
@@ -129560,6 +129573,7 @@ class Diagram2d {
129560
129573
  // get the residues in the selection
129561
129574
  let ncbiresid = data;
129562
129575
  let resid = ic.ncbi2resid[ncbiresid];
129576
+ let resi = resid.substr(resid.lastIndexOf('_') + 1);
129563
129577
 
129564
129578
  if(ic.ig2ddgm_chainid && ic.resid2refnum && ic.resid2refnum[resid]) {
129565
129579
  let refnumLabel = ic.resid2refnum[resid];
@@ -129569,7 +129583,7 @@ class Diagram2d {
129569
129583
  thisClass.resetAllNodes('ig2ddgmSvg');
129570
129584
 
129571
129585
  // highlight the residue
129572
- $("#ig2ddgmSvg .c" + refnumStr).css({'font-size': '20px', 'font-weight': 'bold'});
129586
+ $("#ig2ddgmSvg .c" + refnumStr + ":contains('" + resi + "')").css({'font-size': '20px', 'font-weight': 'bold'});
129573
129587
  }
129574
129588
  });
129575
129589
  }
@@ -136762,7 +136776,7 @@ class iCn3DUI {
136762
136776
  //even when multiple iCn3D viewers are shown together.
136763
136777
  this.pre = this.cfg.divid + "_";
136764
136778
 
136765
- this.REVISION = '3.51.0';
136779
+ this.REVISION = '3.51.2';
136766
136780
 
136767
136781
  // In nodejs, iCn3D defines "window = {navigator: {}}", and added window = {navigator: {}, "__THREE__":"177"}
136768
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.1",
3
+ "version": "3.51.3",
4
4
  "main": "./icn3d.js",
5
5
  "exports": {
6
6
  ".": {