icn3d 3.28.2 → 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.js +66 -28
- package/icn3d.min.js +2 -2
- package/icn3d.module.js +66 -28
- package/package.json +1 -1
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 + '> </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) {
|
|
@@ -42862,23 +42895,26 @@ class ShowAnno {
|
|
|
42862
42895
|
let structure = chnid.substr(0, chnid.indexOf('_'));
|
|
42863
42896
|
// UniProt or NCBI protein accession
|
|
42864
42897
|
if(structure.length > 5) {
|
|
42865
|
-
let
|
|
42898
|
+
let url;
|
|
42866
42899
|
if(ic.uniprot2acc && ic.uniprot2acc[structure]) {
|
|
42867
|
-
|
|
42900
|
+
ic.uniprot2acc[structure];
|
|
42868
42901
|
}
|
|
42869
42902
|
else {
|
|
42870
|
-
|
|
42871
|
-
if(!ic.uniprot2acc) ic.uniprot2acc = {};
|
|
42872
|
-
url = me.htmlCls.baseUrl + "vastdyn/vastdyn.cgi?uniprot2refseq=" + structure;
|
|
42873
|
-
let result = await me.getAjaxPromise(url, 'jsonp');
|
|
42874
|
-
refseqid = (result && result.refseq) ? result.refseq : structure;
|
|
42903
|
+
ic.uniprot2acc = {};
|
|
42875
42904
|
|
|
42876
|
-
|
|
42877
|
-
}
|
|
42878
|
-
|
|
42879
|
-
|
|
42880
|
-
|
|
42881
|
-
|
|
42905
|
+
// try {
|
|
42906
|
+
// if(!ic.uniprot2acc) ic.uniprot2acc = {};
|
|
42907
|
+
// the following query is slow due to the missing index in DB
|
|
42908
|
+
// url = me.htmlCls.baseUrl + "vastdyn/vastdyn.cgi?uniprot2refseq=" + structure;
|
|
42909
|
+
// let result = await me.getAjaxPromise(url, 'jsonp');
|
|
42910
|
+
// refseqid = (result && result.refseq) ? result.refseq : structure;
|
|
42911
|
+
|
|
42912
|
+
// ic.uniprot2acc[structure] = refseqid;
|
|
42913
|
+
// }
|
|
42914
|
+
// catch {
|
|
42915
|
+
// console.log("Problem in getting protein accession from UniProt ID...")
|
|
42916
|
+
// refseqid = structure;
|
|
42917
|
+
// }
|
|
42882
42918
|
}
|
|
42883
42919
|
|
|
42884
42920
|
// get Gene info from protein name
|
|
@@ -50586,16 +50622,16 @@ class ChainalignParser {
|
|
|
50586
50622
|
// try {
|
|
50587
50623
|
let data = await me.getAjaxPromise(url, 'jsonp');
|
|
50588
50624
|
|
|
50589
|
-
|
|
50590
|
-
ic.selectedPdbid = mmdbid;
|
|
50591
|
-
|
|
50592
|
-
if(!mmdbid) {
|
|
50625
|
+
if(!data || !data.mmdbid) {
|
|
50593
50626
|
if(!ic.bCommandLoad) ic.init(); // remove all previously loaded data
|
|
50594
50627
|
await thisClass.downloadChainalignmentPart2(data1, data2, undefined, chainidArray);
|
|
50595
50628
|
|
|
50596
50629
|
/// if(ic.deferredOpm !== undefined) ic.deferredOpm.resolve();
|
|
50597
50630
|
}
|
|
50598
50631
|
else {
|
|
50632
|
+
let mmdbid = data.mmdbid;
|
|
50633
|
+
ic.selectedPdbid = mmdbid;
|
|
50634
|
+
|
|
50599
50635
|
let url2 = "https://opm-assets.storage.googleapis.com/pdb/" + mmdbid.toLowerCase()+ ".pdb";
|
|
50600
50636
|
|
|
50601
50637
|
// try {
|
|
@@ -61793,9 +61829,9 @@ class DefinedSets {
|
|
|
61793
61829
|
this.setHAtomsFromSets(orArray, 'or');
|
|
61794
61830
|
|
|
61795
61831
|
if(Object.keys(ic.hAtoms).length == 0) {
|
|
61796
|
-
//ic.hAtoms = me.hashUtilsCls.cloneHash(ic.atoms);
|
|
61797
61832
|
ic.hAtoms = me.hashUtilsCls.cloneHash(ic.dAtoms);
|
|
61798
61833
|
}
|
|
61834
|
+
|
|
61799
61835
|
this.setHAtomsFromSets(andArray, 'and');
|
|
61800
61836
|
|
|
61801
61837
|
this.setHAtomsFromSets(notArray, 'not');
|
|
@@ -63650,7 +63686,6 @@ class Selection {
|
|
|
63650
63686
|
//ic.dAtoms = {};
|
|
63651
63687
|
|
|
63652
63688
|
if(Object.keys(ic.hAtoms).length == 0) {
|
|
63653
|
-
//this.selectAll_base();
|
|
63654
63689
|
ic.hAtoms = me.hashUtilsCls.cloneHash(ic.dAtoms);
|
|
63655
63690
|
}
|
|
63656
63691
|
|
|
@@ -63691,9 +63726,12 @@ class Selection {
|
|
|
63691
63726
|
}
|
|
63692
63727
|
|
|
63693
63728
|
hideSelection() { let ic = this.icn3d, me = ic.icn3dui;
|
|
63694
|
-
ic.
|
|
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
|
+
}
|
|
63695
63733
|
|
|
63696
|
-
ic.
|
|
63734
|
+
ic.dAtoms = me.hashUtilsCls.cloneHash(ic.hAtoms);
|
|
63697
63735
|
|
|
63698
63736
|
let centerAtomsResults = ic.applyCenterCls.centerAtoms(me.hashUtilsCls.hash2Atoms(ic.dAtoms, ic.atoms));
|
|
63699
63737
|
ic.maxD = centerAtomsResults.maxD;
|