icn3d 3.13.2 → 3.14.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 CHANGED
@@ -27574,6 +27574,24 @@ class LoadScript {
27574
27574
 
27575
27575
  return;
27576
27576
  }
27577
+ else if(ic.commands[i].trim().indexOf('set annotation ptm') == 0 ) { // the command may have "|||{"factor"...
27578
+ let strArray = ic.commands[i].split("|||");
27579
+
27580
+ if(Object.keys(ic.proteins).length > 0 &&(ic.bAjaxPTM === undefined || !ic.bAjaxPTM) ) {
27581
+ $.when(thisClass.applyCommandPTM(strArray[0].trim())).then(function() {
27582
+ thisClass.execCommandsBase(i + 1, end, steps);
27583
+ });
27584
+ }
27585
+ else {
27586
+ if(Object.keys(ic.proteins).length > 0) {
27587
+ thisClass.applyCommandPTM(strArray[0].trim());
27588
+ }
27589
+
27590
+ this.execCommandsBase(i + 1, end, steps);
27591
+ }
27592
+
27593
+ return;
27594
+ }
27577
27595
  else if(ic.commands[i].trim().indexOf('set annotation 3ddomain') == 0) { // the command may have "|||{"factor"...
27578
27596
  let strArray = ic.commands[i].split("|||");
27579
27597
 
@@ -27804,6 +27822,8 @@ class LoadScript {
27804
27822
  ic.hAtoms = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
27805
27823
  }
27806
27824
 
27825
+ me.cfg.aligntool = 'vast';
27826
+
27807
27827
  $.when(thisClass.applyCommandRealignByStruct(command)).then(function() {
27808
27828
  thisClass.execCommandsBase(i + 1, end, steps);
27809
27829
  });
@@ -27964,6 +27984,9 @@ class LoadScript {
27964
27984
  else if(lastCommand.indexOf('set annotation snp') == 0) {
27965
27985
  thisClass.applyCommandSnp(lastCommand);
27966
27986
  }
27987
+ else if(lastCommand.indexOf('set annotation ptm') == 0) {
27988
+ thisClass.applyCommandPTM(lastCommand);
27989
+ }
27967
27990
  else if(lastCommand.indexOf('set annotation 3ddomain') == 0) {
27968
27991
  thisClass.applyCommand3ddomain(lastCommand);
27969
27992
  }
@@ -28014,6 +28037,9 @@ class LoadScript {
28014
28037
  let nameArray = paraArray[1].split(',');
28015
28038
  ic.hAtoms = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
28016
28039
  }
28040
+
28041
+ me.cfg.aligntool = 'vast';
28042
+
28017
28043
  thisClass.applyCommandRealignByStruct(lastCommand);
28018
28044
  }
28019
28045
  else if(lastCommand.indexOf('realign on tmalign') == 0) {
@@ -28419,6 +28445,25 @@ class LoadScript {
28419
28445
  return ic.deferredSnp.promise();
28420
28446
  }
28421
28447
 
28448
+ applyCommandPTMBase(command) { let ic = this.icn3d; ic.icn3dui;
28449
+ // chain functions together
28450
+ let pos = command.lastIndexOf(' '); // set annotation clinvar
28451
+ command.substr(pos + 1);
28452
+
28453
+ ic.annotationCls.setAnnoTabPTM();
28454
+ }
28455
+
28456
+ applyCommandPTM(command) { let ic = this.icn3d; ic.icn3dui;
28457
+ let thisClass = this;
28458
+
28459
+ // chain functions together
28460
+ ic.deferredPTM = $.Deferred(function() {
28461
+ thisClass.applyCommandPTMBase(command);
28462
+ }); // end of me.deferred = $.Deferred(function() {
28463
+
28464
+ return ic.deferredPTM.promise();
28465
+ }
28466
+
28422
28467
  applyCommand3ddomainBase(command) { let ic = this.icn3d; ic.icn3dui;
28423
28468
  // chain functions together
28424
28469
  let pos = command.lastIndexOf(' ');
@@ -29960,7 +30005,8 @@ class ShowSeq {
29960
30005
  if(seqLength > ic.maxAnnoLength) {
29961
30006
  ic.maxAnnoLength = seqLength;
29962
30007
  }
29963
- let itemArray = ['giseq', 'cddsite', 'clinvar', 'snp', 'domain', 'interaction', 'custom', 'ssbond', 'crosslink', 'transmem'];
30008
+ //let itemArray = ['giseq', 'cddsite', 'ptm', 'clinvar', 'snp', 'domain', 'interaction', 'custom', 'ssbond', 'crosslink', 'transmem'];
30009
+ let itemArray = ['giseq', 'cddsite', 'clinvar', 'snp', 'ptm', 'ssbond', 'crosslink', 'transmem', 'domain', 'custom', 'interaction'];
29964
30010
  for(let i in itemArray) {
29965
30011
  let item = itemArray[i];
29966
30012
  if($("#" + ic.pre + item + "_" + chnid).length) $("#" + ic.pre + item + "_" + chnid).width(divLength);
@@ -32922,6 +32968,9 @@ class ApplyCommand {
32922
32968
  else if(command == 'set annotation interaction') {
32923
32969
  ic.annotationCls.setAnnoTabInteraction();
32924
32970
  }
32971
+ else if(command == 'set annotation ptm') {
32972
+ ic.annotationCls.setAnnoTabPTM();
32973
+ }
32925
32974
  else if(command == 'set annotation cdd') {
32926
32975
  ic.annotationCls.setAnnoTabCdd();
32927
32976
  }
@@ -32968,6 +33017,9 @@ class ApplyCommand {
32968
33017
  else if(type == 'site') {
32969
33018
  ic.annotationCls.hideAnnoTabSite();
32970
33019
  }
33020
+ else if(type == 'ptm') {
33021
+ ic.annotationCls.hideAnnoTabPTM();
33022
+ }
32971
33023
  else if(type == 'interaction') {
32972
33024
  ic.annotationCls.hideAnnoTabInteraction();
32973
33025
  }
@@ -34166,6 +34218,7 @@ class ApplyCommand {
34166
34218
  else if(cmd== 'set view overview') return seqAnnoStr + ': "Summary" tab';
34167
34219
  else if(cmd == 'set annotation custom') return seqAnnoStr + ': "Custom" checkbox';
34168
34220
  else if(cmd == 'set annotation interaction') return seqAnnoStr + ': "Interactions" checkbox';
34221
+ else if(cmd == 'set annotation ptm') return seqAnnoStr + ': "PTM" checkbox';
34169
34222
  else if(cmd == 'set annotation cdd') return seqAnnoStr + ': "Conserved Domains" checkbox';
34170
34223
  else if(cmd == 'set annotation site') return seqAnnoStr + ': "Functional Sites" checkbox';
34171
34224
  else if(cmd == 'set annotation ssbond') return seqAnnoStr + ': "Disulfide Bonds" checkbox';
@@ -35468,7 +35521,8 @@ class SetSeqAlign {
35468
35521
  if(i > 0) {
35469
35522
  let index1 = alignIndex;
35470
35523
  for(let j = prevIndex1 + 1, jl = start1; j < jl; ++j) {
35471
- if(ic.chainsSeq[chainid1] === undefined) break;
35524
+ if(ic.chainsSeq[chainid1] === undefined || ic.chainsSeq[chainid1][j] === undefined) break;
35525
+
35472
35526
  let resi = ic.chainsSeq[chainid1][j].resi;
35473
35527
  let resn = ic.chainsSeq[chainid1][j].name.toLowerCase();
35474
35528
 
@@ -35482,7 +35536,8 @@ class SetSeqAlign {
35482
35536
 
35483
35537
  let index2 = alignIndex;
35484
35538
  for(let j = prevIndex2 + 1, jl = start2; j < jl; ++j) {
35485
- if(ic.chainsSeq[chainid2] === undefined) break;
35539
+ if(ic.chainsSeq[chainid2] === undefined || ic.chainsSeq[chainid2] === undefined) break;
35540
+
35486
35541
  let resi = ic.chainsSeq[chainid2][j].resi;
35487
35542
  let resn = ic.chainsSeq[chainid2][j].name.toLowerCase();
35488
35543
 
@@ -37432,8 +37487,8 @@ class HlSeq {
37432
37487
  if(me.bNode) return;
37433
37488
 
37434
37489
  let thisClass = this;
37435
- $("#" + ic.pre + "dl_sequence2").add("[id^=" + ic.pre + "dt_giseq]").add("[id^=" + ic.pre + "dt_custom]").add("[id^=" + ic.pre + "dt_site]").add("[id^=" + ic.pre + "dt_snp]").add("[id^=" + ic.pre + "dt_clinvar]").add("[id^=" + ic.pre + "dt_cdd]").add("[id^=" + ic.pre + "dt_domain]").add("[id^=" + ic.pre + "dt_interaction]").add("[id^=" + ic.pre + "dt_ssbond]").add("[id^=" + ic.pre + "dt_crosslink]").add("[id^=" + ic.pre + "dt_transmem]")
37436
- .add("[id^=" + ic.pre + "tt_giseq]").add("[id^=" + ic.pre + "tt_custom]").add("[id^=" + ic.pre + "tt_site]").add("[id^=" + ic.pre + "tt_snp]").add("[id^=" + ic.pre + "tt_clinvar]").add("[id^=" + ic.pre + "tt_cdd]").add("[id^=" + ic.pre + "tt_domain]").add("[id^=" + ic.pre + "tt_interaction]").add("[id^=" + ic.pre + "tt_ssbond]").add("[id^=" + ic.pre + "tt_crosslink]").add("[id^=" + ic.pre + "tt_transmem]")
37490
+ $("#" + ic.pre + "dl_sequence2").add("[id^=" + ic.pre + "dt_giseq]").add("[id^=" + ic.pre + "dt_custom]").add("[id^=" + ic.pre + "dt_site]").add("[id^=" + ic.pre + "dt_ptm]").add("[id^=" + ic.pre + "dt_snp]").add("[id^=" + ic.pre + "dt_clinvar]").add("[id^=" + ic.pre + "dt_cdd]").add("[id^=" + ic.pre + "dt_domain]").add("[id^=" + ic.pre + "dt_interaction]").add("[id^=" + ic.pre + "dt_ssbond]").add("[id^=" + ic.pre + "dt_crosslink]").add("[id^=" + ic.pre + "dt_transmem]")
37491
+ .add("[id^=" + ic.pre + "tt_giseq]").add("[id^=" + ic.pre + "tt_custom]").add("[id^=" + ic.pre + "tt_site]").add("[id^=" + ic.pre + "tt_ptm]").add("[id^=" + ic.pre + "tt_snp]").add("[id^=" + ic.pre + "tt_clinvar]").add("[id^=" + ic.pre + "tt_cdd]").add("[id^=" + ic.pre + "tt_domain]").add("[id^=" + ic.pre + "tt_interaction]").add("[id^=" + ic.pre + "tt_ssbond]").add("[id^=" + ic.pre + "tt_crosslink]").add("[id^=" + ic.pre + "tt_transmem]")
37437
37492
  .selectable({
37438
37493
  distance: 1, //Tolerance, in pixels, for when selecting should start. If specified, selecting will not start until the mouse has been dragged beyond the specified distance.
37439
37494
  stop: function() { let ic = thisClass.icn3d;
@@ -37486,11 +37541,11 @@ class HlSeq {
37486
37541
  }
37487
37542
  });
37488
37543
 
37489
- $("[id^=" + ic.pre + "ov_giseq]").add("[id^=" + ic.pre + "ov_custom]").add("[id^=" + ic.pre + "ov_site]").add("[id^=" + ic.pre + "ov_snp]").add("[id^=" + ic.pre + "ov_clinvar]").add("[id^=" + ic.pre + "ov_cdd]").add("[id^=" + ic.pre + "ov_domain]").add("[id^=" + ic.pre + "ov_interaction]").add("[id^=" + ic.pre + "ov_ssbond]").add("[id^=" + ic.pre + "ov_crosslink]").add("[id^=" + ic.pre + "ov_transmem]")
37490
- .add("[id^=" + ic.pre + "tt_giseq]").add("[id^=" + ic.pre + "tt_custom]").add("[id^=" + ic.pre + "tt_site]").add("[id^=" + ic.pre + "tt_snp]").add("[id^=" + ic.pre + "tt_clinvar]").add("[id^=" + ic.pre + "tt_cdd]").add("[id^=" + ic.pre + "tt_domain]").add("[id^=" + ic.pre + "tt_interaction]").add("[id^=" + ic.pre + "tt_ssbond]").add("[id^=" + ic.pre + "tt_crosslink]").add("[id^=" + ic.pre + "tt_transmem]")
37544
+ $("[id^=" + ic.pre + "ov_giseq]").add("[id^=" + ic.pre + "ov_custom]").add("[id^=" + ic.pre + "ov_site]").add("[id^=" + ic.pre + "ov_ptm]").add("[id^=" + ic.pre + "ov_snp]").add("[id^=" + ic.pre + "ov_clinvar]").add("[id^=" + ic.pre + "ov_cdd]").add("[id^=" + ic.pre + "ov_domain]").add("[id^=" + ic.pre + "ov_interaction]").add("[id^=" + ic.pre + "ov_ssbond]").add("[id^=" + ic.pre + "ov_crosslink]").add("[id^=" + ic.pre + "ov_transmem]")
37545
+ .add("[id^=" + ic.pre + "tt_giseq]").add("[id^=" + ic.pre + "tt_custom]").add("[id^=" + ic.pre + "tt_site]").add("[id^=" + ic.pre + "tt_ptm]").add("[id^=" + ic.pre + "tt_snp]").add("[id^=" + ic.pre + "tt_clinvar]").add("[id^=" + ic.pre + "tt_cdd]").add("[id^=" + ic.pre + "tt_domain]").add("[id^=" + ic.pre + "tt_interaction]").add("[id^=" + ic.pre + "tt_ssbond]").add("[id^=" + ic.pre + "tt_crosslink]").add("[id^=" + ic.pre + "tt_transmem]")
37491
37546
 
37492
- .add("#" + ic.pre + "dl_sequence2").add("[id^=" + ic.pre + "dt_giseq]").add("[id^=" + ic.pre + "dt_custom]").add("[id^=" + ic.pre + "dt_site]").add("[id^=" + ic.pre + "dt_snp]").add("[id^=" + ic.pre + "dt_clinvar]").add("[id^=" + ic.pre + "dt_cdd]").add("[id^=" + ic.pre + "dt_domain]").add("[id^=" + ic.pre + "dt_interaction]").add("[id^=" + ic.pre + "dt_ssbond]").add("[id^=" + ic.pre + "dt_crosslink]").add("[id^=" + ic.pre + "dt_transmem]")
37493
- .add("[id^=" + ic.pre + "tt_giseq]").add("[id^=" + ic.pre + "tt_custom]").add("[id^=" + ic.pre + "tt_site]").add("[id^=" + ic.pre + "tt_snp]").add("[id^=" + ic.pre + "tt_clinvar]").add("[id^=" + ic.pre + "tt_cdd]").add("[id^=" + ic.pre + "tt_domain]").add("[id^=" + ic.pre + "tt_interaction]").add("[id^=" + ic.pre + "tt_ssbond]").add("[id^=" + ic.pre + "tt_crosslink]").add("[id^=" + ic.pre + "tt_transmem]")
37547
+ .add("#" + ic.pre + "dl_sequence2").add("[id^=" + ic.pre + "dt_giseq]").add("[id^=" + ic.pre + "dt_custom]").add("[id^=" + ic.pre + "dt_site]").add("[id^=" + ic.pre + "dt_ptm]").add("[id^=" + ic.pre + "dt_snp]").add("[id^=" + ic.pre + "dt_clinvar]").add("[id^=" + ic.pre + "dt_cdd]").add("[id^=" + ic.pre + "dt_domain]").add("[id^=" + ic.pre + "dt_interaction]").add("[id^=" + ic.pre + "dt_ssbond]").add("[id^=" + ic.pre + "dt_crosslink]").add("[id^=" + ic.pre + "dt_transmem]")
37548
+ .add("[id^=" + ic.pre + "tt_giseq]").add("[id^=" + ic.pre + "tt_custom]").add("[id^=" + ic.pre + "tt_site]").add("[id^=" + ic.pre + "tt_ptm]").add("[id^=" + ic.pre + "tt_snp]").add("[id^=" + ic.pre + "tt_clinvar]").add("[id^=" + ic.pre + "tt_cdd]").add("[id^=" + ic.pre + "tt_domain]").add("[id^=" + ic.pre + "tt_interaction]").add("[id^=" + ic.pre + "tt_ssbond]").add("[id^=" + ic.pre + "tt_crosslink]").add("[id^=" + ic.pre + "tt_transmem]")
37494
37549
 
37495
37550
  .on('click', '.icn3d-seqTitle', function(e) { let ic = thisClass.icn3d;
37496
37551
  e.stopImmediatePropagation();
@@ -37531,7 +37586,7 @@ class HlSeq {
37531
37586
 
37532
37587
  let thisClass = this;
37533
37588
 
37534
- $("#" + ic.pre + "dl_sequence2").add("[id^=" + ic.pre + "giseq]").add("[id^=" + ic.pre + "custom]").add("[id^=" + ic.pre + "site]").add("[id^=" + ic.pre + "clinvar]").add("[id^=" + ic.pre + "snp]").add("[id^=" + ic.pre + "cdd]").add("[id^=" + ic.pre + "domain]").add("[id^=" + ic.pre + "interaction]").add("[id^=" + ic.pre + "ssbond]").add("[id^=" + ic.pre + "crosslink]").add("[id^=" + ic.pre + "transmem]").on('click', '.icn3d-residue', function(e) { let ic = thisClass.icn3d;
37589
+ $("#" + ic.pre + "dl_sequence2").add("[id^=" + ic.pre + "giseq]").add("[id^=" + ic.pre + "custom]").add("[id^=" + ic.pre + "site]").add("[id^=" + ic.pre + "ptm]").add("[id^=" + ic.pre + "clinvar]").add("[id^=" + ic.pre + "snp]").add("[id^=" + ic.pre + "cdd]").add("[id^=" + ic.pre + "domain]").add("[id^=" + ic.pre + "interaction]").add("[id^=" + ic.pre + "ssbond]").add("[id^=" + ic.pre + "crosslink]").add("[id^=" + ic.pre + "transmem]").on('click', '.icn3d-residue', function(e) { let ic = thisClass.icn3d;
37535
37590
  e.stopImmediatePropagation();
37536
37591
  /*
37537
37592
  //if($(this).attr('id') === ic.pre + "dl_sequence2") {
@@ -37580,7 +37635,7 @@ class HlSeq {
37580
37635
 
37581
37636
  let thisClass = this;
37582
37637
 
37583
- $("#" + ic.pre + "dl_sequence2").add("[id^=" + ic.pre + "giseq]").add("[id^=" + ic.pre + "custom]").add("[id^=" + ic.pre + "site]").add("[id^=" + ic.pre + "feat]").add("[id^=" + ic.pre + "clinvar]").add("[id^=" + ic.pre + "snp]").add("[id^=" + ic.pre + "cdd]").add("[id^=" + ic.pre + "domain]").add("[id^=" + ic.pre + "interaction]").add("[id^=" + ic.pre + "ssbond]").add("[id^=" + ic.pre + "crosslink]").add("[id^=" + ic.pre + "transmem]").on('click', '.icn3d-seqTitle', function(e) { let ic = thisClass.icn3d;
37638
+ $("#" + ic.pre + "dl_sequence2").add("[id^=" + ic.pre + "giseq]").add("[id^=" + ic.pre + "custom]").add("[id^=" + ic.pre + "site]").add("[id^=" + ic.pre + "ptm]").add("[id^=" + ic.pre + "feat]").add("[id^=" + ic.pre + "clinvar]").add("[id^=" + ic.pre + "snp]").add("[id^=" + ic.pre + "cdd]").add("[id^=" + ic.pre + "domain]").add("[id^=" + ic.pre + "interaction]").add("[id^=" + ic.pre + "ssbond]").add("[id^=" + ic.pre + "crosslink]").add("[id^=" + ic.pre + "transmem]").on('click', '.icn3d-seqTitle', function(e) { let ic = thisClass.icn3d;
37584
37639
  e.stopImmediatePropagation();
37585
37640
 
37586
37641
  //if($(this).attr('id') === ic.pre + "dl_sequence2") {
@@ -37777,7 +37832,7 @@ class HlSeq {
37777
37832
  let residueid;
37778
37833
  let structure = chainid.substr(0, chainid.indexOf('_'));
37779
37834
  for(let i = 0, il = posArray.length; i < il; ++i) {
37780
- if($(that).attr('site') !== undefined) {
37835
+ if($(that).attr('site') !== undefined || $(that).attr('ptm') !== undefined) {
37781
37836
  if(ic.bNCBI) {
37782
37837
  let residNCBI = chainid + '_' +(parseInt(posArray[i])+1).toString();
37783
37838
  // AlphaFold domains calculated on-the-fly have no conversion
@@ -38179,6 +38234,8 @@ class ShowAnno {
38179
38234
  ++i;
38180
38235
  }
38181
38236
  ic.interactChainbase = me.hashUtilsCls.unionHash(ic.interactChainbase, chemical_chainid);
38237
+ ic.PTMChainbase = me.hashUtilsCls.unionHash(ic.PTMChainbase, ic.protein_chainid);
38238
+
38182
38239
  ic.ssbondChainbase = me.hashUtilsCls.unionHash(ic.ssbondChainbase, ic.protein_chainid);
38183
38240
  ic.ssbondChainbase = me.hashUtilsCls.unionHash(ic.ssbondChainbase, chemical_chainid);
38184
38241
  ic.crosslinkChainbase = me.hashUtilsCls.unionHash(ic.crosslinkChainbase, ic.protein_chainid);
@@ -38210,8 +38267,10 @@ class ShowAnno {
38210
38267
  //if(proteinName.length > 40) proteinName = proteinName.substr(0, 40) + "...";
38211
38268
  let categoryStr =(index == 0) ? "<span class='icn3d-annoLargeTitle'><b>Proteins</b>: </span><br><br>" : "";
38212
38269
  let geneLink =(ic.chainsGene[chnid] && ic.chainsGene[chnid].geneId) ? "(Gene: <a href='https://www.ncbi.nlm.nih.gov/gene/" + ic.chainsGene[chnid].geneId + "' target='_blank' title='" + ic.chainsGene[chnid].geneDesc + "'>" + ic.chainsGene[chnid].geneSymbol + "</a>)" : '';
38270
+ let structure = chnid.substr(0, chnid.indexOf('_'));
38271
+ let chainLink = (structure.length > 5) ? '<a href="https://alphafold.ebi.ac.uk/entry/' + structure + '" target="_blank">' + chnid + '</a>' : chnid;
38213
38272
  let chainHtml = "<div id='" + ic.pre + "anno_" + chnid + "' class='icn3d-annotation'>" + categoryStr
38214
- + "<span style='font-weight:bold;'>Annotations of " + chnid
38273
+ + "<span style='font-weight:bold;'>Annotations of " + chainLink
38215
38274
  + "</span>: <a class='icn3d-blue' href='https://www.ncbi.nlm.nih.gov/protein?term="
38216
38275
  + chnid + "' target='_blank' title='" + fullProteinName + "'>" + proteinName + "</a>"
38217
38276
  + geneLink + "&nbsp;&nbsp;&nbsp;"
@@ -38224,7 +38283,8 @@ class ShowAnno {
38224
38283
  + this.addButton(chnid, "icn3d-sheetsets", "Sheet Sets", "Define sets for each sheet in this chain and add them to the menu of \"Defined Sets\"", 60, buttonStyle) + "&nbsp;"
38225
38284
  + this.addButton(chnid, "icn3d-coilsets", "Coil Sets", "Define sets for each coil in this chain and add them to the menu of \"Defined Sets\"", 60, buttonStyle);
38226
38285
  $("#" + ic.pre + "dl_annotations").append(chainHtml);
38227
- let itemArray = ['giseq', 'cdd', 'clinvar', 'snp', 'domain', 'site', 'interaction', 'custom', 'ssbond', 'crosslink', 'transmem'];
38286
+ //let itemArray = ['giseq', 'cdd', 'clinvar', 'snp', 'domain', 'site', 'ptm', 'interaction', 'custom', 'ssbond', 'crosslink', 'transmem'];
38287
+ let itemArray = ['giseq', 'cdd', 'clinvar', 'snp', 'site', 'ptm', 'ssbond', 'crosslink', 'transmem', 'domain', 'custom', 'interaction'];
38228
38288
  // dt: detailed view, hide by default; ov: overview, show by default
38229
38289
  for(let i in itemArray) {
38230
38290
  let item = itemArray[i];
@@ -38652,6 +38712,286 @@ class ShowAnno {
38652
38712
 
38653
38713
  }
38654
38714
 
38715
+ /**
38716
+ * @author Jiyao Wang <wangjiy@ncbi.nlm.nih.gov> / https://github.com/ncbi/icn3d
38717
+ */
38718
+
38719
+ class AnnoPTM {
38720
+ constructor(icn3d) {
38721
+ this.icn3d = icn3d;
38722
+ }
38723
+
38724
+ //Show the annotations of CDD domains and binding sites.
38725
+ showPTM(chnid, chnidBase) { let ic = this.icn3d; ic.icn3dui;
38726
+ let thisClass = this;
38727
+
38728
+ // UniProt ID
38729
+ let structure = chnid.substr(0, chnid.indexOf('_'));
38730
+ let chain = chnid.substr(chnid.indexOf('_') + 1);
38731
+
38732
+ // UniProt ID
38733
+ if( structure.length > 5 ) {
38734
+ let url = "https://www.ebi.ac.uk/proteins/api/features/" + structure;
38735
+ $.ajax({
38736
+ url: url,
38737
+ dataType: 'json',
38738
+ cache: true,
38739
+ tryCount : 0,
38740
+ retryLimit : 0, //1
38741
+ success: function(data) {
38742
+ thisClass.parsePTM(data, chnid);
38743
+ if(ic.deferredPTM !== undefined) ic.deferredPTM.resolve();
38744
+ },
38745
+ error : function(xhr, textStatus, errorThrown ) {
38746
+ this.tryCount++;
38747
+ if(this.tryCount <= this.retryLimit) {
38748
+ //try again
38749
+ $.ajax(this);
38750
+ return;
38751
+ }
38752
+
38753
+ thisClass.getNoPTM(chnid);
38754
+
38755
+ return;
38756
+ }
38757
+ });
38758
+ }
38759
+ else { // PDB
38760
+ // get PDB to UniProt mapping
38761
+ // https://www.ebi.ac.uk/pdbe/api/doc/
38762
+ let structLower = structure.substr(0, 4).toLowerCase();
38763
+ let urlMap = "https://www.ebi.ac.uk/pdbe/api/mappings/uniprot/" + structLower;
38764
+
38765
+ $.ajax({
38766
+ url: urlMap,
38767
+ dataType: 'json',
38768
+ cache: true,
38769
+ success: function(dataMap) {
38770
+ let UniProtID = '';
38771
+ if(!ic.UPResi2ResiPosPerChain) ic.UPResi2ResiPosPerChain = {};
38772
+ ic.UPResi2ResiPosPerChain[chnid] = {};
38773
+ let mapping = dataMap[structLower].UniProt;
38774
+
38775
+ let bFound = false;
38776
+ for(let up in mapping) {
38777
+ let chainArray = mapping[up].mappings;
38778
+ if(bFound) break;
38779
+
38780
+ for(let i = 0, il = chainArray.length; i < il; ++i) {
38781
+ //"entity_id": 3, "end": { "author_residue_number": null, "author_insertion_code": "", "residue_number": 219 }, "chain_id": "A", "start": { "author_residue_number": 94, "author_insertion_code": "", "residue_number": 1 }, "unp_end": 312, "unp_start": 94, "struct_asym_id": "C"
38782
+ let chainObj = chainArray[i];
38783
+ if(chainObj.chain_id == chain) {
38784
+ let start = chainObj.unp_start;
38785
+ let end = chainObj.unp_end;
38786
+ let posStart = chainObj.start.residue_number;
38787
+ let posEnd = chainObj.end.residue_number;
38788
+
38789
+ if(posEnd - posStart != end - start) {
38790
+ console.log("There might be some issues in the PDB to UniProt residue mapping.");
38791
+ }
38792
+
38793
+ for(let j = 0; j <= end - start; ++j) {
38794
+ ic.UPResi2ResiPosPerChain[chnid][j + start] = j + posStart - 1; // 0-based
38795
+ }
38796
+
38797
+ UniProtID = up;
38798
+ bFound = true;
38799
+ break;
38800
+ }
38801
+ }
38802
+ }
38803
+
38804
+ if(UniProtID == '') {
38805
+ thisClass.getNoPTM(chnid);
38806
+ }
38807
+ else {
38808
+ let url = "https://www.ebi.ac.uk/proteins/api/features/" + UniProtID;
38809
+ $.ajax({
38810
+ url: url,
38811
+ dataType: 'json',
38812
+ cache: true,
38813
+ tryCount : 0,
38814
+ retryLimit : 0, //1
38815
+ success: function(data) {
38816
+ thisClass.parsePTM(data, chnid);
38817
+ if(ic.deferredPTM !== undefined) ic.deferredPTM.resolve();
38818
+ },
38819
+ error : function(xhr, textStatus, errorThrown ) {
38820
+ this.tryCount++;
38821
+ if(this.tryCount <= this.retryLimit) {
38822
+ //try again
38823
+ $.ajax(this);
38824
+ return;
38825
+ }
38826
+
38827
+ thisClass.getNoPTM(chnid);
38828
+
38829
+ return;
38830
+ }
38831
+ });
38832
+ }
38833
+ },
38834
+ error : function(xhr, textStatus, errorThrown ) {
38835
+ thisClass.getNoPTM(chnid);
38836
+ }
38837
+ });
38838
+ }
38839
+ }
38840
+
38841
+ parsePTM(data, chnid) { let ic = this.icn3d, me = ic.icn3dui;
38842
+
38843
+ if(me.bNode) {
38844
+ //if(!ic.resid2ptm) ic.resid2ptm = {};
38845
+ ic.resid2ptm = {};
38846
+ ic.resid2ptm[chnid] = [];
38847
+ }
38848
+
38849
+ let ptmHash = {};
38850
+ for(let i = 0, il = data.features.length; i < il; ++i) {
38851
+ let feature = data.features[i];
38852
+
38853
+ if(feature.category == 'PTM' && feature.type != 'DISULFID' && feature.type != 'CROSSLNK') {
38854
+ let title = '';
38855
+ if(feature.type == 'CARBOHYD') {
38856
+ //title = 'Glycosylation, ' + feature.description;
38857
+ title = 'Glycosylation';
38858
+ }
38859
+ else if(feature.type == 'LIPID') {
38860
+ title = 'Lipidation, ' + feature.description;
38861
+ }
38862
+ else if(feature.description.indexOf('Phospho') == 0) {
38863
+ title = 'Phosphorylation';
38864
+ }
38865
+ else if(feature.description) {
38866
+ title = feature.description;
38867
+ }
38868
+ else {
38869
+ title = feature.type;
38870
+ }
38871
+
38872
+ if(!ptmHash[title]) ptmHash[title] = [];
38873
+ ptmHash[title].push(feature);
38874
+ }
38875
+ }
38876
+
38877
+ let index = 0;
38878
+ let html = '', html2 = '', html3 = '';
38879
+ html += '<div id="' + ic.pre + chnid + '_ptmseq_sequence" class="icn3d-cdd icn3d-dl_sequence">';
38880
+ html2 += html;
38881
+ html3 += html;
38882
+ let stucture = chnid.substr(0, chnid.indexOf('_'));
38883
+
38884
+ for(let ptm in ptmHash) {
38885
+ let ptmArray = ptmHash[ptm];
38886
+ //"type": "MOD_RES", "category": "PTM", "description": "4-hydroxyproline", "begin": "382", "end": "382",
38887
+ let resPosArray = [];
38888
+ let bCoordinates = false;
38889
+ for(let i = 0, il = ptmArray.length; i < il; ++i) {
38890
+ let begin = parseInt(ptmArray[i].begin);
38891
+ let end = parseInt(ptmArray[i].end);
38892
+
38893
+
38894
+ for(let j = begin; j <= end; ++j) {
38895
+ if(stucture.length > 5) { // UniProt
38896
+ resPosArray.push(j - 1); // 0-based
38897
+ }
38898
+ else { // PDB
38899
+ if(ic.UPResi2ResiPosPerChain[chnid][j]) resPosArray.push(ic.UPResi2ResiPosPerChain[chnid][j]);
38900
+ }
38901
+
38902
+ if(!bCoordinates && ic.residues.hasOwnProperty(chnid + '_' + j)) {
38903
+ bCoordinates = true;
38904
+ }
38905
+ }
38906
+ }
38907
+
38908
+ if(resPosArray.length == 0) continue;
38909
+
38910
+ let resCnt = resPosArray.length;
38911
+ let title = 'PTM: ' + ptm;
38912
+ if(title.length > 17) title = title.substr(0, 17) + '...';
38913
+ let fulltitle = ptm;
38914
+
38915
+ let linkStr = (bCoordinates) ? 'icn3d-link icn3d-blue' : '';
38916
+
38917
+ let htmlTmp2 = '<div class="icn3d-seqTitle ' + linkStr + '" ptm="ptm" posarray="' + resPosArray.toString() + '" shorttitle="' + title + '" setname="' + chnid + '_ptm_' + index + '" anno="sequence" chain="' + chnid + '" title="' + fulltitle + '">' + title + ' </div>';
38918
+ let htmlTmp3 = '<span class="icn3d-residueNum" title="residue count">' + resCnt.toString() + ' Res</span>';
38919
+ let htmlTmp = '<span class="icn3d-seqLine">';
38920
+ html3 += htmlTmp2 + htmlTmp3 + '<br>';
38921
+ html += htmlTmp2 + htmlTmp3 + htmlTmp;
38922
+ html2 += htmlTmp2 + htmlTmp3 + htmlTmp;
38923
+ let pre = 'ptm' + index.toString();
38924
+ //var widthPerRes = ic.seqAnnWidth / ic.maxAnnoLength;
38925
+ let prevEmptyWidth = 0;
38926
+ let prevLineWidth = 0;
38927
+ let widthPerRes = 1;
38928
+ for(let i = 0, il = ic.giSeq[chnid].length; i < il; ++i) {
38929
+ html += ic.showSeqCls.insertGap(chnid, i, '-');
38930
+ if(resPosArray.indexOf(i) != -1) {
38931
+ let cFull = ic.giSeq[chnid][i];
38932
+ let c = cFull;
38933
+ if(cFull.length > 1) {
38934
+ c = cFull[0] + '..';
38935
+ }
38936
+ let pos = ic.annoCddSiteCls.getAdjustedResi(i, chnid, ic.matchedPos, ic.chainsSeq, ic.baseResi);
38937
+
38938
+ html += '<span id="' + pre + '_' + ic.pre + chnid + '_' + pos + '" title="' + c + pos + '" class="icn3d-residue">' + cFull + '</span>';
38939
+ if(me.bNode) {
38940
+ let obj = {};
38941
+ obj[chnid + '_' + pos] = 'PTM: ' + ptm;
38942
+ ic.resid2ptm[chnid].push(obj);
38943
+ }
38944
+
38945
+ html2 += ic.showSeqCls.insertGapOverview(chnid, i);
38946
+ let emptyWidth =(me.cfg.blast_rep_id == chnid) ? Math.round(ic.seqAnnWidth * i /(ic.maxAnnoLength + ic.nTotalGap) - prevEmptyWidth - prevLineWidth) : Math.round(ic.seqAnnWidth * i / ic.maxAnnoLength - prevEmptyWidth - prevLineWidth);
38947
+ //if(emptyWidth < 0) emptyWidth = 0;
38948
+ if(emptyWidth >= 0) {
38949
+ html2 += '<div style="display:inline-block; width:' + emptyWidth + 'px;">&nbsp;</div>';
38950
+ html2 += '<div style="display:inline-block; background-color:#000; width:' + widthPerRes + 'px;" title="' + c + pos + '">&nbsp;</div>';
38951
+ prevEmptyWidth += emptyWidth;
38952
+ prevLineWidth += widthPerRes;
38953
+ }
38954
+ }
38955
+ else {
38956
+ html += '<span>-</span>'; //'<span>-</span>';
38957
+ }
38958
+ }
38959
+ htmlTmp = '<span class="icn3d-residueNum" title="residue count">&nbsp;' + resCnt.toString() + ' Residues</span>';
38960
+ htmlTmp += '</span>';
38961
+ htmlTmp += '<br>';
38962
+ html += htmlTmp;
38963
+ html2 += htmlTmp;
38964
+
38965
+ ++index;
38966
+ }
38967
+
38968
+ html += '</div>';
38969
+ html2 += '</div>';
38970
+ html3 += '</div>';
38971
+
38972
+ $("#" + ic.pre + "dt_ptm_" + chnid).html(html);
38973
+ $("#" + ic.pre + "ov_ptm_" + chnid).html(html2);
38974
+ $("#" + ic.pre + "tt_ptm_" + chnid).html(html3);
38975
+
38976
+ // add here after the ajax call
38977
+ ic.showAnnoCls.enableHlSeq();
38978
+ ic.bAjaxPTM = true;
38979
+ }
38980
+
38981
+ getNoPTM(chnid) { let ic = this.icn3d; ic.icn3dui;
38982
+ console.log( "No PTM data were found for the chain " + chnid + "..." );
38983
+
38984
+ $("#" + ic.pre + "dt_ptm_" + chnid).html('');
38985
+ $("#" + ic.pre + "ov_ptm_" + chnid).html('');
38986
+ $("#" + ic.pre + "tt_ptm_" + chnid).html('');
38987
+
38988
+ // add here after the ajax call
38989
+ ic.showAnnoCls.enableHlSeq();
38990
+ ic.bAjaxPTM = true;
38991
+ if(ic.deferredPTM !== undefined) ic.deferredPTM.resolve();
38992
+ }
38993
+ }
38994
+
38655
38995
  /**
38656
38996
  * @author Jiyao Wang <wangjiy@ncbi.nlm.nih.gov> / https://github.com/ncbi/icn3d
38657
38997
  */
@@ -39968,7 +40308,8 @@ class Annotation {
39968
40308
  this.setAnnoSeqBase(false);
39969
40309
  }
39970
40310
  setAnnoSeqBase(bShow) { let ic = this.icn3d; ic.icn3dui;
39971
- let itemArray = ['site', 'snp', 'clinvar', 'cdd', 'domain', 'interaction', 'ssbond', 'crosslink', 'transmem'];
40311
+ //let itemArray = ['site', 'ptm', 'snp', 'clinvar', 'cdd', 'domain', 'interaction', 'ssbond', 'crosslink', 'transmem'];
40312
+ let itemArray = ['cdd', 'clinvar', 'snp', 'site', 'ptm', 'ssbond', 'crosslink', 'transmem', 'domain', 'interaction'];
39972
40313
  for(let i in itemArray) {
39973
40314
  let item = itemArray[i];
39974
40315
  if(bShow) {
@@ -39980,7 +40321,8 @@ class Annotation {
39980
40321
  }
39981
40322
  }
39982
40323
  setAnnoTabBase(bChecked) { let ic = this.icn3d; ic.icn3dui;
39983
- let itemArray = ['all', 'binding', 'snp', 'clinvar', 'cdd', '3dd', 'interact', 'custom', 'ssbond', 'crosslink', 'transmem'];
40324
+ //let itemArray = ['all', 'binding', 'ptm', 'snp', 'clinvar', 'cdd', '3dd', 'interact', 'custom', 'ssbond', 'crosslink', 'transmem'];
40325
+ let itemArray = ['all', 'cdd', 'clinvar', 'snp', 'binding', 'ptm', 'ssbond', 'crosslink', 'transmem', '3dd', 'custom', 'interact'];
39984
40326
  for(let i in itemArray) {
39985
40327
  let item = itemArray[i];
39986
40328
  if($("#" + ic.pre + "anno_" + item).length) $("#" + ic.pre + "anno_" + item)[0].checked = bChecked;
@@ -39992,10 +40334,11 @@ class Annotation {
39992
40334
  this.updateClinvar();
39993
40335
  this.updateSnp();
39994
40336
  this.updateDomain();
39995
- this.updateInteraction();
40337
+ this.updatePTM();
39996
40338
  this.updateSsbond();
39997
40339
  this.updateCrosslink();
39998
40340
  this.updateTransmem();
40341
+ this.updateInteraction();
39999
40342
  }
40000
40343
  hideAnnoTabAll() { let ic = this.icn3d; ic.icn3dui;
40001
40344
  this.setAnnoTabBase(false);
@@ -40048,6 +40391,11 @@ class Annotation {
40048
40391
  ic.bInteractionShown = false;
40049
40392
  this.updateInteraction();
40050
40393
  }
40394
+ if($("#" + ic.pre + "anno_ptm").length && $("#" + ic.pre + "anno_ptm")[0].checked) {
40395
+ $("[id^=" + ic.pre + "ptm]").show();
40396
+ ic.bPTMShown = false;
40397
+ this.updatePTM();
40398
+ }
40051
40399
  if($("#" + ic.pre + "anno_custom").length && $("#" + ic.pre + "anno_custom")[0].checked) {
40052
40400
  $("[id^=" + ic.pre + "custom]").show();
40053
40401
  }
@@ -40129,6 +40477,15 @@ class Annotation {
40129
40477
  $("[id^=" + ic.pre + "interaction]").hide();
40130
40478
  if($("#" + ic.pre + "anno_interact").length) $("#" + ic.pre + "anno_interact")[0].checked = false;
40131
40479
  }
40480
+ setAnnoTabPTM() { let ic = this.icn3d; ic.icn3dui;
40481
+ $("[id^=" + ic.pre + "ptm]").show();
40482
+ if($("#" + ic.pre + "anno_ptm").length) $("#" + ic.pre + "anno_ptm")[0].checked = true;
40483
+ this.updatePTM();
40484
+ }
40485
+ hideAnnoTabPTM() { let ic = this.icn3d; ic.icn3dui;
40486
+ $("[id^=" + ic.pre + "ptm]").hide();
40487
+ if($("#" + ic.pre + "anno_ptm").length) $("#" + ic.pre + "anno_ptm")[0].checked = false;
40488
+ }
40132
40489
  setAnnoTabSsbond() { let ic = this.icn3d; ic.icn3dui;
40133
40490
  $("[id^=" + ic.pre + "ssbond]").show();
40134
40491
  if($("#" + ic.pre + "anno_ssbond").length) $("#" + ic.pre + "anno_ssbond")[0].checked = true;
@@ -40240,6 +40597,17 @@ class Annotation {
40240
40597
  }
40241
40598
  });
40242
40599
 
40600
+ me.myEventCls.onIds("#" + ic.pre + "anno_ptm", "click", function(e) {
40601
+ if($("#" + ic.pre + "anno_ptm")[0].checked) {
40602
+ thisClass.setAnnoTabPTM();
40603
+ me.htmlCls.clickMenuCls.setLogCmd("set annotation ptm", true);
40604
+ }
40605
+ else {
40606
+ thisClass.hideAnnoTabPTM();
40607
+ me.htmlCls.clickMenuCls.setLogCmd("hide annotation ptm", true);
40608
+ }
40609
+ });
40610
+
40243
40611
  //$("#" + ic.pre + "anno_custom", "click", function(e) {
40244
40612
  me.myEventCls.onIds("#" + ic.pre + "anno_custom", "click", function(e) {
40245
40613
  if($("#" + ic.pre + "anno_custom")[0].checked) {
@@ -40335,7 +40703,7 @@ class Annotation {
40335
40703
  }
40336
40704
  }
40337
40705
  setAnnoDisplay(display, prefix) { let ic = this.icn3d; ic.icn3dui;
40338
- let itemArray = ['giseq', 'custom', 'site', 'snp', 'clinvar', 'cdd', 'domain', 'interaction', 'ssbond', 'crosslink', 'transmem'];
40706
+ let itemArray = ['giseq', 'custom', 'site', 'ptm', 'snp', 'clinvar', 'cdd', 'domain', 'interaction', 'ssbond', 'crosslink', 'transmem'];
40339
40707
  for(let i in itemArray) {
40340
40708
  let item = itemArray[i];
40341
40709
  $("[id^=" + ic.pre + prefix + "_" + item + "]").attr('style', display);
@@ -40406,6 +40774,15 @@ class Annotation {
40406
40774
  }
40407
40775
  ic.bInteractionShown = true;
40408
40776
  }
40777
+ updatePTM() { let ic = this.icn3d; ic.icn3dui;
40778
+ if(ic.bPTMShown === undefined || !ic.bPTMShown) {
40779
+ for(let chainid in ic.PTMChainbase) {
40780
+ let chainidBase = ic.PTMChainbase[chainid];
40781
+ ic.annoPTMCls.showPTM(chainid, chainidBase);
40782
+ }
40783
+ }
40784
+ ic.bPTMShown = true;
40785
+ }
40409
40786
  updateSsbond() { let ic = this.icn3d; ic.icn3dui;
40410
40787
  if(ic.bSSbondShown === undefined || !ic.bSSbondShown) {
40411
40788
  for(let chainid in ic.ssbondChainbase) {
@@ -56695,7 +57072,7 @@ class SetMenu {
56695
57072
 
56696
57073
  html += "<ul class='icn3d-mn-item'>";
56697
57074
 
56698
- html += "<li><span style='padding-left:1.5em;'>Unicolor</span>";
57075
+ html += "<li><span style='padding-left:1.5em!important;'>Unicolor</span>";
56699
57076
  html += "<ul>";
56700
57077
 
56701
57078
  html += "<li><span>Red</span>";
@@ -56902,7 +57279,7 @@ class SetMenu {
56902
57279
 
56903
57280
  if(me.cfg.cid === undefined) {
56904
57281
  //html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrRainbow', 'Rainbow (R-V)');
56905
- html += "<li><span style='padding-left:1.5em;'>Rainbow (R-V)</span>";
57282
+ html += "<li><span style='padding-left:1.5em!important;'>Rainbow (R-V)</span>";
56906
57283
  html += "<ul>";
56907
57284
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrRainbow', 'for Selection');
56908
57285
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrRainbowChain', 'for Chains');
@@ -56911,7 +57288,7 @@ class SetMenu {
56911
57288
 
56912
57289
  if(!me.cfg.simplemenu) {
56913
57290
  //html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrSpectrum', 'Spectrum (V-R)');
56914
- html += "<li><span style='padding-left:1.5em;'>Spectrum (V-R)</span>";
57291
+ html += "<li><span style='padding-left:1.5em!important;'>Spectrum (V-R)</span>";
56915
57292
  html += "<ul>";
56916
57293
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrSpectrum', 'for Selection');
56917
57294
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrSpectrumChain', 'for Chains');
@@ -56919,7 +57296,7 @@ class SetMenu {
56919
57296
  html += "</ul>";
56920
57297
  }
56921
57298
 
56922
- html += "<li><span style='padding-left:1.5em;'>Secondary</span>";
57299
+ html += "<li><span style='padding-left:1.5em!important;'>Secondary</span>";
56923
57300
  html += "<ul>";
56924
57301
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrSSGreen', 'Sheet in Green');
56925
57302
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrSSYellow', 'Sheet in Yellow');
@@ -56934,13 +57311,13 @@ class SetMenu {
56934
57311
 
56935
57312
  //html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrHydrophobic', 'Wimley-White<br><span style="padding-left:1.5em;">Hydrophobicity</span>');
56936
57313
 
56937
- html += "<li><span style='padding-left:1.5em;'>Hydrophobicity</span>";
57314
+ html += "<li><span style='padding-left:1.5em!important;'>Hydrophobicity</span>";
56938
57315
  html += "<ul>";
56939
57316
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrNormalizedHP', 'Normalized');
56940
57317
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrHydrophobic', 'Wimley-White');
56941
57318
  html += "</ul>";
56942
57319
 
56943
- html += "<li><span style='padding-left:1.5em;'>B-factor</span>";
57320
+ html += "<li><span style='padding-left:1.5em!important;'>B-factor</span>";
56944
57321
  html += "<ul>";
56945
57322
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrBfactor', 'Original');
56946
57323
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrBfactorNorm', 'Percentile');
@@ -56963,7 +57340,7 @@ class SetMenu {
56963
57340
 
56964
57341
  if(me.cfg.cid === undefined) {
56965
57342
  if(!me.cfg.simplemenu) {
56966
- html += "<li><span style='padding-left:1.5em;'>Defined Sets</span>";
57343
+ html += "<li><span style='padding-left:1.5em!important;'>Defined Sets</span>";
56967
57344
  html += "<ul>";
56968
57345
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrsets', 'Rainbow for Selected Sets<br>in "Analysis > Defined Sets"');
56969
57346
  html += "</ul>";
@@ -56972,7 +57349,7 @@ class SetMenu {
56972
57349
 
56973
57350
  //html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrResidue', 'Residue');
56974
57351
 
56975
- html += "<li><span style='padding-left:1.5em;'>Residue</span>";
57352
+ html += "<li><span style='padding-left:1.5em!important;'>Residue</span>";
56976
57353
  html += "<ul>";
56977
57354
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrResidue', 'Default');
56978
57355
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrResidueCustom', 'Custom');
@@ -59034,10 +59411,17 @@ class SetDialog {
59034
59411
  html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_custom'>Custom" + me.htmlCls.space2 + "</span></td>";
59035
59412
  html += tmpStr2 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_3dd'>3D Domains" + me.htmlCls.space2 + "</span></td>";
59036
59413
  html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_snp'>SNPs" + me.htmlCls.space2 + "</span></td>";
59037
- html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_interact'>Interactions" + me.htmlCls.space2 + "</span></td>";
59414
+
59415
+ // if(me.cfg.mmdbid != undefined || me.cfg.pdbid != undefined || me.cfg.mmtfid != undefined || me.cfg.mmcifid != undefined) { // PDB
59416
+ // html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_ptm' disabled>PTM (UniProt)" + me.htmlCls.space2 + "</span></td>";
59417
+ // }
59418
+ // else {
59419
+ html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_ptm'>PTM (UniProt)" + me.htmlCls.space2 + "</span></td>";
59420
+ // }
59038
59421
  html += "<td></td>";
59039
59422
  html += "</tr><tr>";
59040
59423
  html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_ssbond'>Disulfide Bonds" + me.htmlCls.space2 + "</span></td>";
59424
+ html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_interact'>Interactions" + me.htmlCls.space2 + "</span></td>";
59041
59425
  html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_crosslink'>Cross-Linkages" + me.htmlCls.space2 + "</span></td>";
59042
59426
  if(me.cfg.opmid !== undefined) {
59043
59427
  html += "<td style='min-width:110px;'><span id='" + me.pre + "anno_transmemli' style='white-space:nowrap'>" + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_transmem'>Transmembrane" + me.htmlCls.space2 + "</span></td>";
@@ -59414,10 +59798,7 @@ class Events {
59414
59798
  ic.hAtoms = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
59415
59799
  }
59416
59800
 
59417
- // save the current selection
59418
- //ic.selectionCls.saveSelectionPrep();
59419
- //let name = 'realignSetsByStruct';
59420
- //ic.selectionCls.saveSelection(name, name);
59801
+ me.cfg.aligntool = 'vast';
59421
59802
 
59422
59803
  ic.realignParserCls.realignOnStructAlign();
59423
59804
  if(nameArray.length > 0) {
@@ -65879,6 +66260,7 @@ class iCn3D {
65879
66260
 
65880
66261
  this.annoCddSiteCls = new AnnoCddSite(this);
65881
66262
  this.annoContactCls = new AnnoContact(this);
66263
+ this.annoPTMCls = new AnnoPTM(this);
65882
66264
  this.annoCrossLinkCls = new AnnoCrossLink(this);
65883
66265
  this.annoDomainCls = new AnnoDomain(this);
65884
66266
  this.annoSnpClinVarCls = new AnnoSnpClinVar(this);
@@ -66143,7 +66525,7 @@ class iCn3DUI {
66143
66525
  //even when multiple iCn3D viewers are shown together.
66144
66526
  this.pre = this.cfg.divid + "_";
66145
66527
 
66146
- this.REVISION = '3.13.2';
66528
+ this.REVISION = '3.14.0';
66147
66529
 
66148
66530
  // In nodejs, iCn3D defines "window = {navigator: {}}"
66149
66531
  this.bNode = (Object.keys(window).length < 2) ? true : false;