icn3d 3.51.2 → 3.51.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 +47 -35
- package/icn3d.min.js +3 -3
- package/icn3d.module.js +47 -35
- package/package.json +1 -1
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>
|
|
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
|
-
|
|
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 += ' </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
|
|
|
@@ -101150,20 +101152,12 @@ class GetGraph {
|
|
|
101150
101152
|
let thickness = me.htmlCls.coilValue;
|
|
101151
101153
|
let prevChain = '', prevResName = '', prevResi = 0;
|
|
101152
101154
|
// add chemicals as well
|
|
101153
|
-
let residHash =
|
|
101154
|
-
for(let
|
|
101155
|
-
let atom = ic.
|
|
101155
|
+
let residHash = ic.firstAtomObjCls.getResiduesFromAtoms(atomSet);
|
|
101156
|
+
for(let resid in residHash) {
|
|
101157
|
+
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
101156
101158
|
|
|
101157
|
-
if(atom.chain != 'DUM' && (bAnyAtom || atom.het || (atom.name == "CA" && atom.elem == "C") || atom.name == "O3'" || atom.name == "O3*" || atom.name == "P")) {
|
|
101158
|
-
|
|
101159
|
-
//if(atom.chain != 'DUM' &&(atom.name == "CA" || atom.name == "P")) {
|
|
101160
|
-
let resid = atom.structure + '_' + atom.chain + '_' + atom.resi;
|
|
101161
|
-
if(residHash.hasOwnProperty(resid)) {
|
|
101162
|
-
continue;
|
|
101163
|
-
}
|
|
101164
|
-
else {
|
|
101165
|
-
residHash[resid] = 1;
|
|
101166
|
-
}
|
|
101159
|
+
//if(atom.chain != 'DUM' && (bAnyAtom || atom.het || (atom.name == "CA" && atom.elem == "C") || atom.name == "O3'" || atom.name == "O3*" || atom.name == "P")) {
|
|
101160
|
+
if(atom.chain != 'DUM') {
|
|
101167
101161
|
let resName = me.utilsCls.residueName2Abbr(atom.resn) + atom.resi;
|
|
101168
101162
|
if(labelType == 'chain' || labelType == 'structure') resName += '.' + atom.chain;
|
|
101169
101163
|
if(labelType == 'structure') resName += '.' + atom.structure;
|
|
@@ -103603,10 +103597,6 @@ class AlignParser {
|
|
|
103603
103597
|
//var ids_str =(alignArray.length === 2? 'uids=' : 'ids=') + align;
|
|
103604
103598
|
let ids_str = 'ids=' + align;
|
|
103605
103599
|
|
|
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
103600
|
// combined url1 and url2
|
|
103611
103601
|
let url2 = me.htmlCls.baseUrl + 'vastplus/vastplus.cgi?v=3&cmd=c&b=1&s=1&w3d&' + ids_str;
|
|
103612
103602
|
|
|
@@ -114646,7 +114636,8 @@ class SetSeqAlign {
|
|
|
114646
114636
|
if(ic.alnChainsSeq[chainid1]) {
|
|
114647
114637
|
for(let j = 0, jl = ic.alnChainsSeq[chainid1].length; j < jl; ++j) {
|
|
114648
114638
|
//add gap before the mapping region
|
|
114649
|
-
if(parseInt(ic.alnChainsSeq[chainid1][j].resi) == parseInt(resi_t)) {
|
|
114639
|
+
//if(parseInt(ic.alnChainsSeq[chainid1][j].resi) == parseInt(resi_t)) {
|
|
114640
|
+
if(ic.alnChainsSeq[chainid1][j].resi == resi_t) {
|
|
114650
114641
|
pos_t = j;
|
|
114651
114642
|
break;
|
|
114652
114643
|
}
|
|
@@ -114774,10 +114765,17 @@ class SetSeqAlign {
|
|
|
114774
114765
|
|
|
114775
114766
|
let nGapInTemplate = 0; // number of gaps inserted into the template sequence
|
|
114776
114767
|
let startPosInTemplate = 0; // position in the template sequence to start the mapping
|
|
114768
|
+
|
|
114769
|
+
// need to improve when tmalign with residue number with postfix such as 52A in 4ORZ_C,5ESV_H
|
|
114770
|
+
// start and end should be positions, not original residue numbers.
|
|
114771
|
+
if(bRealign && me.cfg.aligntool == 'tmalign') {
|
|
114772
|
+
start_t = ic.ParserUtilsCls.getResi(chainid1, start_t);
|
|
114773
|
+
end_t = ic.ParserUtilsCls.getResi(chainid1, end_t);
|
|
114774
|
+
}
|
|
114777
114775
|
|
|
114778
114776
|
for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
|
|
114779
114777
|
let start1, start2, end1, end2, resiStart1, start1Pos;
|
|
114780
|
-
|
|
114778
|
+
|
|
114781
114779
|
if(bRealign && me.cfg.aligntool == 'tmalign') { // real residue numbers are stored
|
|
114782
114780
|
start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start);
|
|
114783
114781
|
start2 = parseInt(ic.qt_start_end[chainIndex][i].q_start);
|
|
@@ -114810,13 +114808,13 @@ class SetSeqAlign {
|
|
|
114810
114808
|
if(i == 0) {
|
|
114811
114809
|
startPosInTemplate = start1Pos;
|
|
114812
114810
|
|
|
114813
|
-
|
|
114814
|
-
result = this.getTemplatePosFromOriResi(chainid1, start_t, start1Pos, bRealign);
|
|
114811
|
+
result = this.getTemplatePosFromOriResi(chainid1, start_t, start1, bRealign);
|
|
114812
|
+
//result = this.getTemplatePosFromOriResi(chainid1, start_t, start1Pos, bRealign);
|
|
114815
114813
|
pos1 = result.pos1;
|
|
114816
114814
|
pos2 = result.pos2;
|
|
114817
114815
|
|
|
114818
|
-
|
|
114819
|
-
if(start1Pos > start_t) {
|
|
114816
|
+
if(start1 > start_t) {
|
|
114817
|
+
//if(start1Pos > start_t) {
|
|
114820
114818
|
for(let j = 0, jl = pos2 - pos1; j < jl; ++j) {
|
|
114821
114819
|
ic.alnChainsSeq[chainid2].push(gapResObject2);
|
|
114822
114820
|
}
|
|
@@ -114830,6 +114828,9 @@ class SetSeqAlign {
|
|
|
114830
114828
|
let notAlnLen1 = pos2 - (pos1 + 1);
|
|
114831
114829
|
let notAlnLen2 = start2 - (prevIndex2 + 1);
|
|
114832
114830
|
|
|
114831
|
+
notAlnLen1 = (notAlnLen1 < 0) ? 0 : notAlnLen1;
|
|
114832
|
+
notAlnLen2 = (notAlnLen2 < 0) ? 0 : notAlnLen2;
|
|
114833
|
+
|
|
114833
114834
|
// insert non-aligned residues in query seq
|
|
114834
114835
|
this.insertNotAlignRes(chainid2, prevIndex2+1, notAlnLen2, bRealign);
|
|
114835
114836
|
if(notAlnLen1 >= notAlnLen2) {
|
|
@@ -114863,6 +114864,7 @@ class SetSeqAlign {
|
|
|
114863
114864
|
else {
|
|
114864
114865
|
let resi1 = (bRealign && me.cfg.aligntool == 'tmalign') ? start1 + k : ic.ParserUtilsCls.getResi(chainid1, start1 + k);
|
|
114865
114866
|
let resi2 = (bRealign && me.cfg.aligntool == 'tmalign') ? start2 + k : ic.ParserUtilsCls.getResi(chainid2, start2 + k);
|
|
114867
|
+
|
|
114866
114868
|
let resn1 = this.getResnFromResi(chainid1, resi1); //this.getResn(chainid1, start1 + k);
|
|
114867
114869
|
let resn2 = this.getResnFromResi(chainid2, resi2); //this.getResn(chainid2, start2 + k);
|
|
114868
114870
|
|
|
@@ -115656,7 +115658,8 @@ class LoadPDB {
|
|
|
115656
115658
|
// bModifyResi = true;
|
|
115657
115659
|
// }
|
|
115658
115660
|
|
|
115659
|
-
if(bOpm && resn === 'DUM') {
|
|
115661
|
+
// if(bOpm && resn === 'DUM') {
|
|
115662
|
+
if(resn === 'DUM') {
|
|
115660
115663
|
elem = atom;
|
|
115661
115664
|
chain = 'MEM';
|
|
115662
115665
|
resi = 1;
|
|
@@ -120648,6 +120651,7 @@ class DefinedSets {
|
|
|
120648
120651
|
}
|
|
120649
120652
|
}
|
|
120650
120653
|
//}
|
|
120654
|
+
|
|
120651
120655
|
return residuesHash;
|
|
120652
120656
|
}
|
|
120653
120657
|
|
|
@@ -122578,6 +122582,8 @@ class Selection {
|
|
|
122578
122582
|
selectMainChains() { let ic = this.icn3d, me = ic.icn3dui;
|
|
122579
122583
|
let currHAtoms = me.hashUtilsCls.cloneHash(ic.hAtoms);
|
|
122580
122584
|
|
|
122585
|
+
ic.opts.pk = 'atom';
|
|
122586
|
+
|
|
122581
122587
|
ic.hAtoms = ic.applyDisplayCls.selectMainChainSubset(currHAtoms);
|
|
122582
122588
|
|
|
122583
122589
|
ic.hlUpdateCls.showHighlight();
|
|
@@ -122587,6 +122593,8 @@ class Selection {
|
|
|
122587
122593
|
selectSideChains() { let ic = this.icn3d, me = ic.icn3dui;
|
|
122588
122594
|
let currHAtoms = me.hashUtilsCls.cloneHash(ic.hAtoms);
|
|
122589
122595
|
|
|
122596
|
+
ic.opts.pk = 'atom';
|
|
122597
|
+
|
|
122590
122598
|
ic.hAtoms = this.getSideAtoms(currHAtoms);
|
|
122591
122599
|
ic.hlUpdateCls.showHighlight();
|
|
122592
122600
|
}
|
|
@@ -122608,6 +122616,8 @@ class Selection {
|
|
|
122608
122616
|
selectMainSideChains() { let ic = this.icn3d, me = ic.icn3dui;
|
|
122609
122617
|
let residHash = ic.firstAtomObjCls.getResiduesFromAtoms(ic.hAtoms);
|
|
122610
122618
|
|
|
122619
|
+
ic.opts.pk = 'residue';
|
|
122620
|
+
|
|
122611
122621
|
ic.hAtoms = {};
|
|
122612
122622
|
for(let resid in residHash) {
|
|
122613
122623
|
ic.hAtoms = me.hashUtilsCls.unionHash(ic.hAtoms, ic.residues[resid]);
|
|
@@ -122784,8 +122794,9 @@ class Selection {
|
|
|
122784
122794
|
description = name;
|
|
122785
122795
|
}
|
|
122786
122796
|
|
|
122787
|
-
if(Object.keys(ic.selectedResidues).length > 0) {
|
|
122788
|
-
if(ic.pk == 1) {
|
|
122797
|
+
//if(Object.keys(ic.selectedResidues).length > 0) {
|
|
122798
|
+
// if(ic.pk == 1) {
|
|
122799
|
+
if(ic.opts.pk == 'atom') {
|
|
122789
122800
|
let bAtom = true;
|
|
122790
122801
|
this.selectResidueList(ic.hAtoms, name, description, undefined, undefined, bAtom);
|
|
122791
122802
|
//ic.hlUpdateCls.updateHlAll();
|
|
@@ -122812,7 +122823,7 @@ class Selection {
|
|
|
122812
122823
|
me.htmlCls.clickMenuCls.setLogCmd('select ' + ic.resid2specCls.residueids2spec(Object.keys(ic.selectedResidues)), true);
|
|
122813
122824
|
}
|
|
122814
122825
|
}
|
|
122815
|
-
}
|
|
122826
|
+
//}
|
|
122816
122827
|
}
|
|
122817
122828
|
|
|
122818
122829
|
saveSelInCommand() { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -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.
|
|
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;
|