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.module.js CHANGED
@@ -28474,6 +28474,24 @@ class LoadScript {
28474
28474
 
28475
28475
  return;
28476
28476
  }
28477
+ else if(ic.commands[i].trim().indexOf('set annotation ptm') == 0 ) { // the command may have "|||{"factor"...
28478
+ let strArray = ic.commands[i].split("|||");
28479
+
28480
+ if(Object.keys(ic.proteins).length > 0 &&(ic.bAjaxPTM === undefined || !ic.bAjaxPTM) ) {
28481
+ $.when(thisClass.applyCommandPTM(strArray[0].trim())).then(function() {
28482
+ thisClass.execCommandsBase(i + 1, end, steps);
28483
+ });
28484
+ }
28485
+ else {
28486
+ if(Object.keys(ic.proteins).length > 0) {
28487
+ thisClass.applyCommandPTM(strArray[0].trim());
28488
+ }
28489
+
28490
+ this.execCommandsBase(i + 1, end, steps);
28491
+ }
28492
+
28493
+ return;
28494
+ }
28477
28495
  else if(ic.commands[i].trim().indexOf('set annotation 3ddomain') == 0) { // the command may have "|||{"factor"...
28478
28496
  let strArray = ic.commands[i].split("|||");
28479
28497
 
@@ -28704,6 +28722,8 @@ class LoadScript {
28704
28722
  ic.hAtoms = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
28705
28723
  }
28706
28724
 
28725
+ me.cfg.aligntool = 'vast';
28726
+
28707
28727
  $.when(thisClass.applyCommandRealignByStruct(command)).then(function() {
28708
28728
  thisClass.execCommandsBase(i + 1, end, steps);
28709
28729
  });
@@ -28864,6 +28884,9 @@ class LoadScript {
28864
28884
  else if(lastCommand.indexOf('set annotation snp') == 0) {
28865
28885
  thisClass.applyCommandSnp(lastCommand);
28866
28886
  }
28887
+ else if(lastCommand.indexOf('set annotation ptm') == 0) {
28888
+ thisClass.applyCommandPTM(lastCommand);
28889
+ }
28867
28890
  else if(lastCommand.indexOf('set annotation 3ddomain') == 0) {
28868
28891
  thisClass.applyCommand3ddomain(lastCommand);
28869
28892
  }
@@ -28914,6 +28937,9 @@ class LoadScript {
28914
28937
  let nameArray = paraArray[1].split(',');
28915
28938
  ic.hAtoms = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
28916
28939
  }
28940
+
28941
+ me.cfg.aligntool = 'vast';
28942
+
28917
28943
  thisClass.applyCommandRealignByStruct(lastCommand);
28918
28944
  }
28919
28945
  else if(lastCommand.indexOf('realign on tmalign') == 0) {
@@ -29319,6 +29345,25 @@ class LoadScript {
29319
29345
  return ic.deferredSnp.promise();
29320
29346
  }
29321
29347
 
29348
+ applyCommandPTMBase(command) { let ic = this.icn3d; ic.icn3dui;
29349
+ // chain functions together
29350
+ let pos = command.lastIndexOf(' '); // set annotation clinvar
29351
+ command.substr(pos + 1);
29352
+
29353
+ ic.annotationCls.setAnnoTabPTM();
29354
+ }
29355
+
29356
+ applyCommandPTM(command) { let ic = this.icn3d; ic.icn3dui;
29357
+ let thisClass = this;
29358
+
29359
+ // chain functions together
29360
+ ic.deferredPTM = $.Deferred(function() {
29361
+ thisClass.applyCommandPTMBase(command);
29362
+ }); // end of me.deferred = $.Deferred(function() {
29363
+
29364
+ return ic.deferredPTM.promise();
29365
+ }
29366
+
29322
29367
  applyCommand3ddomainBase(command) { let ic = this.icn3d; ic.icn3dui;
29323
29368
  // chain functions together
29324
29369
  let pos = command.lastIndexOf(' ');
@@ -30860,7 +30905,8 @@ class ShowSeq {
30860
30905
  if(seqLength > ic.maxAnnoLength) {
30861
30906
  ic.maxAnnoLength = seqLength;
30862
30907
  }
30863
- let itemArray = ['giseq', 'cddsite', 'clinvar', 'snp', 'domain', 'interaction', 'custom', 'ssbond', 'crosslink', 'transmem'];
30908
+ //let itemArray = ['giseq', 'cddsite', 'ptm', 'clinvar', 'snp', 'domain', 'interaction', 'custom', 'ssbond', 'crosslink', 'transmem'];
30909
+ let itemArray = ['giseq', 'cddsite', 'clinvar', 'snp', 'ptm', 'ssbond', 'crosslink', 'transmem', 'domain', 'custom', 'interaction'];
30864
30910
  for(let i in itemArray) {
30865
30911
  let item = itemArray[i];
30866
30912
  if($("#" + ic.pre + item + "_" + chnid).length) $("#" + ic.pre + item + "_" + chnid).width(divLength);
@@ -33822,6 +33868,9 @@ class ApplyCommand {
33822
33868
  else if(command == 'set annotation interaction') {
33823
33869
  ic.annotationCls.setAnnoTabInteraction();
33824
33870
  }
33871
+ else if(command == 'set annotation ptm') {
33872
+ ic.annotationCls.setAnnoTabPTM();
33873
+ }
33825
33874
  else if(command == 'set annotation cdd') {
33826
33875
  ic.annotationCls.setAnnoTabCdd();
33827
33876
  }
@@ -33868,6 +33917,9 @@ class ApplyCommand {
33868
33917
  else if(type == 'site') {
33869
33918
  ic.annotationCls.hideAnnoTabSite();
33870
33919
  }
33920
+ else if(type == 'ptm') {
33921
+ ic.annotationCls.hideAnnoTabPTM();
33922
+ }
33871
33923
  else if(type == 'interaction') {
33872
33924
  ic.annotationCls.hideAnnoTabInteraction();
33873
33925
  }
@@ -35066,6 +35118,7 @@ class ApplyCommand {
35066
35118
  else if(cmd== 'set view overview') return seqAnnoStr + ': "Summary" tab';
35067
35119
  else if(cmd == 'set annotation custom') return seqAnnoStr + ': "Custom" checkbox';
35068
35120
  else if(cmd == 'set annotation interaction') return seqAnnoStr + ': "Interactions" checkbox';
35121
+ else if(cmd == 'set annotation ptm') return seqAnnoStr + ': "PTM" checkbox';
35069
35122
  else if(cmd == 'set annotation cdd') return seqAnnoStr + ': "Conserved Domains" checkbox';
35070
35123
  else if(cmd == 'set annotation site') return seqAnnoStr + ': "Functional Sites" checkbox';
35071
35124
  else if(cmd == 'set annotation ssbond') return seqAnnoStr + ': "Disulfide Bonds" checkbox';
@@ -36368,7 +36421,8 @@ class SetSeqAlign {
36368
36421
  if(i > 0) {
36369
36422
  let index1 = alignIndex;
36370
36423
  for(let j = prevIndex1 + 1, jl = start1; j < jl; ++j) {
36371
- if(ic.chainsSeq[chainid1] === undefined) break;
36424
+ if(ic.chainsSeq[chainid1] === undefined || ic.chainsSeq[chainid1][j] === undefined) break;
36425
+
36372
36426
  let resi = ic.chainsSeq[chainid1][j].resi;
36373
36427
  let resn = ic.chainsSeq[chainid1][j].name.toLowerCase();
36374
36428
 
@@ -36382,7 +36436,8 @@ class SetSeqAlign {
36382
36436
 
36383
36437
  let index2 = alignIndex;
36384
36438
  for(let j = prevIndex2 + 1, jl = start2; j < jl; ++j) {
36385
- if(ic.chainsSeq[chainid2] === undefined) break;
36439
+ if(ic.chainsSeq[chainid2] === undefined || ic.chainsSeq[chainid2] === undefined) break;
36440
+
36386
36441
  let resi = ic.chainsSeq[chainid2][j].resi;
36387
36442
  let resn = ic.chainsSeq[chainid2][j].name.toLowerCase();
36388
36443
 
@@ -38332,8 +38387,8 @@ class HlSeq {
38332
38387
  if(me.bNode) return;
38333
38388
 
38334
38389
  let thisClass = this;
38335
- $("#" + 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]")
38336
- .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]")
38390
+ $("#" + 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]")
38391
+ .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]")
38337
38392
  .selectable({
38338
38393
  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.
38339
38394
  stop: function() { let ic = thisClass.icn3d;
@@ -38386,11 +38441,11 @@ class HlSeq {
38386
38441
  }
38387
38442
  });
38388
38443
 
38389
- $("[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]")
38390
- .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]")
38444
+ $("[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]")
38445
+ .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]")
38391
38446
 
38392
- .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]")
38393
- .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]")
38447
+ .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]")
38448
+ .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]")
38394
38449
 
38395
38450
  .on('click', '.icn3d-seqTitle', function(e) { let ic = thisClass.icn3d;
38396
38451
  e.stopImmediatePropagation();
@@ -38431,7 +38486,7 @@ class HlSeq {
38431
38486
 
38432
38487
  let thisClass = this;
38433
38488
 
38434
- $("#" + 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;
38489
+ $("#" + 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;
38435
38490
  e.stopImmediatePropagation();
38436
38491
  /*
38437
38492
  //if($(this).attr('id') === ic.pre + "dl_sequence2") {
@@ -38480,7 +38535,7 @@ class HlSeq {
38480
38535
 
38481
38536
  let thisClass = this;
38482
38537
 
38483
- $("#" + 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;
38538
+ $("#" + 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;
38484
38539
  e.stopImmediatePropagation();
38485
38540
 
38486
38541
  //if($(this).attr('id') === ic.pre + "dl_sequence2") {
@@ -38677,7 +38732,7 @@ class HlSeq {
38677
38732
  let residueid;
38678
38733
  let structure = chainid.substr(0, chainid.indexOf('_'));
38679
38734
  for(let i = 0, il = posArray.length; i < il; ++i) {
38680
- if($(that).attr('site') !== undefined) {
38735
+ if($(that).attr('site') !== undefined || $(that).attr('ptm') !== undefined) {
38681
38736
  if(ic.bNCBI) {
38682
38737
  let residNCBI = chainid + '_' +(parseInt(posArray[i])+1).toString();
38683
38738
  // AlphaFold domains calculated on-the-fly have no conversion
@@ -39079,6 +39134,8 @@ class ShowAnno {
39079
39134
  ++i;
39080
39135
  }
39081
39136
  ic.interactChainbase = me.hashUtilsCls.unionHash(ic.interactChainbase, chemical_chainid);
39137
+ ic.PTMChainbase = me.hashUtilsCls.unionHash(ic.PTMChainbase, ic.protein_chainid);
39138
+
39082
39139
  ic.ssbondChainbase = me.hashUtilsCls.unionHash(ic.ssbondChainbase, ic.protein_chainid);
39083
39140
  ic.ssbondChainbase = me.hashUtilsCls.unionHash(ic.ssbondChainbase, chemical_chainid);
39084
39141
  ic.crosslinkChainbase = me.hashUtilsCls.unionHash(ic.crosslinkChainbase, ic.protein_chainid);
@@ -39110,8 +39167,10 @@ class ShowAnno {
39110
39167
  //if(proteinName.length > 40) proteinName = proteinName.substr(0, 40) + "...";
39111
39168
  let categoryStr =(index == 0) ? "<span class='icn3d-annoLargeTitle'><b>Proteins</b>: </span><br><br>" : "";
39112
39169
  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>)" : '';
39170
+ let structure = chnid.substr(0, chnid.indexOf('_'));
39171
+ let chainLink = (structure.length > 5) ? '<a href="https://alphafold.ebi.ac.uk/entry/' + structure + '" target="_blank">' + chnid + '</a>' : chnid;
39113
39172
  let chainHtml = "<div id='" + ic.pre + "anno_" + chnid + "' class='icn3d-annotation'>" + categoryStr
39114
- + "<span style='font-weight:bold;'>Annotations of " + chnid
39173
+ + "<span style='font-weight:bold;'>Annotations of " + chainLink
39115
39174
  + "</span>: <a class='icn3d-blue' href='https://www.ncbi.nlm.nih.gov/protein?term="
39116
39175
  + chnid + "' target='_blank' title='" + fullProteinName + "'>" + proteinName + "</a>"
39117
39176
  + geneLink + "&nbsp;&nbsp;&nbsp;"
@@ -39124,7 +39183,8 @@ class ShowAnno {
39124
39183
  + 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;"
39125
39184
  + 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);
39126
39185
  $("#" + ic.pre + "dl_annotations").append(chainHtml);
39127
- let itemArray = ['giseq', 'cdd', 'clinvar', 'snp', 'domain', 'site', 'interaction', 'custom', 'ssbond', 'crosslink', 'transmem'];
39186
+ //let itemArray = ['giseq', 'cdd', 'clinvar', 'snp', 'domain', 'site', 'ptm', 'interaction', 'custom', 'ssbond', 'crosslink', 'transmem'];
39187
+ let itemArray = ['giseq', 'cdd', 'clinvar', 'snp', 'site', 'ptm', 'ssbond', 'crosslink', 'transmem', 'domain', 'custom', 'interaction'];
39128
39188
  // dt: detailed view, hide by default; ov: overview, show by default
39129
39189
  for(let i in itemArray) {
39130
39190
  let item = itemArray[i];
@@ -39552,6 +39612,286 @@ class ShowAnno {
39552
39612
 
39553
39613
  }
39554
39614
 
39615
+ /**
39616
+ * @author Jiyao Wang <wangjiy@ncbi.nlm.nih.gov> / https://github.com/ncbi/icn3d
39617
+ */
39618
+
39619
+ class AnnoPTM {
39620
+ constructor(icn3d) {
39621
+ this.icn3d = icn3d;
39622
+ }
39623
+
39624
+ //Show the annotations of CDD domains and binding sites.
39625
+ showPTM(chnid, chnidBase) { let ic = this.icn3d; ic.icn3dui;
39626
+ let thisClass = this;
39627
+
39628
+ // UniProt ID
39629
+ let structure = chnid.substr(0, chnid.indexOf('_'));
39630
+ let chain = chnid.substr(chnid.indexOf('_') + 1);
39631
+
39632
+ // UniProt ID
39633
+ if( structure.length > 5 ) {
39634
+ let url = "https://www.ebi.ac.uk/proteins/api/features/" + structure;
39635
+ $.ajax({
39636
+ url: url,
39637
+ dataType: 'json',
39638
+ cache: true,
39639
+ tryCount : 0,
39640
+ retryLimit : 0, //1
39641
+ success: function(data) {
39642
+ thisClass.parsePTM(data, chnid);
39643
+ if(ic.deferredPTM !== undefined) ic.deferredPTM.resolve();
39644
+ },
39645
+ error : function(xhr, textStatus, errorThrown ) {
39646
+ this.tryCount++;
39647
+ if(this.tryCount <= this.retryLimit) {
39648
+ //try again
39649
+ $.ajax(this);
39650
+ return;
39651
+ }
39652
+
39653
+ thisClass.getNoPTM(chnid);
39654
+
39655
+ return;
39656
+ }
39657
+ });
39658
+ }
39659
+ else { // PDB
39660
+ // get PDB to UniProt mapping
39661
+ // https://www.ebi.ac.uk/pdbe/api/doc/
39662
+ let structLower = structure.substr(0, 4).toLowerCase();
39663
+ let urlMap = "https://www.ebi.ac.uk/pdbe/api/mappings/uniprot/" + structLower;
39664
+
39665
+ $.ajax({
39666
+ url: urlMap,
39667
+ dataType: 'json',
39668
+ cache: true,
39669
+ success: function(dataMap) {
39670
+ let UniProtID = '';
39671
+ if(!ic.UPResi2ResiPosPerChain) ic.UPResi2ResiPosPerChain = {};
39672
+ ic.UPResi2ResiPosPerChain[chnid] = {};
39673
+ let mapping = dataMap[structLower].UniProt;
39674
+
39675
+ let bFound = false;
39676
+ for(let up in mapping) {
39677
+ let chainArray = mapping[up].mappings;
39678
+ if(bFound) break;
39679
+
39680
+ for(let i = 0, il = chainArray.length; i < il; ++i) {
39681
+ //"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"
39682
+ let chainObj = chainArray[i];
39683
+ if(chainObj.chain_id == chain) {
39684
+ let start = chainObj.unp_start;
39685
+ let end = chainObj.unp_end;
39686
+ let posStart = chainObj.start.residue_number;
39687
+ let posEnd = chainObj.end.residue_number;
39688
+
39689
+ if(posEnd - posStart != end - start) {
39690
+ console.log("There might be some issues in the PDB to UniProt residue mapping.");
39691
+ }
39692
+
39693
+ for(let j = 0; j <= end - start; ++j) {
39694
+ ic.UPResi2ResiPosPerChain[chnid][j + start] = j + posStart - 1; // 0-based
39695
+ }
39696
+
39697
+ UniProtID = up;
39698
+ bFound = true;
39699
+ break;
39700
+ }
39701
+ }
39702
+ }
39703
+
39704
+ if(UniProtID == '') {
39705
+ thisClass.getNoPTM(chnid);
39706
+ }
39707
+ else {
39708
+ let url = "https://www.ebi.ac.uk/proteins/api/features/" + UniProtID;
39709
+ $.ajax({
39710
+ url: url,
39711
+ dataType: 'json',
39712
+ cache: true,
39713
+ tryCount : 0,
39714
+ retryLimit : 0, //1
39715
+ success: function(data) {
39716
+ thisClass.parsePTM(data, chnid);
39717
+ if(ic.deferredPTM !== undefined) ic.deferredPTM.resolve();
39718
+ },
39719
+ error : function(xhr, textStatus, errorThrown ) {
39720
+ this.tryCount++;
39721
+ if(this.tryCount <= this.retryLimit) {
39722
+ //try again
39723
+ $.ajax(this);
39724
+ return;
39725
+ }
39726
+
39727
+ thisClass.getNoPTM(chnid);
39728
+
39729
+ return;
39730
+ }
39731
+ });
39732
+ }
39733
+ },
39734
+ error : function(xhr, textStatus, errorThrown ) {
39735
+ thisClass.getNoPTM(chnid);
39736
+ }
39737
+ });
39738
+ }
39739
+ }
39740
+
39741
+ parsePTM(data, chnid) { let ic = this.icn3d, me = ic.icn3dui;
39742
+
39743
+ if(me.bNode) {
39744
+ //if(!ic.resid2ptm) ic.resid2ptm = {};
39745
+ ic.resid2ptm = {};
39746
+ ic.resid2ptm[chnid] = [];
39747
+ }
39748
+
39749
+ let ptmHash = {};
39750
+ for(let i = 0, il = data.features.length; i < il; ++i) {
39751
+ let feature = data.features[i];
39752
+
39753
+ if(feature.category == 'PTM' && feature.type != 'DISULFID' && feature.type != 'CROSSLNK') {
39754
+ let title = '';
39755
+ if(feature.type == 'CARBOHYD') {
39756
+ //title = 'Glycosylation, ' + feature.description;
39757
+ title = 'Glycosylation';
39758
+ }
39759
+ else if(feature.type == 'LIPID') {
39760
+ title = 'Lipidation, ' + feature.description;
39761
+ }
39762
+ else if(feature.description.indexOf('Phospho') == 0) {
39763
+ title = 'Phosphorylation';
39764
+ }
39765
+ else if(feature.description) {
39766
+ title = feature.description;
39767
+ }
39768
+ else {
39769
+ title = feature.type;
39770
+ }
39771
+
39772
+ if(!ptmHash[title]) ptmHash[title] = [];
39773
+ ptmHash[title].push(feature);
39774
+ }
39775
+ }
39776
+
39777
+ let index = 0;
39778
+ let html = '', html2 = '', html3 = '';
39779
+ html += '<div id="' + ic.pre + chnid + '_ptmseq_sequence" class="icn3d-cdd icn3d-dl_sequence">';
39780
+ html2 += html;
39781
+ html3 += html;
39782
+ let stucture = chnid.substr(0, chnid.indexOf('_'));
39783
+
39784
+ for(let ptm in ptmHash) {
39785
+ let ptmArray = ptmHash[ptm];
39786
+ //"type": "MOD_RES", "category": "PTM", "description": "4-hydroxyproline", "begin": "382", "end": "382",
39787
+ let resPosArray = [];
39788
+ let bCoordinates = false;
39789
+ for(let i = 0, il = ptmArray.length; i < il; ++i) {
39790
+ let begin = parseInt(ptmArray[i].begin);
39791
+ let end = parseInt(ptmArray[i].end);
39792
+
39793
+
39794
+ for(let j = begin; j <= end; ++j) {
39795
+ if(stucture.length > 5) { // UniProt
39796
+ resPosArray.push(j - 1); // 0-based
39797
+ }
39798
+ else { // PDB
39799
+ if(ic.UPResi2ResiPosPerChain[chnid][j]) resPosArray.push(ic.UPResi2ResiPosPerChain[chnid][j]);
39800
+ }
39801
+
39802
+ if(!bCoordinates && ic.residues.hasOwnProperty(chnid + '_' + j)) {
39803
+ bCoordinates = true;
39804
+ }
39805
+ }
39806
+ }
39807
+
39808
+ if(resPosArray.length == 0) continue;
39809
+
39810
+ let resCnt = resPosArray.length;
39811
+ let title = 'PTM: ' + ptm;
39812
+ if(title.length > 17) title = title.substr(0, 17) + '...';
39813
+ let fulltitle = ptm;
39814
+
39815
+ let linkStr = (bCoordinates) ? 'icn3d-link icn3d-blue' : '';
39816
+
39817
+ 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>';
39818
+ let htmlTmp3 = '<span class="icn3d-residueNum" title="residue count">' + resCnt.toString() + ' Res</span>';
39819
+ let htmlTmp = '<span class="icn3d-seqLine">';
39820
+ html3 += htmlTmp2 + htmlTmp3 + '<br>';
39821
+ html += htmlTmp2 + htmlTmp3 + htmlTmp;
39822
+ html2 += htmlTmp2 + htmlTmp3 + htmlTmp;
39823
+ let pre = 'ptm' + index.toString();
39824
+ //var widthPerRes = ic.seqAnnWidth / ic.maxAnnoLength;
39825
+ let prevEmptyWidth = 0;
39826
+ let prevLineWidth = 0;
39827
+ let widthPerRes = 1;
39828
+ for(let i = 0, il = ic.giSeq[chnid].length; i < il; ++i) {
39829
+ html += ic.showSeqCls.insertGap(chnid, i, '-');
39830
+ if(resPosArray.indexOf(i) != -1) {
39831
+ let cFull = ic.giSeq[chnid][i];
39832
+ let c = cFull;
39833
+ if(cFull.length > 1) {
39834
+ c = cFull[0] + '..';
39835
+ }
39836
+ let pos = ic.annoCddSiteCls.getAdjustedResi(i, chnid, ic.matchedPos, ic.chainsSeq, ic.baseResi);
39837
+
39838
+ html += '<span id="' + pre + '_' + ic.pre + chnid + '_' + pos + '" title="' + c + pos + '" class="icn3d-residue">' + cFull + '</span>';
39839
+ if(me.bNode) {
39840
+ let obj = {};
39841
+ obj[chnid + '_' + pos] = 'PTM: ' + ptm;
39842
+ ic.resid2ptm[chnid].push(obj);
39843
+ }
39844
+
39845
+ html2 += ic.showSeqCls.insertGapOverview(chnid, i);
39846
+ 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);
39847
+ //if(emptyWidth < 0) emptyWidth = 0;
39848
+ if(emptyWidth >= 0) {
39849
+ html2 += '<div style="display:inline-block; width:' + emptyWidth + 'px;">&nbsp;</div>';
39850
+ html2 += '<div style="display:inline-block; background-color:#000; width:' + widthPerRes + 'px;" title="' + c + pos + '">&nbsp;</div>';
39851
+ prevEmptyWidth += emptyWidth;
39852
+ prevLineWidth += widthPerRes;
39853
+ }
39854
+ }
39855
+ else {
39856
+ html += '<span>-</span>'; //'<span>-</span>';
39857
+ }
39858
+ }
39859
+ htmlTmp = '<span class="icn3d-residueNum" title="residue count">&nbsp;' + resCnt.toString() + ' Residues</span>';
39860
+ htmlTmp += '</span>';
39861
+ htmlTmp += '<br>';
39862
+ html += htmlTmp;
39863
+ html2 += htmlTmp;
39864
+
39865
+ ++index;
39866
+ }
39867
+
39868
+ html += '</div>';
39869
+ html2 += '</div>';
39870
+ html3 += '</div>';
39871
+
39872
+ $("#" + ic.pre + "dt_ptm_" + chnid).html(html);
39873
+ $("#" + ic.pre + "ov_ptm_" + chnid).html(html2);
39874
+ $("#" + ic.pre + "tt_ptm_" + chnid).html(html3);
39875
+
39876
+ // add here after the ajax call
39877
+ ic.showAnnoCls.enableHlSeq();
39878
+ ic.bAjaxPTM = true;
39879
+ }
39880
+
39881
+ getNoPTM(chnid) { let ic = this.icn3d; ic.icn3dui;
39882
+ console.log( "No PTM data were found for the chain " + chnid + "..." );
39883
+
39884
+ $("#" + ic.pre + "dt_ptm_" + chnid).html('');
39885
+ $("#" + ic.pre + "ov_ptm_" + chnid).html('');
39886
+ $("#" + ic.pre + "tt_ptm_" + chnid).html('');
39887
+
39888
+ // add here after the ajax call
39889
+ ic.showAnnoCls.enableHlSeq();
39890
+ ic.bAjaxPTM = true;
39891
+ if(ic.deferredPTM !== undefined) ic.deferredPTM.resolve();
39892
+ }
39893
+ }
39894
+
39555
39895
  /**
39556
39896
  * @author Jiyao Wang <wangjiy@ncbi.nlm.nih.gov> / https://github.com/ncbi/icn3d
39557
39897
  */
@@ -40868,7 +41208,8 @@ class Annotation {
40868
41208
  this.setAnnoSeqBase(false);
40869
41209
  }
40870
41210
  setAnnoSeqBase(bShow) { let ic = this.icn3d; ic.icn3dui;
40871
- let itemArray = ['site', 'snp', 'clinvar', 'cdd', 'domain', 'interaction', 'ssbond', 'crosslink', 'transmem'];
41211
+ //let itemArray = ['site', 'ptm', 'snp', 'clinvar', 'cdd', 'domain', 'interaction', 'ssbond', 'crosslink', 'transmem'];
41212
+ let itemArray = ['cdd', 'clinvar', 'snp', 'site', 'ptm', 'ssbond', 'crosslink', 'transmem', 'domain', 'interaction'];
40872
41213
  for(let i in itemArray) {
40873
41214
  let item = itemArray[i];
40874
41215
  if(bShow) {
@@ -40880,7 +41221,8 @@ class Annotation {
40880
41221
  }
40881
41222
  }
40882
41223
  setAnnoTabBase(bChecked) { let ic = this.icn3d; ic.icn3dui;
40883
- let itemArray = ['all', 'binding', 'snp', 'clinvar', 'cdd', '3dd', 'interact', 'custom', 'ssbond', 'crosslink', 'transmem'];
41224
+ //let itemArray = ['all', 'binding', 'ptm', 'snp', 'clinvar', 'cdd', '3dd', 'interact', 'custom', 'ssbond', 'crosslink', 'transmem'];
41225
+ let itemArray = ['all', 'cdd', 'clinvar', 'snp', 'binding', 'ptm', 'ssbond', 'crosslink', 'transmem', '3dd', 'custom', 'interact'];
40884
41226
  for(let i in itemArray) {
40885
41227
  let item = itemArray[i];
40886
41228
  if($("#" + ic.pre + "anno_" + item).length) $("#" + ic.pre + "anno_" + item)[0].checked = bChecked;
@@ -40892,10 +41234,11 @@ class Annotation {
40892
41234
  this.updateClinvar();
40893
41235
  this.updateSnp();
40894
41236
  this.updateDomain();
40895
- this.updateInteraction();
41237
+ this.updatePTM();
40896
41238
  this.updateSsbond();
40897
41239
  this.updateCrosslink();
40898
41240
  this.updateTransmem();
41241
+ this.updateInteraction();
40899
41242
  }
40900
41243
  hideAnnoTabAll() { let ic = this.icn3d; ic.icn3dui;
40901
41244
  this.setAnnoTabBase(false);
@@ -40948,6 +41291,11 @@ class Annotation {
40948
41291
  ic.bInteractionShown = false;
40949
41292
  this.updateInteraction();
40950
41293
  }
41294
+ if($("#" + ic.pre + "anno_ptm").length && $("#" + ic.pre + "anno_ptm")[0].checked) {
41295
+ $("[id^=" + ic.pre + "ptm]").show();
41296
+ ic.bPTMShown = false;
41297
+ this.updatePTM();
41298
+ }
40951
41299
  if($("#" + ic.pre + "anno_custom").length && $("#" + ic.pre + "anno_custom")[0].checked) {
40952
41300
  $("[id^=" + ic.pre + "custom]").show();
40953
41301
  }
@@ -41029,6 +41377,15 @@ class Annotation {
41029
41377
  $("[id^=" + ic.pre + "interaction]").hide();
41030
41378
  if($("#" + ic.pre + "anno_interact").length) $("#" + ic.pre + "anno_interact")[0].checked = false;
41031
41379
  }
41380
+ setAnnoTabPTM() { let ic = this.icn3d; ic.icn3dui;
41381
+ $("[id^=" + ic.pre + "ptm]").show();
41382
+ if($("#" + ic.pre + "anno_ptm").length) $("#" + ic.pre + "anno_ptm")[0].checked = true;
41383
+ this.updatePTM();
41384
+ }
41385
+ hideAnnoTabPTM() { let ic = this.icn3d; ic.icn3dui;
41386
+ $("[id^=" + ic.pre + "ptm]").hide();
41387
+ if($("#" + ic.pre + "anno_ptm").length) $("#" + ic.pre + "anno_ptm")[0].checked = false;
41388
+ }
41032
41389
  setAnnoTabSsbond() { let ic = this.icn3d; ic.icn3dui;
41033
41390
  $("[id^=" + ic.pre + "ssbond]").show();
41034
41391
  if($("#" + ic.pre + "anno_ssbond").length) $("#" + ic.pre + "anno_ssbond")[0].checked = true;
@@ -41140,6 +41497,17 @@ class Annotation {
41140
41497
  }
41141
41498
  });
41142
41499
 
41500
+ me.myEventCls.onIds("#" + ic.pre + "anno_ptm", "click", function(e) {
41501
+ if($("#" + ic.pre + "anno_ptm")[0].checked) {
41502
+ thisClass.setAnnoTabPTM();
41503
+ me.htmlCls.clickMenuCls.setLogCmd("set annotation ptm", true);
41504
+ }
41505
+ else {
41506
+ thisClass.hideAnnoTabPTM();
41507
+ me.htmlCls.clickMenuCls.setLogCmd("hide annotation ptm", true);
41508
+ }
41509
+ });
41510
+
41143
41511
  //$("#" + ic.pre + "anno_custom", "click", function(e) {
41144
41512
  me.myEventCls.onIds("#" + ic.pre + "anno_custom", "click", function(e) {
41145
41513
  if($("#" + ic.pre + "anno_custom")[0].checked) {
@@ -41235,7 +41603,7 @@ class Annotation {
41235
41603
  }
41236
41604
  }
41237
41605
  setAnnoDisplay(display, prefix) { let ic = this.icn3d; ic.icn3dui;
41238
- let itemArray = ['giseq', 'custom', 'site', 'snp', 'clinvar', 'cdd', 'domain', 'interaction', 'ssbond', 'crosslink', 'transmem'];
41606
+ let itemArray = ['giseq', 'custom', 'site', 'ptm', 'snp', 'clinvar', 'cdd', 'domain', 'interaction', 'ssbond', 'crosslink', 'transmem'];
41239
41607
  for(let i in itemArray) {
41240
41608
  let item = itemArray[i];
41241
41609
  $("[id^=" + ic.pre + prefix + "_" + item + "]").attr('style', display);
@@ -41306,6 +41674,15 @@ class Annotation {
41306
41674
  }
41307
41675
  ic.bInteractionShown = true;
41308
41676
  }
41677
+ updatePTM() { let ic = this.icn3d; ic.icn3dui;
41678
+ if(ic.bPTMShown === undefined || !ic.bPTMShown) {
41679
+ for(let chainid in ic.PTMChainbase) {
41680
+ let chainidBase = ic.PTMChainbase[chainid];
41681
+ ic.annoPTMCls.showPTM(chainid, chainidBase);
41682
+ }
41683
+ }
41684
+ ic.bPTMShown = true;
41685
+ }
41309
41686
  updateSsbond() { let ic = this.icn3d; ic.icn3dui;
41310
41687
  if(ic.bSSbondShown === undefined || !ic.bSSbondShown) {
41311
41688
  for(let chainid in ic.ssbondChainbase) {
@@ -57595,7 +57972,7 @@ class SetMenu {
57595
57972
 
57596
57973
  html += "<ul class='icn3d-mn-item'>";
57597
57974
 
57598
- html += "<li><span style='padding-left:1.5em;'>Unicolor</span>";
57975
+ html += "<li><span style='padding-left:1.5em!important;'>Unicolor</span>";
57599
57976
  html += "<ul>";
57600
57977
 
57601
57978
  html += "<li><span>Red</span>";
@@ -57802,7 +58179,7 @@ class SetMenu {
57802
58179
 
57803
58180
  if(me.cfg.cid === undefined) {
57804
58181
  //html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrRainbow', 'Rainbow (R-V)');
57805
- html += "<li><span style='padding-left:1.5em;'>Rainbow (R-V)</span>";
58182
+ html += "<li><span style='padding-left:1.5em!important;'>Rainbow (R-V)</span>";
57806
58183
  html += "<ul>";
57807
58184
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrRainbow', 'for Selection');
57808
58185
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrRainbowChain', 'for Chains');
@@ -57811,7 +58188,7 @@ class SetMenu {
57811
58188
 
57812
58189
  if(!me.cfg.simplemenu) {
57813
58190
  //html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrSpectrum', 'Spectrum (V-R)');
57814
- html += "<li><span style='padding-left:1.5em;'>Spectrum (V-R)</span>";
58191
+ html += "<li><span style='padding-left:1.5em!important;'>Spectrum (V-R)</span>";
57815
58192
  html += "<ul>";
57816
58193
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrSpectrum', 'for Selection');
57817
58194
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrSpectrumChain', 'for Chains');
@@ -57819,7 +58196,7 @@ class SetMenu {
57819
58196
  html += "</ul>";
57820
58197
  }
57821
58198
 
57822
- html += "<li><span style='padding-left:1.5em;'>Secondary</span>";
58199
+ html += "<li><span style='padding-left:1.5em!important;'>Secondary</span>";
57823
58200
  html += "<ul>";
57824
58201
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrSSGreen', 'Sheet in Green');
57825
58202
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrSSYellow', 'Sheet in Yellow');
@@ -57834,13 +58211,13 @@ class SetMenu {
57834
58211
 
57835
58212
  //html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrHydrophobic', 'Wimley-White<br><span style="padding-left:1.5em;">Hydrophobicity</span>');
57836
58213
 
57837
- html += "<li><span style='padding-left:1.5em;'>Hydrophobicity</span>";
58214
+ html += "<li><span style='padding-left:1.5em!important;'>Hydrophobicity</span>";
57838
58215
  html += "<ul>";
57839
58216
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrNormalizedHP', 'Normalized');
57840
58217
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrHydrophobic', 'Wimley-White');
57841
58218
  html += "</ul>";
57842
58219
 
57843
- html += "<li><span style='padding-left:1.5em;'>B-factor</span>";
58220
+ html += "<li><span style='padding-left:1.5em!important;'>B-factor</span>";
57844
58221
  html += "<ul>";
57845
58222
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrBfactor', 'Original');
57846
58223
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrBfactorNorm', 'Percentile');
@@ -57863,7 +58240,7 @@ class SetMenu {
57863
58240
 
57864
58241
  if(me.cfg.cid === undefined) {
57865
58242
  if(!me.cfg.simplemenu) {
57866
- html += "<li><span style='padding-left:1.5em;'>Defined Sets</span>";
58243
+ html += "<li><span style='padding-left:1.5em!important;'>Defined Sets</span>";
57867
58244
  html += "<ul>";
57868
58245
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrsets', 'Rainbow for Selected Sets<br>in "Analysis > Defined Sets"');
57869
58246
  html += "</ul>";
@@ -57872,7 +58249,7 @@ class SetMenu {
57872
58249
 
57873
58250
  //html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrResidue', 'Residue');
57874
58251
 
57875
- html += "<li><span style='padding-left:1.5em;'>Residue</span>";
58252
+ html += "<li><span style='padding-left:1.5em!important;'>Residue</span>";
57876
58253
  html += "<ul>";
57877
58254
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrResidue', 'Default');
57878
58255
  html += me.htmlCls.setHtmlCls.getRadio('mn4_clr', 'mn4_clrResidueCustom', 'Custom');
@@ -59934,10 +60311,17 @@ class SetDialog {
59934
60311
  html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_custom'>Custom" + me.htmlCls.space2 + "</span></td>";
59935
60312
  html += tmpStr2 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_3dd'>3D Domains" + me.htmlCls.space2 + "</span></td>";
59936
60313
  html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_snp'>SNPs" + me.htmlCls.space2 + "</span></td>";
59937
- html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_interact'>Interactions" + me.htmlCls.space2 + "</span></td>";
60314
+
60315
+ // if(me.cfg.mmdbid != undefined || me.cfg.pdbid != undefined || me.cfg.mmtfid != undefined || me.cfg.mmcifid != undefined) { // PDB
60316
+ // html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_ptm' disabled>PTM (UniProt)" + me.htmlCls.space2 + "</span></td>";
60317
+ // }
60318
+ // else {
60319
+ html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_ptm'>PTM (UniProt)" + me.htmlCls.space2 + "</span></td>";
60320
+ // }
59938
60321
  html += "<td></td>";
59939
60322
  html += "</tr><tr>";
59940
60323
  html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_ssbond'>Disulfide Bonds" + me.htmlCls.space2 + "</span></td>";
60324
+ html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_interact'>Interactions" + me.htmlCls.space2 + "</span></td>";
59941
60325
  html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_crosslink'>Cross-Linkages" + me.htmlCls.space2 + "</span></td>";
59942
60326
  if(me.cfg.opmid !== undefined) {
59943
60327
  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>";
@@ -60314,10 +60698,7 @@ class Events {
60314
60698
  ic.hAtoms = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
60315
60699
  }
60316
60700
 
60317
- // save the current selection
60318
- //ic.selectionCls.saveSelectionPrep();
60319
- //let name = 'realignSetsByStruct';
60320
- //ic.selectionCls.saveSelection(name, name);
60701
+ me.cfg.aligntool = 'vast';
60321
60702
 
60322
60703
  ic.realignParserCls.realignOnStructAlign();
60323
60704
  if(nameArray.length > 0) {
@@ -66779,6 +67160,7 @@ class iCn3D {
66779
67160
 
66780
67161
  this.annoCddSiteCls = new AnnoCddSite(this);
66781
67162
  this.annoContactCls = new AnnoContact(this);
67163
+ this.annoPTMCls = new AnnoPTM(this);
66782
67164
  this.annoCrossLinkCls = new AnnoCrossLink(this);
66783
67165
  this.annoDomainCls = new AnnoDomain(this);
66784
67166
  this.annoSnpClinVarCls = new AnnoSnpClinVar(this);
@@ -67043,7 +67425,7 @@ class iCn3DUI {
67043
67425
  //even when multiple iCn3D viewers are shown together.
67044
67426
  this.pre = this.cfg.divid + "_";
67045
67427
 
67046
- this.REVISION = '3.13.2';
67428
+ this.REVISION = '3.14.0';
67047
67429
 
67048
67430
  // In nodejs, iCn3D defines "window = {navigator: {}}"
67049
67431
  this.bNode = (Object.keys(window).length < 2) ? true : false;