icn3d 3.40.5 → 3.41.0
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 +224 -112
- package/icn3d.min.js +3 -3
- package/icn3d.module.js +224 -112
- package/package.json +1 -1
package/icn3d.module.js
CHANGED
|
@@ -9728,9 +9728,9 @@ class ClickMenu {
|
|
|
9728
9728
|
}
|
|
9729
9729
|
|
|
9730
9730
|
getHiddenMenusFromCache() { let me = this.icn3dui; me.icn3d;
|
|
9731
|
-
|
|
9731
|
+
me.htmlCls.shownMenus = {};
|
|
9732
9732
|
|
|
9733
|
-
|
|
9733
|
+
let mode = me.htmlCls.setHtmlCls.getCookie('menumode');
|
|
9734
9734
|
|
|
9735
9735
|
let idArrayStr = (localStorage) ? localStorage.getItem('hiddenmenus') : '';
|
|
9736
9736
|
|
|
@@ -9739,31 +9739,23 @@ class ClickMenu {
|
|
|
9739
9739
|
|
|
9740
9740
|
let idArray = JSON.parse(idArrayStr);
|
|
9741
9741
|
|
|
9742
|
-
// for(let i = 0, il = idArray.length; i < il; ++i) {
|
|
9743
|
-
// me.htmlCls.shownMenus[idArray[i]] = 1;
|
|
9744
|
-
// }
|
|
9745
9742
|
for(let menu in me.htmlCls.allMenus) {
|
|
9746
9743
|
if(idArray.indexOf(menu) == -1) {
|
|
9747
9744
|
me.htmlCls.shownMenus[menu] = 1;
|
|
9748
9745
|
}
|
|
9749
9746
|
}
|
|
9750
9747
|
}
|
|
9751
|
-
//###
|
|
9752
9748
|
else {
|
|
9753
|
-
|
|
9749
|
+
if(mode == 'all') {
|
|
9750
|
+
me.htmlCls.shownMenus = me.hashUtilsCls.cloneHash(me.htmlCls.allMenus);
|
|
9751
|
+
}
|
|
9752
|
+
else if(!mode || mode == 'simple') {
|
|
9753
|
+
me.htmlCls.shownMenus = me.hashUtilsCls.cloneHash(me.htmlCls.simpleMenus);
|
|
9754
|
+
}
|
|
9755
|
+
else {
|
|
9756
|
+
me.htmlCls.shownMenus = me.hashUtilsCls.cloneHash(me.htmlCls.simpleMenus);
|
|
9757
|
+
}
|
|
9754
9758
|
}
|
|
9755
|
-
|
|
9756
|
-
// else {
|
|
9757
|
-
// if(mode == 'all') {
|
|
9758
|
-
// me.htmlCls.shownMenus = me.hashUtilsCls.cloneHash(me.htmlCls.allMenus);
|
|
9759
|
-
// }
|
|
9760
|
-
// else if(!mode || mode == 'simple') {
|
|
9761
|
-
// me.htmlCls.shownMenus = me.hashUtilsCls.cloneHash(me.htmlCls.simpleMenus);
|
|
9762
|
-
// }
|
|
9763
|
-
// else {
|
|
9764
|
-
// me.htmlCls.shownMenus = me.hashUtilsCls.cloneHash(me.htmlCls.simpleMenus);
|
|
9765
|
-
// }
|
|
9766
|
-
// }
|
|
9767
9759
|
}
|
|
9768
9760
|
|
|
9769
9761
|
displayShownMenus() { let me = this.icn3dui; me.icn3d;
|
|
@@ -12242,7 +12234,7 @@ class SetMenu {
|
|
|
12242
12234
|
|
|
12243
12235
|
let tdStr = '<td valign="top">';
|
|
12244
12236
|
|
|
12245
|
-
|
|
12237
|
+
html += tdStr + this.setMenuMode() + '</td>';
|
|
12246
12238
|
|
|
12247
12239
|
html += tdStr + this.setMenu1() + '</td>';
|
|
12248
12240
|
|
|
@@ -12253,12 +12245,11 @@ class SetMenu {
|
|
|
12253
12245
|
html += tdStr + this.setMenu4() + '</td>';
|
|
12254
12246
|
|
|
12255
12247
|
html += tdStr + this.setMenu5() + '</td>';
|
|
12256
|
-
//html += tdStr + this.setMenu5b() + '</td>';
|
|
12257
12248
|
html += tdStr + this.setMenu6() + '</td>';
|
|
12258
12249
|
|
|
12259
12250
|
// reset the menus at the end of the menus
|
|
12260
|
-
|
|
12261
|
-
|
|
12251
|
+
let mode = me.htmlCls.setHtmlCls.getCookie('menumode');
|
|
12252
|
+
this.resetMenu(mode);
|
|
12262
12253
|
|
|
12263
12254
|
// me.htmlCls.shownMenus = me.hashUtilsCls.cloneHash(me.htmlCls.simpleMenus);
|
|
12264
12255
|
|
|
@@ -12366,7 +12357,7 @@ class SetMenu {
|
|
|
12366
12357
|
}
|
|
12367
12358
|
html += "<div>";
|
|
12368
12359
|
|
|
12369
|
-
|
|
12360
|
+
html += '<li>' + this.setMenuMode(true);
|
|
12370
12361
|
|
|
12371
12362
|
let liStr = "<li><span class='icn3d-menu-color'";
|
|
12372
12363
|
|
|
@@ -12387,8 +12378,8 @@ class SetMenu {
|
|
|
12387
12378
|
html += this.setMenu6_base();
|
|
12388
12379
|
|
|
12389
12380
|
// reset the menus at the end of the menus
|
|
12390
|
-
|
|
12391
|
-
|
|
12381
|
+
let mode = me.htmlCls.setHtmlCls.getCookie('menumode');
|
|
12382
|
+
this.resetMenu(mode);
|
|
12392
12383
|
|
|
12393
12384
|
// me.htmlCls.shownMenus = me.hashUtilsCls.cloneHash(me.htmlCls.simpleMenus);
|
|
12394
12385
|
|
|
@@ -12478,7 +12469,7 @@ class SetMenu {
|
|
|
12478
12469
|
|
|
12479
12470
|
html += me.htmlCls.divStr + "selection' style='display:none;'><div style='position:absolute; z-index:555; float:left; display:table-row; margin: 32px 0px 0px 0px;'>";
|
|
12480
12471
|
//html += "<table style='margin-top: 3px; width:100px;'>";
|
|
12481
|
-
html += "<table style='margin
|
|
12472
|
+
html += "<table style='margin: 3px 0px 0px 76px; width:770px; background-color:#EEE;'>";
|
|
12482
12473
|
|
|
12483
12474
|
html += this.setTools_base();
|
|
12484
12475
|
|
|
@@ -12794,9 +12785,9 @@ class SetMenu {
|
|
|
12794
12785
|
html += "</ul>";
|
|
12795
12786
|
html += "</li>";
|
|
12796
12787
|
|
|
12797
|
-
html += this.getMenuText('mn1_aligntwostru', 'Protein Complexes', undefined,
|
|
12788
|
+
html += this.getMenuText('mn1_aligntwostru', 'Protein Complexes', undefined, 1, 2);
|
|
12798
12789
|
html += "<ul>";
|
|
12799
|
-
html += this.getLink('mn1_align', 'Two PDB Structures ' + me.htmlCls.wifiStr,
|
|
12790
|
+
html += this.getLink('mn1_align', 'Two PDB Structures ' + me.htmlCls.wifiStr, 1, 3);
|
|
12800
12791
|
html += this.getLink('mn1_alignaf', 'Two AlphaFold Structures ' + me.htmlCls.wifiStr, undefined, 3);
|
|
12801
12792
|
html += "</ul>";
|
|
12802
12793
|
|
|
@@ -12850,8 +12841,8 @@ class SetMenu {
|
|
|
12850
12841
|
html += "<ul>";
|
|
12851
12842
|
html += this.getMenuText('mn1_savepngimage', 'iCn3D PNG Image', undefined, 1, 2);
|
|
12852
12843
|
html += "<ul>";
|
|
12853
|
-
html += this.getLink('mn1_exportCanvas', 'Original Size & HTML',
|
|
12854
|
-
html += this.getLink('mn1_exportCanvas1', 'Original Size',
|
|
12844
|
+
html += this.getLink('mn1_exportCanvas', 'Original Size & HTML', undefined, 3);
|
|
12845
|
+
html += this.getLink('mn1_exportCanvas1', 'Original Size', 1, 3);
|
|
12855
12846
|
|
|
12856
12847
|
html += this.getLink('mn1_exportCanvas2', '2X Large', undefined, 3);
|
|
12857
12848
|
html += this.getLink('mn1_exportCanvas4', '4X Large', undefined, 3);
|
|
@@ -12938,7 +12929,7 @@ class SetMenu {
|
|
|
12938
12929
|
html += "<ul class='icn3d-mn-item'>";
|
|
12939
12930
|
|
|
12940
12931
|
html += this.getLink('mn2_definedsets', 'Defined Sets', 1, 1);
|
|
12941
|
-
html += this.getLink('mn2_selectall', 'All',
|
|
12932
|
+
html += this.getLink('mn2_selectall', 'All', 1, 1);
|
|
12942
12933
|
html += this.getLink('mn2_selectdisplayed', 'Displayed Set', undefined, 1);
|
|
12943
12934
|
html += this.getLink('mn2_aroundsphere', 'by Distance', 1, 1);
|
|
12944
12935
|
|
|
@@ -12954,10 +12945,10 @@ class SetMenu {
|
|
|
12954
12945
|
html += "</li>";
|
|
12955
12946
|
|
|
12956
12947
|
html += this.getLink('mn2_selectcomplement', 'Inverse', undefined, 1);
|
|
12957
|
-
html += this.getLink('mn2_selectmainchains', 'Main Chains',
|
|
12958
|
-
html += this.getLink('mn2_selectsidechains', 'Side Chains',
|
|
12948
|
+
html += this.getLink('mn2_selectmainchains', 'Main Chains', 1, 1);
|
|
12949
|
+
html += this.getLink('mn2_selectsidechains', 'Side Chains', 1, 1);
|
|
12959
12950
|
html += this.getLink('mn2_selectmainsidechains', 'Main & Side Chains', undefined, 1);
|
|
12960
|
-
html += this.getLink('mn2_command', 'Advanced',
|
|
12951
|
+
html += this.getLink('mn2_command', 'Advanced', 1, 1);
|
|
12961
12952
|
|
|
12962
12953
|
if(me.cfg.cid === undefined) {
|
|
12963
12954
|
html += this.getMenuText('mn2_selon3d', 'Select on 3D', undefined, 1, 1);
|
|
@@ -12990,7 +12981,7 @@ class SetMenu {
|
|
|
12990
12981
|
html += this.getMenuSep();
|
|
12991
12982
|
|
|
12992
12983
|
html += this.getLink('mn2_saveselection', 'Save Selection', 1, 1);
|
|
12993
|
-
html += this.getLink('clearall', 'Clear Selection',
|
|
12984
|
+
html += this.getLink('clearall', 'Clear Selection', 1, 1);
|
|
12994
12985
|
html += this.getLink('mn2_saveresidue', 'Save Res. in Sel.', 1, 1);
|
|
12995
12986
|
|
|
12996
12987
|
html += this.getMenuSep();
|
|
@@ -13055,7 +13046,7 @@ class SetMenu {
|
|
|
13055
13046
|
html += this.getLinkWrapper('mn2_alternate', 'Alternate(Key "a")', 'mn2_alternateWrap', undefined, 1);
|
|
13056
13047
|
|
|
13057
13048
|
if(me.cfg.opmid !== undefined) {
|
|
13058
|
-
html += this.getLinkWrapper('togglemem', 'Toggle Membrane', 'togglememli',
|
|
13049
|
+
html += this.getLinkWrapper('togglemem', 'Toggle Membrane', 'togglememli', 1, 1);
|
|
13059
13050
|
}
|
|
13060
13051
|
//else if(me.cfg.mmdbafid !== undefined || me.cfg.afid !== undefined) {
|
|
13061
13052
|
else if(me.cfg.cid === undefined) {
|
|
@@ -13070,14 +13061,14 @@ class SetMenu {
|
|
|
13070
13061
|
|
|
13071
13062
|
html += this.getMenuSep();
|
|
13072
13063
|
|
|
13073
|
-
html += this.getMenuText('mn2_vrarhints', 'VR & AR Hints', undefined,
|
|
13064
|
+
html += this.getMenuText('mn2_vrarhints', 'VR & AR Hints', undefined, undefined, 1);
|
|
13074
13065
|
html += "<ul>";
|
|
13075
|
-
html += this.getMenuUrl("vrhint", me.htmlCls.baseUrl + "icn3d/icn3d.html#vr", "VR: VR Headsets",
|
|
13076
|
-
html += this.getMenuUrl("arhint", me.htmlCls.baseUrl + "icn3d/icn3d.html#ar", "AR: Chrome in Android",
|
|
13066
|
+
html += this.getMenuUrl("vrhint", me.htmlCls.baseUrl + "icn3d/icn3d.html#vr", "VR: VR Headsets", undefined, 2);
|
|
13067
|
+
html += this.getMenuUrl("arhint", me.htmlCls.baseUrl + "icn3d/icn3d.html#ar", "AR: Chrome in Android", undefined, 2);
|
|
13077
13068
|
html += "</ul>";
|
|
13078
13069
|
html += "</li>";
|
|
13079
13070
|
|
|
13080
|
-
html += this.getLink('mn6_sidebyside', 'Side by Side',
|
|
13071
|
+
html += this.getLink('mn6_sidebyside', 'Side by Side', undefined, 1);
|
|
13081
13072
|
|
|
13082
13073
|
html += this.getMenuText('mn2_rotate', 'Rotate', undefined, 1, 1);
|
|
13083
13074
|
html += "<ul>";
|
|
@@ -13189,7 +13180,7 @@ class SetMenu {
|
|
|
13189
13180
|
html += this.getRadio('mn3_proteins', 'mn3_proteinsRibbon', 'Ribbon', true, 1, 2);
|
|
13190
13181
|
}
|
|
13191
13182
|
|
|
13192
|
-
html += this.getRadio('mn3_proteins', 'mn3_proteinsStrand', 'Strand', undefined,
|
|
13183
|
+
html += this.getRadio('mn3_proteins', 'mn3_proteinsStrand', 'Strand', undefined, 1, 2);
|
|
13193
13184
|
html += this.getRadio('mn3_proteins', 'mn3_proteinsCylinder', 'Cylinder and Plate', undefined, undefined, 2);
|
|
13194
13185
|
html += this.getRadio('mn3_proteins', 'mn3_proteinsSchematic', 'Schematic', undefined, 1, 2);
|
|
13195
13186
|
|
|
@@ -13201,7 +13192,7 @@ class SetMenu {
|
|
|
13201
13192
|
}
|
|
13202
13193
|
|
|
13203
13194
|
html += this.getRadio('mn3_proteins', 'mn3_proteinsBackbone', 'Backbone', undefined, undefined, 2);
|
|
13204
|
-
html += this.getRadio('mn3_proteins', 'mn3_proteinsBfactor', 'B-factor Tube', undefined,
|
|
13195
|
+
html += this.getRadio('mn3_proteins', 'mn3_proteinsBfactor', 'B-factor Tube', undefined, undefined, 2);
|
|
13205
13196
|
html += this.getRadio('mn3_proteins', 'mn3_proteinsLines', 'Lines', undefined, 1, 2);
|
|
13206
13197
|
html += this.getRadio('mn3_proteins', 'mn3_proteinsStick', 'Stick', undefined, 1, 2);
|
|
13207
13198
|
html += this.getRadio('mn3_proteins', 'mn3_proteinsBallstick', 'Ball and Stick', undefined, 1, 2);
|
|
@@ -13265,10 +13256,10 @@ class SetMenu {
|
|
|
13265
13256
|
html += "</li>";
|
|
13266
13257
|
|
|
13267
13258
|
//if(me.cfg.cid !== undefined) {
|
|
13268
|
-
html += this.getMenuText('mn3_hydrogenswrap', 'Hydrogens', undefined,
|
|
13259
|
+
html += this.getMenuText('mn3_hydrogenswrap', 'Hydrogens', undefined, undefined, 1);
|
|
13269
13260
|
html += "<ul>";
|
|
13270
|
-
html += this.getRadio('mn3_hydrogens', 'mn3_hydrogensYes', 'Show', true,
|
|
13271
|
-
html += this.getRadio('mn3_hydrogens', 'mn3_hydrogensNo', 'Hide', undefined,
|
|
13261
|
+
html += this.getRadio('mn3_hydrogens', 'mn3_hydrogensYes', 'Show', true, undefined, 2);
|
|
13262
|
+
html += this.getRadio('mn3_hydrogens', 'mn3_hydrogensNo', 'Hide', undefined, undefined, 2);
|
|
13272
13263
|
html += "</ul>";
|
|
13273
13264
|
html += "</li>";
|
|
13274
13265
|
//}
|
|
@@ -13643,7 +13634,7 @@ class SetMenu {
|
|
|
13643
13634
|
|
|
13644
13635
|
html += "</ul>";
|
|
13645
13636
|
|
|
13646
|
-
html += this.getRadio('mn4_clr', 'mn4_clrCustom', 'Color Picker', undefined,
|
|
13637
|
+
html += this.getRadio('mn4_clr', 'mn4_clrCustom', 'Color Picker', undefined, 1, 1);
|
|
13647
13638
|
html += this.getMenuSep();
|
|
13648
13639
|
|
|
13649
13640
|
if(me.cfg.cid === undefined) {
|
|
@@ -13684,7 +13675,7 @@ class SetMenu {
|
|
|
13684
13675
|
html += this.getRadio('mn4_clr', 'mn4_clrBfactorNorm', 'Percentile', undefined, 1, 2);
|
|
13685
13676
|
html += "</ul>";
|
|
13686
13677
|
|
|
13687
|
-
html += this.getRadio('mn4_clr', 'mn4_clrArea', 'Solvent<br><span style="padding-left:1.5em;">Accessibility</span>', undefined,
|
|
13678
|
+
html += this.getRadio('mn4_clr', 'mn4_clrArea', 'Solvent<br><span style="padding-left:1.5em;">Accessibility</span>', undefined, 1, 1);
|
|
13688
13679
|
|
|
13689
13680
|
html += this.getRadio('mn4_clr', 'mn4_clrStructure', 'Structure', undefined, 1, 1);
|
|
13690
13681
|
|
|
@@ -13696,7 +13687,7 @@ class SetMenu {
|
|
|
13696
13687
|
}
|
|
13697
13688
|
|
|
13698
13689
|
//if(me.cfg.mmdbid !== undefined || me.cfg.gi !== undefined) {
|
|
13699
|
-
html += this.getRadio('mn4_clr', 'mn4_clrdomain', '3D Domain', undefined,
|
|
13690
|
+
html += this.getRadio('mn4_clr', 'mn4_clrdomain', '3D Domain', undefined, 1, 1);
|
|
13700
13691
|
//}
|
|
13701
13692
|
|
|
13702
13693
|
if(me.cfg.cid === undefined) {
|
|
@@ -13716,16 +13707,16 @@ class SetMenu {
|
|
|
13716
13707
|
html += this.getRadio('mn4_clr', 'mn4_clrAtom', 'Atom', undefined, 1, 1);
|
|
13717
13708
|
|
|
13718
13709
|
if(me.cfg.align !== undefined || me.cfg.chainalign !== undefined) {
|
|
13719
|
-
html += this.getRadio('mn4_clr', 'mn4_clrIdentity', 'Identity', true, undefined,
|
|
13720
|
-
html += this.getRadio('mn4_clr', 'mn4_clrConserved', 'Conservation', undefined, undefined,
|
|
13710
|
+
html += this.getRadio('mn4_clr', 'mn4_clrIdentity', 'Identity', true, undefined, 1);
|
|
13711
|
+
html += this.getRadio('mn4_clr', 'mn4_clrConserved', 'Conservation', undefined, undefined, 1);
|
|
13721
13712
|
}
|
|
13722
13713
|
else if(me.cfg.blast_rep_id !== undefined) {
|
|
13723
|
-
html += this.getRadio('mn4_clr', 'mn4_clrIdentity', 'Identity', undefined, undefined,
|
|
13724
|
-
html += this.getRadio('mn4_clr', 'mn4_clrConserved', 'Conservation', true, undefined,
|
|
13714
|
+
html += this.getRadio('mn4_clr', 'mn4_clrIdentity', 'Identity', undefined, undefined, 1);
|
|
13715
|
+
html += this.getRadio('mn4_clr', 'mn4_clrConserved', 'Conservation', true, undefined, 1);
|
|
13725
13716
|
}
|
|
13726
13717
|
else {
|
|
13727
|
-
html += this.getRadio('mn4_clr', 'mn4_clrIdentity', 'Identity', undefined, undefined,
|
|
13728
|
-
html += this.getRadio('mn4_clr', 'mn4_clrConserved', 'Conservation', undefined, undefined,
|
|
13718
|
+
html += this.getRadio('mn4_clr', 'mn4_clrIdentity', 'Identity', undefined, undefined, 1);
|
|
13719
|
+
html += this.getRadio('mn4_clr', 'mn4_clrConserved', 'Conservation', undefined, undefined, 1);
|
|
13729
13720
|
}
|
|
13730
13721
|
|
|
13731
13722
|
//if(me.cfg.afid) html += this.getRadio('mn4_clr', 'mn4_clrConfidence', 'AF Confidence');
|
|
@@ -13733,8 +13724,8 @@ class SetMenu {
|
|
|
13733
13724
|
html += this.getRadio('mn4_clr', 'mn4_clrConfidence', 'pLDDT', undefined, 1, 1);
|
|
13734
13725
|
//}
|
|
13735
13726
|
|
|
13736
|
-
html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined,
|
|
13737
|
-
html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined,
|
|
13727
|
+
html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 1);
|
|
13728
|
+
html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 1);
|
|
13738
13729
|
}
|
|
13739
13730
|
else {
|
|
13740
13731
|
//if(!me.cfg.hidelicense) html += this.getRadio('mn4_clr', 'mn1_delphi2', 'DelPhi<br><span style="padding-left:1.5em;">Potential ' + me.htmlCls.licenseStr + '</span>');
|
|
@@ -13787,7 +13778,7 @@ class SetMenu {
|
|
|
13787
13778
|
html += this.getLink('mn6_selectannotations', 'Seq. & Annotations ' + me.htmlCls.wifiStr, 1, 1);
|
|
13788
13779
|
|
|
13789
13780
|
//if(me.cfg.align !== undefined || me.cfg.chainalign !== undefined) { // || ic.bRealign || ic.bSymd || ic.bInputfile) {
|
|
13790
|
-
html += this.getLink('mn2_alignment', 'Aligned Seq. ' + me.htmlCls.wifiStr,
|
|
13781
|
+
html += this.getLink('mn2_alignment', 'Aligned Seq. ' + me.htmlCls.wifiStr, 1, 1);
|
|
13791
13782
|
//}
|
|
13792
13783
|
|
|
13793
13784
|
if(me.cfg.mmdbid !== undefined || me.cfg.gi !== undefined || me.cfg.blast_rep_id !== undefined || me.cfg.align !== undefined || me.cfg.chainalign !== undefined) {
|
|
@@ -13857,27 +13848,27 @@ class SetMenu {
|
|
|
13857
13848
|
html += "</ul>";
|
|
13858
13849
|
html += "</li>";
|
|
13859
13850
|
|
|
13860
|
-
html += this.getMenuText('mn6_anglewrap', 'Angle', undefined,
|
|
13851
|
+
html += this.getMenuText('mn6_anglewrap', 'Angle', undefined, undefined, 1);
|
|
13861
13852
|
html += "<ul>";
|
|
13862
|
-
html += this.getRadio('mn6_angle', 'mn6_angleManySets', 'among Many Sets', undefined,
|
|
13853
|
+
html += this.getRadio('mn6_angle', 'mn6_angleManySets', 'among Many Sets', undefined, undefined, 2);
|
|
13863
13854
|
html += this.getRadio('mn6_angle', 'mn6_angleTwoSets', 'b/w Two Vectors', undefined, undefined, 2);
|
|
13864
13855
|
html += "</ul>";
|
|
13865
13856
|
html += "</li>";
|
|
13866
13857
|
|
|
13867
|
-
html += this.getLink('mn6_area', 'Surface Area',
|
|
13858
|
+
html += this.getLink('mn6_area', 'Surface Area', undefined, 1);
|
|
13868
13859
|
|
|
13869
13860
|
html += this.getMenuText('mn6_addlabelwrap', 'Label', undefined, 1, 1);
|
|
13870
13861
|
html += "<ul>";
|
|
13871
13862
|
html += this.getRadio('mn6_addlabel', 'mn6_addlabelYes', 'by Picking Atoms', undefined, undefined, 2);
|
|
13872
13863
|
html += this.getRadio('mn6_addlabel', 'mn6_addlabelSelection', 'per Selection', undefined, undefined, 2);
|
|
13873
13864
|
html += this.getRadio('mn6_addlabel', 'mn6_addlabelAtoms', 'per Atom', undefined, undefined, 2);
|
|
13874
|
-
html += this.getRadio('mn6_addlabel', 'mn6_addlabelElements', 'per Atom Element', undefined,
|
|
13865
|
+
html += this.getRadio('mn6_addlabel', 'mn6_addlabelElements', 'per Atom Element', undefined, undefined, 2);
|
|
13875
13866
|
if(me.cfg.cid === undefined) {
|
|
13876
13867
|
html += this.getRadio('mn6_addlabel', 'mn6_addlabelResidues', 'per Residue', undefined, 1, 2);
|
|
13877
13868
|
html += this.getRadio('mn6_addlabel', 'mn6_addlabelResnum', 'per Residue & Number', undefined, 1, 2);
|
|
13878
13869
|
|
|
13879
|
-
html += this.getRadio('mn6_addlabel', 'mn6_addlabelRefnum', 'per Reference Number', undefined,
|
|
13880
|
-
html += this.getRadio('mn6_addlabel', 'mn6_addlabelIg', 'per Ig Domain', undefined,
|
|
13870
|
+
html += this.getRadio('mn6_addlabel', 'mn6_addlabelRefnum', 'per Reference Number', undefined, undefined, 2);
|
|
13871
|
+
html += this.getRadio('mn6_addlabel', 'mn6_addlabelIg', 'per Ig Domain', undefined, undefined, 2);
|
|
13881
13872
|
|
|
13882
13873
|
html += this.getRadio('mn6_addlabel', 'mn6_addlabelChains', 'per Chain', undefined, undefined, 2);
|
|
13883
13874
|
html += this.getRadio('mn6_addlabel', 'mn6_addlabelTermini', 'N- & C-Termini', undefined, 1, 2);
|
|
@@ -13914,10 +13905,10 @@ class SetMenu {
|
|
|
13914
13905
|
html += this.getMenuSep();
|
|
13915
13906
|
|
|
13916
13907
|
if(me.cfg.cid === undefined) {
|
|
13917
|
-
html += this.getMenuText('mn6_chemicalbindingwrap', 'Chem. Binding', undefined,
|
|
13908
|
+
html += this.getMenuText('mn6_chemicalbindingwrap', 'Chem. Binding', undefined, 1, 1);
|
|
13918
13909
|
html += "<ul>";
|
|
13919
|
-
html += this.getRadio('mn6_chemicalbinding', 'mn6_chemicalbindingshow', 'Show', undefined,
|
|
13920
|
-
html += this.getRadio('mn6_chemicalbinding', 'mn6_chemicalbindinghide', 'Hide', true,
|
|
13910
|
+
html += this.getRadio('mn6_chemicalbinding', 'mn6_chemicalbindingshow', 'Show', undefined, 1, 2);
|
|
13911
|
+
html += this.getRadio('mn6_chemicalbinding', 'mn6_chemicalbindinghide', 'Hide', true, 1, 2);
|
|
13921
13912
|
html += "</ul>";
|
|
13922
13913
|
html += "</li>";
|
|
13923
13914
|
|
|
@@ -14076,7 +14067,7 @@ class SetMenu {
|
|
|
14076
14067
|
|
|
14077
14068
|
//html += liStr + "https://www.ncbi.nlm.nih.gov/structure' target='_blank'>Search Structure " + me.htmlCls.wifiStr + "</a></li>";
|
|
14078
14069
|
//html += liStr + me.htmlCls.baseUrl + "icn3d/icn3d.html#citing' target='_blank'>Citing iCn3D</a></li>";
|
|
14079
|
-
html += this.getMenuUrl('citing', me.htmlCls.baseUrl + "icn3d/icn3d.html#citing", "Citing iCn3D",
|
|
14070
|
+
html += this.getMenuUrl('citing', me.htmlCls.baseUrl + "icn3d/icn3d.html#citing", "Citing iCn3D", 1, 1);
|
|
14080
14071
|
|
|
14081
14072
|
html += this.getMenuText('mn6_source', 'Source Code', undefined, 1, 1);
|
|
14082
14073
|
html += "<ul>";
|
|
@@ -16638,6 +16629,13 @@ class Events {
|
|
|
16638
16629
|
$("#" + me.pre + id).resizable();
|
|
16639
16630
|
}
|
|
16640
16631
|
|
|
16632
|
+
exportMsa(type) { let me = this.icn3dui, ic = me.icn3d;
|
|
16633
|
+
let text = ic.msa[type].join('\n\n');
|
|
16634
|
+
let fileType = (type == 'fasta') ? '.fasta' : (type == 'clustal') ? '.aln' : '.txt';
|
|
16635
|
+
|
|
16636
|
+
ic.saveFileCls.saveFile(ic.inputid + '_align' + fileType, 'text', [text]);
|
|
16637
|
+
}
|
|
16638
|
+
|
|
16641
16639
|
async launchMmdb(ids, bBiounit, hostUrl, bAppend) { let me = this.icn3dui, ic = me.icn3d, thisClass = this;
|
|
16642
16640
|
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
16643
16641
|
|
|
@@ -19388,6 +19386,24 @@ class Events {
|
|
|
19388
19386
|
ic.selectionCls.saveSelection(name, name);
|
|
19389
19387
|
});
|
|
19390
19388
|
|
|
19389
|
+
me.myEventCls.onIds("#" + me.pre + "saveFasta", "click", function(e) { me.icn3d;
|
|
19390
|
+
e.stopImmediatePropagation();
|
|
19391
|
+
thisClass.exportMsa('fasta');
|
|
19392
|
+
thisClass.setLogCmd('Save alignment in FASTA format', false);
|
|
19393
|
+
});
|
|
19394
|
+
|
|
19395
|
+
me.myEventCls.onIds("#" + me.pre + "saveClustal", "click", function(e) { me.icn3d;
|
|
19396
|
+
e.stopImmediatePropagation();
|
|
19397
|
+
thisClass.exportMsa('clustal');
|
|
19398
|
+
thisClass.setLogCmd('Save alignment in CLUSTALW format', false);
|
|
19399
|
+
});
|
|
19400
|
+
|
|
19401
|
+
me.myEventCls.onIds("#" + me.pre + "saveResbyres", "click", function(e) { me.icn3d;
|
|
19402
|
+
e.stopImmediatePropagation();
|
|
19403
|
+
thisClass.exportMsa('resbyres');
|
|
19404
|
+
thisClass.setLogCmd('Save alignment in Residue by Residue format to be used in File > Align (or Realign) > Multiple Chain > Residue by Residue', false);
|
|
19405
|
+
});
|
|
19406
|
+
|
|
19391
19407
|
$(document).on("click", "." + me.pre + "outputselection", function(e) { let ic = me.icn3d;
|
|
19392
19408
|
e.stopImmediatePropagation();
|
|
19393
19409
|
ic.bSelectResidue = false;
|
|
@@ -20247,7 +20263,9 @@ class SetHtml {
|
|
|
20247
20263
|
|
|
20248
20264
|
sequencesHtml += '<div style="width:20px; margin-left:3px; display:inline-block;"><span id="' + me.pre + 'alignseqguide' + suffix + '_expand" class="ui-icon ui-icon-plus icn3d-expand icn3d-link" style="width:15px;" title="Expand"></span><span id="' + me.pre + 'alignseqguide' + suffix + '_shrink" class="ui-icon ui-icon-minus icn3d-shrink icn3d-link" style="display:none; width:15px;" title="Shrink"></span></div> ';
|
|
20249
20265
|
|
|
20250
|
-
sequencesHtml += "<div style='min-width:200px; display:inline-block;'
|
|
20266
|
+
sequencesHtml += "<div style='min-width:200px; display:inline-block;'><b>Selection:</b> Name: " + me.htmlCls.inputTextStr + "id='" + me.pre + "alignseq_command_name' value='alseq_" + index + "' size='10'> " + me.htmlCls.space2 + "<button style='white-space:nowrap;' id='" + me.pre + "alignseq_saveselection'>Save</button> <button style='white-space:nowrap; margin-left:20px;' id='" + me.pre + "alignseq_clearselection'>Clear</button></div><br/>";
|
|
20267
|
+
|
|
20268
|
+
sequencesHtml += "<div style='min-width:200px; display:inline-block; margin-top:3px'><b>Save Alignment</b>: " + "<button style='white-space:nowrap;' id='" + me.pre + "saveFasta'>FASTA</button> <button style='white-space:nowrap; margin-left:20px;' id='" + me.pre + "saveClustal'>CLUSTAL</button> <button style='white-space:nowrap; margin-left:20px;' id='" + me.pre + "saveResbyres'>Residue by Residue</button></div><br/>";
|
|
20251
20269
|
|
|
20252
20270
|
sequencesHtml += me.htmlCls.divStr + "alignseqguide" + suffix + "' style='display:none; white-space:normal;' class='icn3d-box'>";
|
|
20253
20271
|
|
|
@@ -20256,7 +20274,9 @@ class SetHtml {
|
|
|
20256
20274
|
let resCategories = "<b>Residue labeling:</b> aligned residue with coordinates: UPPER case letter; non-aligned residue with coordinates: lower case letter which can be highlighted; residue missing coordinates: lower case letter which can NOT be highlighted.";
|
|
20257
20275
|
let scroll =(me.utilsCls.isMac() && !me.utilsCls.isMobile()) ? "<br/><br/><b>Turn on scroll bar:</b> System preferences -> General -> show scroll bars -> check Always" : "";
|
|
20258
20276
|
|
|
20259
|
-
sequencesHtml += resCategories + scroll + "<br
|
|
20277
|
+
sequencesHtml += resCategories + scroll + "<br/>";
|
|
20278
|
+
|
|
20279
|
+
sequencesHtml += "</div>";
|
|
20260
20280
|
|
|
20261
20281
|
return sequencesHtml;
|
|
20262
20282
|
}
|
|
@@ -63171,6 +63191,7 @@ class SetSeqAlign {
|
|
|
63171
63191
|
setSeqAlign(seqalign, alignedStructures) { let ic = this.icn3d, me = ic.icn3dui;
|
|
63172
63192
|
let mmdbid1 = alignedStructures[0][0].pdbId;
|
|
63173
63193
|
let mmdbid2 = alignedStructures[0][1].pdbId;
|
|
63194
|
+
let chainid1, chainid2;
|
|
63174
63195
|
|
|
63175
63196
|
ic.conservedName1 = mmdbid1 + '_cons';
|
|
63176
63197
|
ic.nonConservedName1 = mmdbid1 + '_ncons';
|
|
@@ -63194,7 +63215,7 @@ class SetSeqAlign {
|
|
|
63194
63215
|
let molid1 = alignData.moleculeId;
|
|
63195
63216
|
|
|
63196
63217
|
let chain1 = ic.pdbid_molid2chain[mmdbid1 + '_' + molid1];
|
|
63197
|
-
|
|
63218
|
+
chainid1 = mmdbid1 + '_' + chain1;
|
|
63198
63219
|
|
|
63199
63220
|
let id2aligninfo = {};
|
|
63200
63221
|
let start = alignData.sequence.length, end = -1;
|
|
@@ -63226,7 +63247,7 @@ class SetSeqAlign {
|
|
|
63226
63247
|
let molid2 = alignData.moleculeId;
|
|
63227
63248
|
|
|
63228
63249
|
let chain2 = ic.pdbid_molid2chain[mmdbid2 + '_' + molid2];
|
|
63229
|
-
|
|
63250
|
+
chainid2 = mmdbid2 + '_' + chain2;
|
|
63230
63251
|
|
|
63231
63252
|
// annotation title for the master seq only
|
|
63232
63253
|
if(ic.alnChainsAnTtl[chainid1] === undefined ) ic.alnChainsAnTtl[chainid1] = [];
|
|
@@ -63394,7 +63415,9 @@ class SetSeqAlign {
|
|
|
63394
63415
|
ic.alnChainsAnno[chainid1][3].push(numberStr); // symbol: 10, 20, etc, empty for rest
|
|
63395
63416
|
|
|
63396
63417
|
++alignIndex;
|
|
63397
|
-
} // end for(let j
|
|
63418
|
+
} // end for(let j
|
|
63419
|
+
|
|
63420
|
+
this.setMsaFormat([chainid1, chainid2]);
|
|
63398
63421
|
} // end for(let i
|
|
63399
63422
|
|
|
63400
63423
|
seqalign = {};
|
|
@@ -63474,7 +63497,7 @@ class SetSeqAlign {
|
|
|
63474
63497
|
}
|
|
63475
63498
|
|
|
63476
63499
|
setSeqAlignChain(chainid, chainIndex, chainidArray) { let ic = this.icn3d, me = ic.icn3dui;
|
|
63477
|
-
|
|
63500
|
+
let hAtoms = {};
|
|
63478
63501
|
|
|
63479
63502
|
let bRealign = (chainidArray) ? true : false;
|
|
63480
63503
|
let mmdbid1, mmdbid2, chain1, chain2, chainid1, chainid2, pos1, pos2;
|
|
@@ -63695,23 +63718,6 @@ class SetSeqAlign {
|
|
|
63695
63718
|
///if(ic.chainsSeq[chainid1] === undefined || ic.chainsSeq[chainid2] === undefined) break;
|
|
63696
63719
|
|
|
63697
63720
|
let resi1, resi2, resn1, resn2;
|
|
63698
|
-
/*
|
|
63699
|
-
if(bRealign) { // tmalign: just one residue in this for loop
|
|
63700
|
-
if(me.cfg.aligntool == 'tmalign') {
|
|
63701
|
-
resi1 = ic.qt_start_end[chainIndex][i].t_start;
|
|
63702
|
-
resi2 = ic.qt_start_end[chainIndex][i].q_start;
|
|
63703
|
-
}
|
|
63704
|
-
else {
|
|
63705
|
-
resi1 = j + start1;
|
|
63706
|
-
resi2 = j + start2;
|
|
63707
|
-
}
|
|
63708
|
-
|
|
63709
|
-
resn1 = this.getResnFromResi(chainid1, resi1).toUpperCase();
|
|
63710
|
-
resn2 = this.getResnFromResi(chainid2, resi2).toUpperCase();
|
|
63711
|
-
|
|
63712
|
-
if(resn1 == '?' || resn2 == '?') continue;
|
|
63713
|
-
}
|
|
63714
|
-
*/
|
|
63715
63721
|
if(bRealign && me.cfg.aligntool == 'tmalign') { // tmalign: just one residue in this for loop
|
|
63716
63722
|
resi1 = ic.qt_start_end[chainIndex][i].t_start;
|
|
63717
63723
|
resi2 = ic.qt_start_end[chainIndex][i].q_start;
|
|
@@ -63722,15 +63728,6 @@ class SetSeqAlign {
|
|
|
63722
63728
|
if(resn1 == '?' || resn2 == '?') continue;
|
|
63723
63729
|
}
|
|
63724
63730
|
else {
|
|
63725
|
-
///if(ic.chainsSeq[chainid1][j + start1] === undefined || ic.chainsSeq[chainid2][j + start2] === undefined) continue;
|
|
63726
|
-
|
|
63727
|
-
// resi1 = ic.chainsSeq[chainid1][j + start1].resi;
|
|
63728
|
-
// resi2 = ic.chainsSeq[chainid2][j + start2].resi;
|
|
63729
|
-
// resn1 = ic.chainsSeq[chainid1][j + start1].name.toUpperCase();
|
|
63730
|
-
// resn2 = ic.chainsSeq[chainid2][j + start2].name.toUpperCase();
|
|
63731
|
-
|
|
63732
|
-
// resi1 = this.getResiAferAlign(chainid1, bRealign, j + start1 + 1);
|
|
63733
|
-
// resi2 = this.getResiAferAlign(chainid2, bRealign, j + start2 + 1);
|
|
63734
63731
|
resi1 = this.getResiAferAlign(chainid1, bRealign, j + start1);
|
|
63735
63732
|
resi2 = this.getResiAferAlign(chainid2, bRealign, j + start2);
|
|
63736
63733
|
resn1 = this.getResnFromResi(chainid1, resi1).toUpperCase();
|
|
@@ -63770,14 +63767,15 @@ class SetSeqAlign {
|
|
|
63770
63767
|
|
|
63771
63768
|
prevIndex1 = end1;
|
|
63772
63769
|
prevIndex2 = end2;
|
|
63773
|
-
} // end for(let i
|
|
63770
|
+
} // end for(let i
|
|
63771
|
+
|
|
63772
|
+
this.setMsaFormat([chainid1, chainid2]);
|
|
63774
63773
|
|
|
63775
63774
|
return hAtoms;
|
|
63776
63775
|
}
|
|
63777
63776
|
|
|
63778
63777
|
setSeqAlignChainForAll(chainidArray, index_alignLen, bRealign) { let ic = this.icn3d, me = ic.icn3dui;
|
|
63779
63778
|
let hAtoms = {};
|
|
63780
|
-
|
|
63781
63779
|
let chainid1 = chainidArray[0];
|
|
63782
63780
|
|
|
63783
63781
|
ic.alnChainsAnno[chainid1] = [];
|
|
@@ -63931,7 +63929,8 @@ class SetSeqAlign {
|
|
|
63931
63929
|
resObject.aligned = (resid2range_t[resid]) ? true : false;
|
|
63932
63930
|
resObject.color = (resid2range_t[resid]) ? '#FF0000' : me.htmlCls.GREYC; // color by identity
|
|
63933
63931
|
resObject.color2 = (resid2range_t[resid]) ? '#FF0000' : me.htmlCls.GREYC; // color by conservation
|
|
63934
|
-
resObject.class = (resid2range_t[resid]) ? 'icn3d-align' : 'icn3d-nalign';
|
|
63932
|
+
// resObject.class = (resid2range_t[resid]) ? 'icn3d-align' : 'icn3d-nalign';
|
|
63933
|
+
resObject.class = (resid2range_t[resid]) ? 'icn3d-cons' : 'icn3d-nalign';
|
|
63935
63934
|
|
|
63936
63935
|
ic.alnChainsSeq[chainid1].push(resObject);
|
|
63937
63936
|
|
|
@@ -63950,7 +63949,9 @@ class SetSeqAlign {
|
|
|
63950
63949
|
let hAtomsTmp = this.mergeTwoSeqForAll(chainidArray, index, alignedChainIndice, resid2range_t, start_t, end_t, bRealign);
|
|
63951
63950
|
|
|
63952
63951
|
hAtoms = me.hashUtilsCls.unionHash(hAtoms, hAtomsTmp);
|
|
63953
|
-
}
|
|
63952
|
+
}
|
|
63953
|
+
|
|
63954
|
+
this.setMsaFormat(chainidArray);
|
|
63954
63955
|
|
|
63955
63956
|
// 3. assign the variable ic.alnChainsAnno
|
|
63956
63957
|
for(let i = 0; i < 3 + 2*n; ++i) {
|
|
@@ -64021,7 +64022,7 @@ class SetSeqAlign {
|
|
|
64021
64022
|
resObject.aligned = (bGap) ? false : bAligned;
|
|
64022
64023
|
resObject.color = (bGap || !bAligned) ? me.htmlCls.GREYC : ((resn == resn_t) ? "#FF0000" : "#0000FF"); // color by identity
|
|
64023
64024
|
resObject.color2 = (bGap || !bAligned) ? me.htmlCls.GREYC : '#' + ic.showAnnoCls.getColorhexFromBlosum62(resn, resn_t); // color by conservation
|
|
64024
|
-
resObject.class = (bGap || !bAligned) ? 'icn3d-nalign' :
|
|
64025
|
+
resObject.class = (bGap || !bAligned) ? 'icn3d-nalign' : ((resn == resn_t) ? "icn3d-cons" : "icn3d-ncons");
|
|
64025
64026
|
|
|
64026
64027
|
return resObject;
|
|
64027
64028
|
}
|
|
@@ -64295,7 +64296,7 @@ class SetSeqAlign {
|
|
|
64295
64296
|
pos2 = result.pos2;
|
|
64296
64297
|
for(let i = pos1; i < pos2; ++i) {
|
|
64297
64298
|
//for(let i = pos1; i <= pos2; ++i) {
|
|
64298
|
-
ic.alnChainsSeq[chainid2].push(gapResObject2);
|
|
64299
|
+
ic.alnChainsSeq[chainid2].push(gapResObject2);
|
|
64299
64300
|
}
|
|
64300
64301
|
|
|
64301
64302
|
return hAtoms;
|
|
@@ -64622,6 +64623,107 @@ class SetSeqAlign {
|
|
|
64622
64623
|
}
|
|
64623
64624
|
}
|
|
64624
64625
|
}
|
|
64626
|
+
|
|
64627
|
+
setMsaFormat(chainidArray) { let ic = this.icn3d; ic.icn3dui;
|
|
64628
|
+
//set MSA
|
|
64629
|
+
let fastaFormat = '', clustalFormat = 'CLUSTALW\n\n', resbyresFormat = '';
|
|
64630
|
+
let chainArrayClustal = [];
|
|
64631
|
+
|
|
64632
|
+
let consArray = [], resiArrayTemplate = [];
|
|
64633
|
+
let chainidTemplate = chainidArray[0];
|
|
64634
|
+
for(let i = 0, il = chainidArray.length; i < il; ++i) {
|
|
64635
|
+
let chainid = chainidArray[i];
|
|
64636
|
+
fastaFormat += '>' + chainid + '\n';
|
|
64637
|
+
|
|
64638
|
+
let clustalArray = [];
|
|
64639
|
+
let clustalLine = chainid.padEnd(20, ' ');
|
|
64640
|
+
let consLine = ''.padEnd(20, ' ');
|
|
64641
|
+
|
|
64642
|
+
let resiArrayTarget = [], resiArrayQuery = [];
|
|
64643
|
+
|
|
64644
|
+
let cnt = 0;
|
|
64645
|
+
for(let j = 0, jl = ic.alnChainsSeq[chainid].length; j < jl; ++j) {
|
|
64646
|
+
let resn = ic.alnChainsSeq[chainid][j].resn;
|
|
64647
|
+
fastaFormat += resn;
|
|
64648
|
+
clustalLine += resn;
|
|
64649
|
+
if(i == il - 1) {
|
|
64650
|
+
let alignedClass = ic.alnChainsSeq[chainid][j].class;
|
|
64651
|
+
if(alignedClass == 'icn3d-cons') {
|
|
64652
|
+
consLine += '*';
|
|
64653
|
+
}
|
|
64654
|
+
else if(alignedClass == 'icn3d-ncons') {
|
|
64655
|
+
consLine += '.';
|
|
64656
|
+
}
|
|
64657
|
+
else {
|
|
64658
|
+
consLine += ' ';
|
|
64659
|
+
}
|
|
64660
|
+
}
|
|
64661
|
+
|
|
64662
|
+
// residue by residue
|
|
64663
|
+
if(i == 0) {
|
|
64664
|
+
resiArrayTemplate.push(ic.alnChainsSeq[chainid][j].resi);
|
|
64665
|
+
}
|
|
64666
|
+
else {
|
|
64667
|
+
if(ic.alnChainsSeq[chainid][j].aligned) {
|
|
64668
|
+
resiArrayTarget.push(ic.alnChainsSeq[chainidTemplate][j].resi);
|
|
64669
|
+
resiArrayQuery.push(ic.alnChainsSeq[chainid][j].resi);
|
|
64670
|
+
}
|
|
64671
|
+
}
|
|
64672
|
+
|
|
64673
|
+
++cnt;
|
|
64674
|
+
|
|
64675
|
+
if(cnt % 60 == 0) {
|
|
64676
|
+
fastaFormat += '\n';
|
|
64677
|
+
clustalLine += ' ' + String(parseInt(cnt / 60) * 60);
|
|
64678
|
+
clustalArray.push(clustalLine);
|
|
64679
|
+
clustalLine = chainid.padEnd(20, ' ');
|
|
64680
|
+
|
|
64681
|
+
if(i == il - 1) {
|
|
64682
|
+
consArray.push(consLine);
|
|
64683
|
+
consLine = ''.padEnd(20, ' ');
|
|
64684
|
+
}
|
|
64685
|
+
}
|
|
64686
|
+
}
|
|
64687
|
+
|
|
64688
|
+
// add last line
|
|
64689
|
+
if(cnt % 60 != 0) {
|
|
64690
|
+
clustalArray.push(clustalLine);
|
|
64691
|
+
if(i == il - 1) {
|
|
64692
|
+
consArray.push(consLine);
|
|
64693
|
+
}
|
|
64694
|
+
}
|
|
64695
|
+
|
|
64696
|
+
fastaFormat += '\n';
|
|
64697
|
+
|
|
64698
|
+
chainArrayClustal.push(clustalArray);
|
|
64699
|
+
if(i == il - 1) chainArrayClustal.push(consArray);
|
|
64700
|
+
|
|
64701
|
+
// residue by residue
|
|
64702
|
+
let resiRangeStr1 = ic.resid2specCls.resi2range(resiArrayTarget, true);
|
|
64703
|
+
let resiRangeStr2 = ic.resid2specCls.resi2range(resiArrayQuery, true);
|
|
64704
|
+
|
|
64705
|
+
if(i > 0) resbyresFormat += resiRangeStr1 + ' | ' + resiRangeStr2 + '\n';
|
|
64706
|
+
}
|
|
64707
|
+
|
|
64708
|
+
// CLUSTALW
|
|
64709
|
+
for(let j = 0, jl = chainArrayClustal[0].length; j < jl; ++j) {
|
|
64710
|
+
for(let i = 0, il = chainArrayClustal.length; i < il; ++i) {
|
|
64711
|
+
clustalFormat += chainArrayClustal[i][j] + '\n';
|
|
64712
|
+
}
|
|
64713
|
+
clustalFormat += '\n';
|
|
64714
|
+
}
|
|
64715
|
+
|
|
64716
|
+
// seq MSA
|
|
64717
|
+
if(!ic.msa) ic.msa = {};
|
|
64718
|
+
|
|
64719
|
+
if(!ic.msa['fasta']) ic.msa['fasta'] = [];
|
|
64720
|
+
if(!ic.msa['clustal']) ic.msa['clustal'] = [];
|
|
64721
|
+
if(!ic.msa['resbyres']) ic.msa['resbyres'] = [];
|
|
64722
|
+
|
|
64723
|
+
ic.msa['fasta'].push(fastaFormat);
|
|
64724
|
+
ic.msa['clustal'].push(clustalFormat);
|
|
64725
|
+
ic.msa['resbyres'].push(resbyresFormat);
|
|
64726
|
+
}
|
|
64625
64727
|
}
|
|
64626
64728
|
|
|
64627
64729
|
/**
|
|
@@ -72246,8 +72348,8 @@ class Resid2spec {
|
|
|
72246
72348
|
return spec;
|
|
72247
72349
|
}
|
|
72248
72350
|
|
|
72249
|
-
resi2range(resiArray) {var ic = this.icn3d; ic.icn3dui;
|
|
72250
|
-
let range = [];
|
|
72351
|
+
resi2range(resiArray, bString) {var ic = this.icn3d; ic.icn3dui;
|
|
72352
|
+
let range = [], rangeStr = '';
|
|
72251
72353
|
|
|
72252
72354
|
let resiArraySorted = resiArray.sort(function(a, b) {
|
|
72253
72355
|
return parseInt(a) - parseInt(b);
|
|
@@ -72258,9 +72360,14 @@ class Resid2spec {
|
|
|
72258
72360
|
for(let j = 0, jl = resiArraySorted.length; j < jl; ++j) {
|
|
72259
72361
|
resi = resiArraySorted[j];
|
|
72260
72362
|
|
|
72261
|
-
if(j != 0 && resi != prevResi + 1) {
|
|
72363
|
+
if(j != 0 && parseInt(resi) != parseInt(prevResi) + 1) {
|
|
72262
72364
|
range.push(startResi);
|
|
72263
72365
|
range.push(prevResi);
|
|
72366
|
+
|
|
72367
|
+
if(rangeStr) rangeStr += ',';
|
|
72368
|
+
if(startResi == prevResi) rangeStr += startResi;
|
|
72369
|
+
else rangeStr += startResi + '-' + prevResi;
|
|
72370
|
+
|
|
72264
72371
|
startResi = resi;
|
|
72265
72372
|
}
|
|
72266
72373
|
|
|
@@ -72270,8 +72377,13 @@ class Resid2spec {
|
|
|
72270
72377
|
// last residue
|
|
72271
72378
|
range.push(startResi);
|
|
72272
72379
|
range.push(prevResi);
|
|
72273
|
-
|
|
72274
|
-
|
|
72380
|
+
|
|
72381
|
+
if(rangeStr) rangeStr += ',';
|
|
72382
|
+
if(startResi == prevResi) rangeStr += startResi;
|
|
72383
|
+
else rangeStr += startResi + '-' + prevResi;
|
|
72384
|
+
|
|
72385
|
+
if(bString) return rangeStr;
|
|
72386
|
+
else return range;
|
|
72275
72387
|
}
|
|
72276
72388
|
|
|
72277
72389
|
atoms2spec(atomHash) {var ic = this.icn3d; ic.icn3dui;
|
|
@@ -83866,7 +83978,7 @@ class iCn3DUI {
|
|
|
83866
83978
|
//even when multiple iCn3D viewers are shown together.
|
|
83867
83979
|
this.pre = this.cfg.divid + "_";
|
|
83868
83980
|
|
|
83869
|
-
this.REVISION = '3.
|
|
83981
|
+
this.REVISION = '3.41.0';
|
|
83870
83982
|
|
|
83871
83983
|
// In nodejs, iCn3D defines "window = {navigator: {}}"
|
|
83872
83984
|
this.bNode = (Object.keys(window).length < 2) ? true : false;
|