icn3d 3.28.3 → 3.28.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/icn3d.module.js CHANGED
@@ -12513,10 +12513,10 @@ class SetDialog {
12513
12513
 
12514
12514
  html += "<b>Position of the first residue in Sequences & Annotations window</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "fasta_startpos2' value='1' size=2> <br><br>";
12515
12515
 
12516
- html += "Color Sequence by: <select id='" + me.pre + "colorseqby2'>";
12517
- html += me.htmlCls.optionStr + "'identity' selected>Identity</option>";
12518
- html += me.htmlCls.optionStr + "'conservation'>Conservation</option>";
12519
- html += "</select> <br><br>";
12516
+ // html += "Color Sequence by: <select id='" + me.pre + "colorseqby2'>";
12517
+ // html += me.htmlCls.optionStr + "'identity' selected>Identity</option>";
12518
+ // html += me.htmlCls.optionStr + "'conservation'>Conservation</option>";
12519
+ // html += "</select> <br><br>";
12520
12520
 
12521
12521
  html += me.htmlCls.buttonStr + "addtrack_button2c'>Show Isoforms & Exons</button>";
12522
12522
  html += "</div>";
@@ -31475,7 +31475,6 @@ class ApplySymd {
31475
31475
  }
31476
31476
  else { // bSymd, subset, and one chain
31477
31477
  if(Object.keys(ic.hAtoms).length == 0) {
31478
- //ic.hAtoms = me.hashUtilsCls.cloneHash(ic.atoms);
31479
31478
  ic.hAtoms = me.hashUtilsCls.cloneHash(ic.dAtoms);
31480
31479
  }
31481
31480
 
@@ -36461,6 +36460,9 @@ class SetOption {
36461
36460
  else if(colorType == 'ig protodomain') {
36462
36461
  colorLabel = 'Ig Protodomain';
36463
36462
  }
36463
+ else if(colorType == 'exon') {
36464
+ colorLabel = 'Exon';
36465
+ }
36464
36466
 
36465
36467
  let html = "Color by <b>" + colorLabel + "</b><br><br>";
36466
36468
 
@@ -36553,6 +36555,17 @@ class SetOption {
36553
36555
  else if (colorType == 'confidence') {
36554
36556
  html += me.htmlCls.clickMenuCls.setLegendHtml(true);
36555
36557
  }
36558
+ else if (colorType == 'exon') {
36559
+ ic.startColor = 'red';
36560
+ ic.midColor = 'white';
36561
+ ic.endColor = 'blue';
36562
+
36563
+ ic.startValue = 'Start';
36564
+ ic.midValue = 'Middle';
36565
+ ic.endValue = 'End';
36566
+
36567
+ html += me.htmlCls.clickMenuCls.setLegendHtml();
36568
+ }
36556
36569
  else {
36557
36570
  html = '';
36558
36571
  }
@@ -36561,6 +36574,9 @@ class SetOption {
36561
36574
  $("#" + me.pre + "dl_legend_html").html(html);
36562
36575
  me.htmlCls.dialogCls.openDlg('dl_legend', 'Color Legend');
36563
36576
  }
36577
+ else {
36578
+ $("#" + me.pre + "dl_legend").dialog("close");
36579
+ }
36564
36580
 
36565
36581
  // if(bClose) {
36566
36582
  // if(window.dialog && window.dialog.hasClass('ui-dialog-content')) window.dialog.dialog( "close" );
@@ -40357,8 +40373,10 @@ class AddTrack {
40357
40373
  let startpos = $("#" + ic.pre + "fasta_startpos2").val();
40358
40374
  if(!startpos) startpos = 1;
40359
40375
 
40360
- let colorseqby = $("#" + ic.pre + "colorseqby2").val();
40361
- let type =(colorseqby == 'identity') ? 'identity' : 'custom';
40376
+ //let colorseqby = $("#" + ic.pre + "colorseqby2").val();
40377
+ //let type =(colorseqby == 'identity') ? 'identity' : 'custom';
40378
+
40379
+ let type = 'identity';
40362
40380
 
40363
40381
  await thisClass.addExonTracks(chainid, geneid, startpos, type);
40364
40382
  });
@@ -40714,6 +40732,13 @@ class AddTrack {
40714
40732
  let tmpStrExon = 'style="background-color:' + pos2exonColor[cnt] + '"';
40715
40733
  htmlExon += '<span id="' + pre + '_' + ic.pre + chnid + '_' + pos + '" title="' + c + pos + ', Exon ' + (pos2exonIndex[cnt] + 1) + ': ' + pos2genome[cnt] + '" class="icn3d-residue" ' + tmpStrExon + '>&nbsp;</span>';
40716
40734
 
40735
+ // set atom color
40736
+ for(let serial in ic.residues[chnid + '_' + pos]) {
40737
+ let atom = ic.atoms[serial];
40738
+ atom.color = me.parasCls.thr(pos2exonColor[cnt]);
40739
+ ic.atomPrevColors[serial] = atom.color;
40740
+ }
40741
+
40717
40742
  htmlTmp2 += ic.showSeqCls.insertGapOverview(chnid, i);
40718
40743
 
40719
40744
  // 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);
@@ -41826,6 +41851,14 @@ class AddTrack {
41826
41851
  let exonArray = (acc2exons) ? acc2exons[trackTitleArray[j]] : undefined;
41827
41852
  this.showNewTrack(chainid, title, text, undefined, undefined, type, undefined, bMsa, fromArray, toArray, seqStartLen, exonArray);
41828
41853
  }
41854
+
41855
+ // update exon color
41856
+ ic.opts['color'] = 'exon';
41857
+ ic.legendTableCls.showColorLegend(ic.opts['color']);
41858
+
41859
+ ic.hlUpdateCls.updateHlAll();
41860
+ ic.drawCls.draw();
41861
+
41829
41862
  /*
41830
41863
  // set color for the master seq
41831
41864
  if(trackSeqArray.length > 0) {
@@ -50589,16 +50622,16 @@ class ChainalignParser {
50589
50622
  // try {
50590
50623
  let data = await me.getAjaxPromise(url, 'jsonp');
50591
50624
 
50592
- let mmdbid = data.mmdbid;
50593
- ic.selectedPdbid = mmdbid;
50594
-
50595
- if(!mmdbid) {
50625
+ if(!data || !data.mmdbid) {
50596
50626
  if(!ic.bCommandLoad) ic.init(); // remove all previously loaded data
50597
50627
  await thisClass.downloadChainalignmentPart2(data1, data2, undefined, chainidArray);
50598
50628
 
50599
50629
  /// if(ic.deferredOpm !== undefined) ic.deferredOpm.resolve();
50600
50630
  }
50601
50631
  else {
50632
+ let mmdbid = data.mmdbid;
50633
+ ic.selectedPdbid = mmdbid;
50634
+
50602
50635
  let url2 = "https://opm-assets.storage.googleapis.com/pdb/" + mmdbid.toLowerCase()+ ".pdb";
50603
50636
 
50604
50637
  // try {
@@ -61796,9 +61829,9 @@ class DefinedSets {
61796
61829
  this.setHAtomsFromSets(orArray, 'or');
61797
61830
 
61798
61831
  if(Object.keys(ic.hAtoms).length == 0) {
61799
- //ic.hAtoms = me.hashUtilsCls.cloneHash(ic.atoms);
61800
61832
  ic.hAtoms = me.hashUtilsCls.cloneHash(ic.dAtoms);
61801
61833
  }
61834
+
61802
61835
  this.setHAtomsFromSets(andArray, 'and');
61803
61836
 
61804
61837
  this.setHAtomsFromSets(notArray, 'not');
@@ -63653,7 +63686,6 @@ class Selection {
63653
63686
  //ic.dAtoms = {};
63654
63687
 
63655
63688
  if(Object.keys(ic.hAtoms).length == 0) {
63656
- //this.selectAll_base();
63657
63689
  ic.hAtoms = me.hashUtilsCls.cloneHash(ic.dAtoms);
63658
63690
  }
63659
63691
 
@@ -63694,9 +63726,12 @@ class Selection {
63694
63726
  }
63695
63727
 
63696
63728
  hideSelection() { let ic = this.icn3d, me = ic.icn3dui;
63697
- ic.dAtoms = me.hashUtilsCls.exclHash(ic.dAtoms, ic.hAtoms);
63729
+ ic.hAtoms = me.hashUtilsCls.exclHash(ic.dAtoms, ic.hAtoms);
63730
+ if(Object.keys(ic.hAtoms).length == 0) {
63731
+ ic.hAtoms = me.hashUtilsCls.cloneHash(ic.dAtoms);
63732
+ }
63698
63733
 
63699
- ic.hAtoms = me.hashUtilsCls.cloneHash(ic.dAtoms);
63734
+ ic.dAtoms = me.hashUtilsCls.cloneHash(ic.hAtoms);
63700
63735
 
63701
63736
  let centerAtomsResults = ic.applyCenterCls.centerAtoms(me.hashUtilsCls.hash2Atoms(ic.dAtoms, ic.atoms));
63702
63737
  ic.maxD = centerAtomsResults.maxD;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icn3d",
3
- "version": "3.28.3",
3
+ "version": "3.28.4",
4
4
  "main": "./icn3d.js",
5
5
  "exports": {
6
6
  ".": {