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.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>
|
|
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
|
-
|
|
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 += ' </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
|
|
|
@@ -102051,20 +102053,12 @@ class GetGraph {
|
|
|
102051
102053
|
let thickness = me.htmlCls.coilValue;
|
|
102052
102054
|
let prevChain = '', prevResName = '', prevResi = 0;
|
|
102053
102055
|
// add chemicals as well
|
|
102054
|
-
let residHash =
|
|
102055
|
-
for(let
|
|
102056
|
-
let atom = ic.
|
|
102056
|
+
let residHash = ic.firstAtomObjCls.getResiduesFromAtoms(atomSet);
|
|
102057
|
+
for(let resid in residHash) {
|
|
102058
|
+
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
102057
102059
|
|
|
102058
|
-
if(atom.chain != 'DUM' && (bAnyAtom || atom.het || (atom.name == "CA" && atom.elem == "C") || atom.name == "O3'" || atom.name == "O3*" || atom.name == "P")) {
|
|
102059
|
-
|
|
102060
|
-
//if(atom.chain != 'DUM' &&(atom.name == "CA" || atom.name == "P")) {
|
|
102061
|
-
let resid = atom.structure + '_' + atom.chain + '_' + atom.resi;
|
|
102062
|
-
if(residHash.hasOwnProperty(resid)) {
|
|
102063
|
-
continue;
|
|
102064
|
-
}
|
|
102065
|
-
else {
|
|
102066
|
-
residHash[resid] = 1;
|
|
102067
|
-
}
|
|
102060
|
+
//if(atom.chain != 'DUM' && (bAnyAtom || atom.het || (atom.name == "CA" && atom.elem == "C") || atom.name == "O3'" || atom.name == "O3*" || atom.name == "P")) {
|
|
102061
|
+
if(atom.chain != 'DUM') {
|
|
102068
102062
|
let resName = me.utilsCls.residueName2Abbr(atom.resn) + atom.resi;
|
|
102069
102063
|
if(labelType == 'chain' || labelType == 'structure') resName += '.' + atom.chain;
|
|
102070
102064
|
if(labelType == 'structure') resName += '.' + atom.structure;
|
|
@@ -104504,10 +104498,6 @@ class AlignParser {
|
|
|
104504
104498
|
//var ids_str =(alignArray.length === 2? 'uids=' : 'ids=') + align;
|
|
104505
104499
|
let ids_str = 'ids=' + align;
|
|
104506
104500
|
|
|
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
104501
|
// combined url1 and url2
|
|
104512
104502
|
let url2 = me.htmlCls.baseUrl + 'vastplus/vastplus.cgi?v=3&cmd=c&b=1&s=1&w3d&' + ids_str;
|
|
104513
104503
|
|
|
@@ -115547,7 +115537,8 @@ class SetSeqAlign {
|
|
|
115547
115537
|
if(ic.alnChainsSeq[chainid1]) {
|
|
115548
115538
|
for(let j = 0, jl = ic.alnChainsSeq[chainid1].length; j < jl; ++j) {
|
|
115549
115539
|
//add gap before the mapping region
|
|
115550
|
-
if(parseInt(ic.alnChainsSeq[chainid1][j].resi) == parseInt(resi_t)) {
|
|
115540
|
+
//if(parseInt(ic.alnChainsSeq[chainid1][j].resi) == parseInt(resi_t)) {
|
|
115541
|
+
if(ic.alnChainsSeq[chainid1][j].resi == resi_t) {
|
|
115551
115542
|
pos_t = j;
|
|
115552
115543
|
break;
|
|
115553
115544
|
}
|
|
@@ -115675,10 +115666,17 @@ class SetSeqAlign {
|
|
|
115675
115666
|
|
|
115676
115667
|
let nGapInTemplate = 0; // number of gaps inserted into the template sequence
|
|
115677
115668
|
let startPosInTemplate = 0; // position in the template sequence to start the mapping
|
|
115669
|
+
|
|
115670
|
+
// need to improve when tmalign with residue number with postfix such as 52A in 4ORZ_C,5ESV_H
|
|
115671
|
+
// start and end should be positions, not original residue numbers.
|
|
115672
|
+
if(bRealign && me.cfg.aligntool == 'tmalign') {
|
|
115673
|
+
start_t = ic.ParserUtilsCls.getResi(chainid1, start_t);
|
|
115674
|
+
end_t = ic.ParserUtilsCls.getResi(chainid1, end_t);
|
|
115675
|
+
}
|
|
115678
115676
|
|
|
115679
115677
|
for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
|
|
115680
115678
|
let start1, start2, end1, end2, resiStart1, start1Pos;
|
|
115681
|
-
|
|
115679
|
+
|
|
115682
115680
|
if(bRealign && me.cfg.aligntool == 'tmalign') { // real residue numbers are stored
|
|
115683
115681
|
start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start);
|
|
115684
115682
|
start2 = parseInt(ic.qt_start_end[chainIndex][i].q_start);
|
|
@@ -115711,13 +115709,13 @@ class SetSeqAlign {
|
|
|
115711
115709
|
if(i == 0) {
|
|
115712
115710
|
startPosInTemplate = start1Pos;
|
|
115713
115711
|
|
|
115714
|
-
|
|
115715
|
-
result = this.getTemplatePosFromOriResi(chainid1, start_t, start1Pos, bRealign);
|
|
115712
|
+
result = this.getTemplatePosFromOriResi(chainid1, start_t, start1, bRealign);
|
|
115713
|
+
//result = this.getTemplatePosFromOriResi(chainid1, start_t, start1Pos, bRealign);
|
|
115716
115714
|
pos1 = result.pos1;
|
|
115717
115715
|
pos2 = result.pos2;
|
|
115718
115716
|
|
|
115719
|
-
|
|
115720
|
-
if(start1Pos > start_t) {
|
|
115717
|
+
if(start1 > start_t) {
|
|
115718
|
+
//if(start1Pos > start_t) {
|
|
115721
115719
|
for(let j = 0, jl = pos2 - pos1; j < jl; ++j) {
|
|
115722
115720
|
ic.alnChainsSeq[chainid2].push(gapResObject2);
|
|
115723
115721
|
}
|
|
@@ -115731,6 +115729,9 @@ class SetSeqAlign {
|
|
|
115731
115729
|
let notAlnLen1 = pos2 - (pos1 + 1);
|
|
115732
115730
|
let notAlnLen2 = start2 - (prevIndex2 + 1);
|
|
115733
115731
|
|
|
115732
|
+
notAlnLen1 = (notAlnLen1 < 0) ? 0 : notAlnLen1;
|
|
115733
|
+
notAlnLen2 = (notAlnLen2 < 0) ? 0 : notAlnLen2;
|
|
115734
|
+
|
|
115734
115735
|
// insert non-aligned residues in query seq
|
|
115735
115736
|
this.insertNotAlignRes(chainid2, prevIndex2+1, notAlnLen2, bRealign);
|
|
115736
115737
|
if(notAlnLen1 >= notAlnLen2) {
|
|
@@ -115764,6 +115765,7 @@ class SetSeqAlign {
|
|
|
115764
115765
|
else {
|
|
115765
115766
|
let resi1 = (bRealign && me.cfg.aligntool == 'tmalign') ? start1 + k : ic.ParserUtilsCls.getResi(chainid1, start1 + k);
|
|
115766
115767
|
let resi2 = (bRealign && me.cfg.aligntool == 'tmalign') ? start2 + k : ic.ParserUtilsCls.getResi(chainid2, start2 + k);
|
|
115768
|
+
|
|
115767
115769
|
let resn1 = this.getResnFromResi(chainid1, resi1); //this.getResn(chainid1, start1 + k);
|
|
115768
115770
|
let resn2 = this.getResnFromResi(chainid2, resi2); //this.getResn(chainid2, start2 + k);
|
|
115769
115771
|
|
|
@@ -116557,7 +116559,8 @@ class LoadPDB {
|
|
|
116557
116559
|
// bModifyResi = true;
|
|
116558
116560
|
// }
|
|
116559
116561
|
|
|
116560
|
-
if(bOpm && resn === 'DUM') {
|
|
116562
|
+
// if(bOpm && resn === 'DUM') {
|
|
116563
|
+
if(resn === 'DUM') {
|
|
116561
116564
|
elem = atom;
|
|
116562
116565
|
chain = 'MEM';
|
|
116563
116566
|
resi = 1;
|
|
@@ -121549,6 +121552,7 @@ class DefinedSets {
|
|
|
121549
121552
|
}
|
|
121550
121553
|
}
|
|
121551
121554
|
//}
|
|
121555
|
+
|
|
121552
121556
|
return residuesHash;
|
|
121553
121557
|
}
|
|
121554
121558
|
|
|
@@ -123479,6 +123483,8 @@ class Selection {
|
|
|
123479
123483
|
selectMainChains() { let ic = this.icn3d, me = ic.icn3dui;
|
|
123480
123484
|
let currHAtoms = me.hashUtilsCls.cloneHash(ic.hAtoms);
|
|
123481
123485
|
|
|
123486
|
+
ic.opts.pk = 'atom';
|
|
123487
|
+
|
|
123482
123488
|
ic.hAtoms = ic.applyDisplayCls.selectMainChainSubset(currHAtoms);
|
|
123483
123489
|
|
|
123484
123490
|
ic.hlUpdateCls.showHighlight();
|
|
@@ -123488,6 +123494,8 @@ class Selection {
|
|
|
123488
123494
|
selectSideChains() { let ic = this.icn3d, me = ic.icn3dui;
|
|
123489
123495
|
let currHAtoms = me.hashUtilsCls.cloneHash(ic.hAtoms);
|
|
123490
123496
|
|
|
123497
|
+
ic.opts.pk = 'atom';
|
|
123498
|
+
|
|
123491
123499
|
ic.hAtoms = this.getSideAtoms(currHAtoms);
|
|
123492
123500
|
ic.hlUpdateCls.showHighlight();
|
|
123493
123501
|
}
|
|
@@ -123509,6 +123517,8 @@ class Selection {
|
|
|
123509
123517
|
selectMainSideChains() { let ic = this.icn3d, me = ic.icn3dui;
|
|
123510
123518
|
let residHash = ic.firstAtomObjCls.getResiduesFromAtoms(ic.hAtoms);
|
|
123511
123519
|
|
|
123520
|
+
ic.opts.pk = 'residue';
|
|
123521
|
+
|
|
123512
123522
|
ic.hAtoms = {};
|
|
123513
123523
|
for(let resid in residHash) {
|
|
123514
123524
|
ic.hAtoms = me.hashUtilsCls.unionHash(ic.hAtoms, ic.residues[resid]);
|
|
@@ -123685,8 +123695,9 @@ class Selection {
|
|
|
123685
123695
|
description = name;
|
|
123686
123696
|
}
|
|
123687
123697
|
|
|
123688
|
-
if(Object.keys(ic.selectedResidues).length > 0) {
|
|
123689
|
-
if(ic.pk == 1) {
|
|
123698
|
+
//if(Object.keys(ic.selectedResidues).length > 0) {
|
|
123699
|
+
// if(ic.pk == 1) {
|
|
123700
|
+
if(ic.opts.pk == 'atom') {
|
|
123690
123701
|
let bAtom = true;
|
|
123691
123702
|
this.selectResidueList(ic.hAtoms, name, description, undefined, undefined, bAtom);
|
|
123692
123703
|
//ic.hlUpdateCls.updateHlAll();
|
|
@@ -123713,7 +123724,7 @@ class Selection {
|
|
|
123713
123724
|
me.htmlCls.clickMenuCls.setLogCmd('select ' + ic.resid2specCls.residueids2spec(Object.keys(ic.selectedResidues)), true);
|
|
123714
123725
|
}
|
|
123715
123726
|
}
|
|
123716
|
-
}
|
|
123727
|
+
//}
|
|
123717
123728
|
}
|
|
123718
123729
|
|
|
123719
123730
|
saveSelInCommand() { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -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.
|
|
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;
|