icn3d 3.33.1 → 3.33.2
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 +152 -43
- package/icn3d.min.js +3 -3
- package/icn3d.module.js +152 -43
- package/package.json +1 -1
package/icn3d.js
CHANGED
|
@@ -10400,8 +10400,8 @@ class ClickMenu {
|
|
|
10400
10400
|
//if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
10401
10401
|
let sigma2fofc = parseFloat($("#" + me.pre + "sigma2fofc" ).val());
|
|
10402
10402
|
let type = '2fofc';
|
|
10403
|
-
await ic.dsn6ParserCls.dsn6Parser(ic.inputid, type, sigma2fofc);
|
|
10404
|
-
|
|
10403
|
+
//await ic.dsn6ParserCls.dsn6Parser(ic.inputid, type, sigma2fofc);
|
|
10404
|
+
await ic.densityCifParserCls.densityCifParser(ic.inputid, type, sigma2fofc);
|
|
10405
10405
|
|
|
10406
10406
|
//ic.setOptionCls.setOption('map', '2fofc');
|
|
10407
10407
|
thisClass.setLogCmd('set map 2fofc sigma ' + sigma2fofc, true);
|
|
@@ -10413,7 +10413,8 @@ class ClickMenu {
|
|
|
10413
10413
|
//if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
10414
10414
|
let sigmafofc = parseFloat($("#" + me.pre + "sigmafofc" ).val());
|
|
10415
10415
|
let type = 'fofc';
|
|
10416
|
-
await ic.dsn6ParserCls.dsn6Parser(ic.inputid, type, sigmafofc);
|
|
10416
|
+
//await ic.dsn6ParserCls.dsn6Parser(ic.inputid, type, sigmafofc);
|
|
10417
|
+
await ic.densityCifParserCls.densityCifParser(ic.inputid, type, sigma2fofc);
|
|
10417
10418
|
//ic.setOptionCls.setOption('map', 'fofc');
|
|
10418
10419
|
thisClass.setLogCmd('set map fofc sigma ' + sigmafofc, true);
|
|
10419
10420
|
});
|
|
@@ -10962,6 +10963,18 @@ class ClickMenu {
|
|
|
10962
10963
|
me.htmlCls.dialogCls.openDlg('dl_contact', 'Set contact map');
|
|
10963
10964
|
});
|
|
10964
10965
|
|
|
10966
|
+
me.myEventCls.onIds(["#" + me.pre + "mn6_DSSP"], "click", async function(e) { let ic = me.icn3d; //e.preventDefault();
|
|
10967
|
+
thisClass.setLogCmd('set dssp sse', true);
|
|
10968
|
+
await ic.pdbParserCls.applyCommandDssp();
|
|
10969
|
+
ic.bResetAnno = true;
|
|
10970
|
+
|
|
10971
|
+
if(ic.bAnnoShown) {
|
|
10972
|
+
await ic.showAnnoCls.showAnnotations();
|
|
10973
|
+
|
|
10974
|
+
ic.annotationCls.resetAnnoTabAll();
|
|
10975
|
+
}
|
|
10976
|
+
});
|
|
10977
|
+
|
|
10965
10978
|
|
|
10966
10979
|
me.myEventCls.onIds("#" + me.pre + "mn6_hbondsNo", "click", function(e) { let ic = me.icn3d; //e.preventDefault();
|
|
10967
10980
|
ic.showInterCls.hideHbondsContacts();
|
|
@@ -12882,6 +12895,8 @@ class SetMenu {
|
|
|
12882
12895
|
html += "</ul>";
|
|
12883
12896
|
html += "</li>";
|
|
12884
12897
|
|
|
12898
|
+
html += this.getLink('mn6_DSSP', 'DSSP Secondary', undefined, 1);
|
|
12899
|
+
|
|
12885
12900
|
let bOnePdb = me.cfg.mmtfid !== undefined || me.cfg.pdbid !== undefined || me.cfg.opmid !== undefined || me.cfg.mmcifid !== undefined || me.cfg.mmdbid !== undefined || me.cfg.mmdbafid !== undefined || me.cfg.gi !== undefined || me.cfg.blast_rep_id !== undefined;
|
|
12886
12901
|
|
|
12887
12902
|
if(bOnePdb) {
|
|
@@ -14182,14 +14197,14 @@ class SetDialog {
|
|
|
14182
14197
|
|
|
14183
14198
|
html += "<span style='white-space:nowrap;font-weight:bold;'>2fofc contour at default threshold or at: "
|
|
14184
14199
|
+ me.htmlCls.inputTextStr + "id='" + me.pre + "dsn6sigma2fofc' value='' size=8> σ</span><br/>";
|
|
14185
|
-
//html += me.htmlCls.inputFileStr + "id='" + me.pre + "dsn6file2fofc'>
|
|
14186
|
-
html += me.htmlCls.inputFileStr + "id='" + me.pre + "dsn6file2fofc'><br>" + me.htmlCls.buttonStr + "
|
|
14200
|
+
//html += me.htmlCls.inputFileStr + "id='" + me.pre + "dsn6file2fofc'><br>" + me.htmlCls.buttonStr + "reload_dsn6file2fofc' style='margin: 6px 20px 0 0;'>Load DSN6</button>" + me.htmlCls.buttonStr + "reload_ccp4file2fofc' style='margin: 6px 20px 0 0;'>Load CCP4</button>" + me.htmlCls.buttonStr + "reload_mtzfile2fofc' style='margin: 6px 20px 0 0;'>Load MTZ</button>" + me.htmlCls.buttonStr + "reload_rcsbmtzfile2fofc' style='margin-top: 6px;'>Load RCSB MTZ</button><br><br><br/>";
|
|
14201
|
+
html += me.htmlCls.inputFileStr + "id='" + me.pre + "dsn6file2fofc'><br>" + me.htmlCls.buttonStr + "reload_ccp4file2fofc' style='margin: 6px 20px 0 0;'>Load CCP4</button>" + me.htmlCls.buttonStr + "reload_mtzfile2fofc' style='margin: 6px 20px 0 0;'>Load MTZ</button>" + me.htmlCls.buttonStr + "reload_rcsbmtzfile2fofc' style='margin-top: 6px;'>Load RCSB MTZ</button><br><br><br/>";
|
|
14187
14202
|
|
|
14188
14203
|
html += "<span style='white-space:nowrap;font-weight:bold;'>fofc contour at default threshold or at: "
|
|
14189
14204
|
+ me.htmlCls.inputTextStr + "id='" + me.pre + "dsn6sigmafofc' value='' size=8> σ</span><br/>";
|
|
14190
14205
|
|
|
14191
|
-
//html += me.htmlCls.inputFileStr + "id='" + me.pre + "dsn6filefofc'>
|
|
14192
|
-
html += me.htmlCls.inputFileStr + "id='" + me.pre + "dsn6filefofc'><br>" + me.htmlCls.buttonStr + "
|
|
14206
|
+
//html += me.htmlCls.inputFileStr + "id='" + me.pre + "dsn6filefofc'><br>" + me.htmlCls.buttonStr + "reload_dsn6filefofc' style='margin: 6px 20px 0 0;'>Load DSN6</button>" + me.htmlCls.buttonStr + "reload_ccp4filefofc' style='margin: 6px 20px 0 0;'>Load CCP4</button>" + me.htmlCls.buttonStr + "reload_mtzfilefofc' style='margin: 6px 20px 0 0;'>Load MTZ</button>" + me.htmlCls.buttonStr + "reload_rcsbmtzfilefofc' style='margin-top: 6px;'>Load RCSB MTZ</button><br><br><br>";
|
|
14207
|
+
html += me.htmlCls.inputFileStr + "id='" + me.pre + "dsn6filefofc'><br>" + me.htmlCls.buttonStr + "reload_ccp4filefofc' style='margin: 6px 20px 0 0;'>Load CCP4</button>" + me.htmlCls.buttonStr + "reload_mtzfilefofc' style='margin: 6px 20px 0 0;'>Load MTZ</button>" + me.htmlCls.buttonStr + "reload_rcsbmtzfilefofc' style='margin-top: 6px;'>Load RCSB MTZ</button><br><br><br>";
|
|
14193
14208
|
|
|
14194
14209
|
|
|
14195
14210
|
html += me.htmlCls.buttonStr + "elecmapNo4'>Remove Map</button><br>";
|
|
@@ -14203,12 +14218,16 @@ class SetDialog {
|
|
|
14203
14218
|
html += "<span style='white-space:nowrap;font-weight:bold;'>2fofc contour at default threshold or at: "
|
|
14204
14219
|
+ me.htmlCls.inputTextStr + "id='" + me.pre + "dsn6sigmaurl2fofc' value='' size=8> σ</span><br/>";
|
|
14205
14220
|
|
|
14206
|
-
html += "URL in the same host: " + me.htmlCls.inputTextStr + "id='" + me.pre + "dsn6fileurl2fofc' size=20><br>" + me.htmlCls.buttonStr + "reload_dsn6fileurl2fofc' style='margin: 6px 20px 0 0;'>Load DSN6</button>" + me.htmlCls.buttonStr + "reload_ccp4fileurl2fofc' style='margin: 6px 20px 0 0;'>Load CCP4</button>" + me.htmlCls.buttonStr + "reload_mtzfileurl2fofc' style='margin: 6px 20px 0 0;'>Load MTZ</button>" + me.htmlCls.buttonStr + "reload_rcsbmtzfileurl2fofc' style='margin-top: 6px;'>Load RCSB MTZ</button><br><br><br/>";
|
|
14221
|
+
//html += "URL in the same host: " + me.htmlCls.inputTextStr + "id='" + me.pre + "dsn6fileurl2fofc' size=20><br>" + me.htmlCls.buttonStr + "reload_dsn6fileurl2fofc' style='margin: 6px 20px 0 0;'>Load DSN6</button>" + me.htmlCls.buttonStr + "reload_ccp4fileurl2fofc' style='margin: 6px 20px 0 0;'>Load CCP4</button>" + me.htmlCls.buttonStr + "reload_mtzfileurl2fofc' style='margin: 6px 20px 0 0;'>Load MTZ</button>" + me.htmlCls.buttonStr + "reload_rcsbmtzfileurl2fofc' style='margin-top: 6px;'>Load RCSB MTZ</button><br><br><br/>";
|
|
14222
|
+
|
|
14223
|
+
html += "URL in the same host: " + me.htmlCls.inputTextStr + "id='" + me.pre + "dsn6fileurl2fofc' size=20><br>" + me.htmlCls.buttonStr + "reload_ccp4fileurl2fofc' style='margin: 6px 20px 0 0;'>Load CCP4</button>" + me.htmlCls.buttonStr + "reload_mtzfileurl2fofc' style='margin: 6px 20px 0 0;'>Load MTZ</button>" + me.htmlCls.buttonStr + "reload_rcsbmtzfileurl2fofc' style='margin-top: 6px;'>Load RCSB MTZ</button><br><br><br/>";
|
|
14207
14224
|
|
|
14208
14225
|
html += "<span style='white-space:nowrap;font-weight:bold;'>fofc contour at default threshold or at: "
|
|
14209
14226
|
+ me.htmlCls.inputTextStr + "id='" + me.pre + "dsn6sigmaurlfofc' value='' size=8> σ</span><br/>";
|
|
14210
14227
|
|
|
14211
|
-
html += "URL in the same host: " + me.htmlCls.inputTextStr + "id='" + me.pre + "dsn6fileurlfofc' size=20><br>" + me.htmlCls.buttonStr + "reload_dsn6fileurlfofc' style='margin: 6px 20px 0 0;'>Load DSN6</button>" + me.htmlCls.buttonStr + "reload_ccp4fileurlfofc' style='margin: 6px 20px 0 0;'>Load CCP4</button>" + me.htmlCls.buttonStr + "reload_mtzfileurlfofc' style='margin: 6px 20px 0 0;'>Load MTZ</button>" + me.htmlCls.buttonStr + "reload_rcsbmtzfileurlfofc' style='margin-top: 6px;'>Load RCSB MTZ</button><br><br><br>";
|
|
14228
|
+
//html += "URL in the same host: " + me.htmlCls.inputTextStr + "id='" + me.pre + "dsn6fileurlfofc' size=20><br>" + me.htmlCls.buttonStr + "reload_dsn6fileurlfofc' style='margin: 6px 20px 0 0;'>Load DSN6</button>" + me.htmlCls.buttonStr + "reload_ccp4fileurlfofc' style='margin: 6px 20px 0 0;'>Load CCP4</button>" + me.htmlCls.buttonStr + "reload_mtzfileurlfofc' style='margin: 6px 20px 0 0;'>Load MTZ</button>" + me.htmlCls.buttonStr + "reload_rcsbmtzfileurlfofc' style='margin-top: 6px;'>Load RCSB MTZ</button><br><br><br>";
|
|
14229
|
+
|
|
14230
|
+
html += "URL in the same host: " + me.htmlCls.inputTextStr + "id='" + me.pre + "dsn6fileurlfofc' size=20><br>" + me.htmlCls.buttonStr + "reload_ccp4fileurlfofc' style='margin: 6px 20px 0 0;'>Load CCP4</button>" + me.htmlCls.buttonStr + "reload_mtzfileurlfofc' style='margin: 6px 20px 0 0;'>Load MTZ</button>" + me.htmlCls.buttonStr + "reload_rcsbmtzfileurlfofc' style='margin-top: 6px;'>Load RCSB MTZ</button><br><br><br>";
|
|
14212
14231
|
|
|
14213
14232
|
html += me.htmlCls.buttonStr + "elecmapNo5'>Remove Map</button><br>";
|
|
14214
14233
|
|
|
@@ -14757,8 +14776,9 @@ class SetDialog {
|
|
|
14757
14776
|
html += "</div>";
|
|
14758
14777
|
|
|
14759
14778
|
|
|
14760
|
-
html += me.htmlCls.divStr + "dl_anglemanysets' class='" + dialogClass + "'>";
|
|
14779
|
+
html += me.htmlCls.divStr + "dl_anglemanysets' class='" + dialogClass + "' style='max-width:500px'>";
|
|
14761
14780
|
html += this.addNotebookTitle('dl_anglemanysets', 'Measure angles among many sets');
|
|
14781
|
+
html += me.htmlCls.spanNowrapStr + "Note: Each set is represented by a vector, which is the X-axis of the principle axes. The angles between the vectors are then calculated.<br/><br/>";
|
|
14762
14782
|
html += me.htmlCls.spanNowrapStr + "1. Select sets for pairwise angles</span><br/>";
|
|
14763
14783
|
html += "<table border=0 width=400 cellspacing=10><tr><td>";
|
|
14764
14784
|
|
|
@@ -15080,8 +15100,8 @@ class SetDialog {
|
|
|
15080
15100
|
html += "Z: " + me.htmlCls.inputTextStr + "id='" + me.pre + "v2Z' value='' size=6><br>";
|
|
15081
15101
|
html += "<br>";
|
|
15082
15102
|
|
|
15083
|
-
html += me.htmlCls.buttonStr + "measure_angle'>Measure Angle</button>";
|
|
15084
|
-
html += "The angle is: " + me.htmlCls.inputTextStr + "id='" + me.pre + "angle_value' value='' size=6> degree
|
|
15103
|
+
html += me.htmlCls.buttonStr + "measure_angle'>Measure Angle</button><br><br>";
|
|
15104
|
+
html += "The angle is: " + me.htmlCls.inputTextStr + "id='" + me.pre + "angle_value' value='' size=6> degree.<br><br>";
|
|
15085
15105
|
html += "</div>";
|
|
15086
15106
|
|
|
15087
15107
|
html += me.htmlCls.divStr + "dl_matrix' class='" + dialogClass + "'>";
|
|
@@ -44526,7 +44546,7 @@ class AddTrack {
|
|
|
44526
44546
|
|
|
44527
44547
|
}
|
|
44528
44548
|
|
|
44529
|
-
showNewTrack(chnid, title, text, cssColorArray, inTarget2queryHash, type, color, bMsa, fromArray, toArray, seqStartLen, exonArray) { let ic = this.icn3d, me = ic.icn3dui;
|
|
44549
|
+
showNewTrack(chnid, title, text, cssColorArray, inTarget2queryHash, type, color, bMsa, fromArray, toArray, seqStartLen, exonArray, offsetArray) { let ic = this.icn3d, me = ic.icn3dui;
|
|
44530
44550
|
//if(ic.customTracks[chnid] === undefined) {
|
|
44531
44551
|
// ic.customTracks[chnid] = {}
|
|
44532
44552
|
//}
|
|
@@ -44744,14 +44764,16 @@ class AddTrack {
|
|
|
44744
44764
|
|
|
44745
44765
|
if(fromArray !== undefined) {
|
|
44746
44766
|
htmlTmp2 = '';
|
|
44747
|
-
let fromArray2 = [], toArray2 = [];
|
|
44767
|
+
let fromArray2 = [], toArray2 = [], offsetArray2 = [];
|
|
44748
44768
|
for(let i = 0, il = fromArray.length; i < il; ++i) {
|
|
44749
44769
|
fromArray2.push(fromArray[i]);
|
|
44770
|
+
offsetArray2.push(offsetArray[i]);
|
|
44750
44771
|
|
|
44751
44772
|
for(let j = parseInt(fromArray[i]); j <= parseInt(toArray[i]); ++j) {
|
|
44752
44773
|
if(ic.targetGapHash !== undefined && ic.targetGapHash.hasOwnProperty(j)) {
|
|
44753
44774
|
toArray2.push(j - 1);
|
|
44754
44775
|
fromArray2.push(j);
|
|
44776
|
+
offsetArray2.push(offsetArray[i]);
|
|
44755
44777
|
}
|
|
44756
44778
|
}
|
|
44757
44779
|
|
|
@@ -44785,6 +44807,7 @@ class AddTrack {
|
|
|
44785
44807
|
// determine how this range sits in the exon ranges in exonArray
|
|
44786
44808
|
let startExon, endExon;
|
|
44787
44809
|
|
|
44810
|
+
let offset = offsetArray2[i];
|
|
44788
44811
|
cnt = toArray[i] - fromArray[i] + 1;
|
|
44789
44812
|
let from = prevCntTotal, to = prevCntTotal + cnt - 1;
|
|
44790
44813
|
|
|
@@ -44813,26 +44836,26 @@ class AddTrack {
|
|
|
44813
44836
|
endColorStr = this.getExonColor(startExon.rangeStart, startExon.rangeEnd, to);
|
|
44814
44837
|
|
|
44815
44838
|
colorGradient = startColorStr + ' 0%, #FFF 50%, ' + endColorStr + ' 100%';
|
|
44816
|
-
htmlTmp2 += this.getExonHtml(startExon.exonIndex, colorGradient, startExon.from, endExon.to, startExon.genomeRange, chnid, simpTitle);
|
|
44839
|
+
htmlTmp2 += this.getExonHtml(startExon.exonIndex, colorGradient, startExon.from, endExon.to, startExon.genomeRange, chnid, simpTitle, offset);
|
|
44817
44840
|
}
|
|
44818
44841
|
else {
|
|
44819
44842
|
if(startExon) {
|
|
44820
44843
|
startColorStr = this.getExonColor(startExon.rangeStart, startExon.rangeEnd, from);
|
|
44821
44844
|
|
|
44822
44845
|
colorGradient = startColorStr + ' 0%, #FFF 50%, #00F 100%';
|
|
44823
|
-
htmlTmp2 += this.getExonHtml(startExon.exonIndex, colorGradient, startExon.from, startExon.rangeEnd, startExon.genomeRange, chnid, simpTitle);
|
|
44846
|
+
htmlTmp2 += this.getExonHtml(startExon.exonIndex, colorGradient, startExon.from, startExon.rangeEnd, startExon.genomeRange, chnid, simpTitle, offset);
|
|
44824
44847
|
}
|
|
44825
44848
|
|
|
44826
44849
|
if(startExon && endExon) {
|
|
44827
44850
|
for(let j = startExon.exonIndex + 1; j < endExon.exonIndex; ++j) {
|
|
44828
44851
|
colorGradient = '#F00 0%, #FFF 50%, #00F 100%';
|
|
44829
|
-
htmlTmp2 += this.getExonHtml(j, colorGradient, exonArray[j].resStart, exonArray[j].resEnd, exonArray[j].genomeRange, chnid, simpTitle);
|
|
44852
|
+
htmlTmp2 += this.getExonHtml(j, colorGradient, exonArray[j].resStart, exonArray[j].resEnd, exonArray[j].genomeRange, chnid, simpTitle, offset);
|
|
44830
44853
|
}
|
|
44831
44854
|
|
|
44832
44855
|
endColorStr = this.getExonColor(endExon.rangeStart, endExon.rangeEnd, to);
|
|
44833
44856
|
|
|
44834
44857
|
colorGradient = '#F00 0%, #FFF 50%, ' + endColorStr + ' 100%';
|
|
44835
|
-
htmlTmp2 += this.getExonHtml(endExon.exonIndex, colorGradient, endExon.rangeStart, endExon.to, endExon.genomeRange, chnid, simpTitle);
|
|
44858
|
+
htmlTmp2 += this.getExonHtml(endExon.exonIndex, colorGradient, endExon.rangeStart, endExon.to, endExon.genomeRange, chnid, simpTitle, offset);
|
|
44836
44859
|
}
|
|
44837
44860
|
}
|
|
44838
44861
|
|
|
@@ -44866,8 +44889,8 @@ class AddTrack {
|
|
|
44866
44889
|
}
|
|
44867
44890
|
}
|
|
44868
44891
|
|
|
44869
|
-
getExonHtml(exonIndex, colorGradient, from, to, genomeRange, chainid, simpTitle) { let ic = this.icn3d; ic.icn3dui;
|
|
44870
|
-
return '<div style="display:inline-block; color:white!important; width:' + Math.round(ic.seqAnnWidth *(to - from + 1) /(ic.maxAnnoLength + ic.nTotalGap)) + 'px;" class="icn3d-seqTitle icn3d-link icn3d-blue" domain="' + (exonIndex + 1) + '" from="' + from + '" to="' + to + '" setname="' + simpTitle + ', ' + (exonIndex + 1) + '" title="Exon: ' + genomeRange + ' genomic interval" anno="sequence" chain="' + chainid + '"><div style="height: 12px; border: 1px solid #000; background: linear-gradient(to right, ' + colorGradient + ');"></div></div>';
|
|
44892
|
+
getExonHtml(exonIndex, colorGradient, from, to, genomeRange, chainid, simpTitle, offset) { let ic = this.icn3d; ic.icn3dui;
|
|
44893
|
+
return '<div style="display:inline-block; color:white!important; width:' + Math.round(ic.seqAnnWidth *(to - from + 1) /(ic.maxAnnoLength + ic.nTotalGap)) + 'px;" class="icn3d-seqTitle icn3d-link icn3d-blue" domain="' + (exonIndex + 1) + '" from="' + (from + offset) + '" to="' + (to + offset) + '" setname="' + simpTitle + ', ' + (exonIndex + 1) + '" title="Exon: ' + genomeRange + ' genomic interval" anno="sequence" chain="' + chainid + '"><div style="height: 12px; border: 1px solid #000; background: linear-gradient(to right, ' + colorGradient + ');"></div></div>';
|
|
44871
44894
|
}
|
|
44872
44895
|
|
|
44873
44896
|
getExonColor(start, end, pos) { let ic = this.icn3d; ic.icn3dui;
|
|
@@ -45814,6 +45837,7 @@ class AddTrack {
|
|
|
45814
45837
|
let fromArray = [], toArray = [];
|
|
45815
45838
|
let bFound = false;
|
|
45816
45839
|
let seqStartLen = 0;
|
|
45840
|
+
let offset = 0, offsetArray = [];
|
|
45817
45841
|
// for(let k = seqStart; k <= seqEnd; ++k) {
|
|
45818
45842
|
for(let k = 0; k < seqLength; ++k) {
|
|
45819
45843
|
//if(seqFirst[k] == '-') continue;
|
|
@@ -45822,19 +45846,29 @@ class AddTrack {
|
|
|
45822
45846
|
|
|
45823
45847
|
resn = trackSeqArray[j][k];
|
|
45824
45848
|
|
|
45849
|
+
if(resn != '-') {
|
|
45850
|
+
if(!bFound) {
|
|
45851
|
+
seqStartLen = k;
|
|
45852
|
+
bFound = true;
|
|
45853
|
+
|
|
45854
|
+
offset = ic.startposGiSeq - ic.seqStartLen[chainid] + seqStartLen;
|
|
45855
|
+
}
|
|
45856
|
+
}
|
|
45857
|
+
|
|
45825
45858
|
if(prevResn == '-' && resn != '-') {
|
|
45826
45859
|
fromArray.push(k);
|
|
45860
|
+
offsetArray.push(offset);
|
|
45827
45861
|
}
|
|
45828
45862
|
|
|
45829
45863
|
if(prevResn != '-' && resn == '-') {
|
|
45830
45864
|
toArray.push(k - 1);
|
|
45831
45865
|
}
|
|
45832
45866
|
|
|
45833
|
-
|
|
45834
|
-
|
|
45835
|
-
|
|
45836
|
-
|
|
45837
|
-
|
|
45867
|
+
// use "offset" to adjut the residue numbers, e.g., P20138
|
|
45868
|
+
// some isoforms starts residues before the first residue in the template sequence
|
|
45869
|
+
if(k >= ic.seqStartLen[chainid]) {
|
|
45870
|
+
if(seqFirst[k] == '-') offset--;
|
|
45871
|
+
if(resn == '-') offset++;
|
|
45838
45872
|
}
|
|
45839
45873
|
|
|
45840
45874
|
text += resn; //ic.giSeq[chainid][i];
|
|
@@ -45855,7 +45889,7 @@ class AddTrack {
|
|
|
45855
45889
|
let title =(trackTitleArray[j].length < 20) ? trackTitleArray[j] : trackTitleArray[j].substr(0, 20) + '...';
|
|
45856
45890
|
let bMsa = true;
|
|
45857
45891
|
let exonArray = (acc2exons) ? acc2exons[trackTitleArray[j]] : undefined;
|
|
45858
|
-
this.showNewTrack(chainid, title, text, undefined, undefined, type, undefined, bMsa, fromArray, toArray, seqStartLen, exonArray);
|
|
45892
|
+
this.showNewTrack(chainid, title, text, undefined, undefined, type, undefined, bMsa, fromArray, toArray, seqStartLen, exonArray, offsetArray);
|
|
45859
45893
|
}
|
|
45860
45894
|
|
|
45861
45895
|
// update exon color
|
|
@@ -52663,8 +52697,10 @@ class ChainalignParser {
|
|
|
52663
52697
|
//$.when(ic.pdbParserCls.applyCommandDssp(true)).then(function() {
|
|
52664
52698
|
await ic.pdbParserCls.applyCommandDssp(true);
|
|
52665
52699
|
|
|
52700
|
+
// original version =============
|
|
52666
52701
|
// align PDB chains
|
|
52667
52702
|
for(let index in ic.pdbChainIndexHash) {
|
|
52703
|
+
//ic.pdbChainIndexHash[index] = mmdbid_q_tmp + "_" + ic.chain_q + "_" + ic.mmdbid_t + "_" + ic.chain_t;
|
|
52668
52704
|
let idArray = ic.pdbChainIndexHash[index].split('_');
|
|
52669
52705
|
mmdbid_q = idArray[0];
|
|
52670
52706
|
idArray[1];
|
|
@@ -52679,25 +52715,49 @@ class ChainalignParser {
|
|
|
52679
52715
|
let urlalign = me.htmlCls.baseUrl + "vastdyn/vastdyn.cgi";
|
|
52680
52716
|
let urltmalign = me.htmlCls.baseUrl + "tmalign/tmalign.cgi";
|
|
52681
52717
|
|
|
52718
|
+
let resRangeArray = (me.cfg.resrange) ? me.cfg.resrange.split(' | ') : [];
|
|
52719
|
+
|
|
52682
52720
|
for(let index in ic.afChainIndexHash) {
|
|
52683
52721
|
let idArray = ic.afChainIndexHash[index].split('_');
|
|
52684
52722
|
mmdbid_q = idArray[0];
|
|
52685
52723
|
let chain_q = idArray[1];
|
|
52724
|
+
let chainid_q = mmdbid_q + '_' + chain_q;
|
|
52725
|
+
|
|
52686
52726
|
mmdbid_t = idArray[2];
|
|
52687
52727
|
let chain_t = idArray[3];
|
|
52728
|
+
let chainid_t = mmdbid_t + '_' + chain_t;
|
|
52729
|
+
|
|
52730
|
+
let atomSet_t = (me.cfg.resrange) ? ic.realignParserCls.getSeqCoorResid(resRangeArray[0].split(','), chainid_t).hAtoms : ic.chains[chainid_t];
|
|
52731
|
+
let atomSet_q = (me.cfg.resrange) ? ic.realignParserCls.getSeqCoorResid(resRangeArray[index].split(','), chainid_q).hAtoms : ic.chains[chainid_q];
|
|
52732
|
+
// end of original version =============
|
|
52733
|
+
|
|
52734
|
+
/*
|
|
52735
|
+
// new version to be done for VASTsrv ==============
|
|
52736
|
+
// dynamically align pairs in all chainids
|
|
52737
|
+
let ajaxArray = [], indexArray = [], struArray = [];
|
|
52738
|
+
let urlalign = me.htmlCls.baseUrl + "vastdyn/vastdyn.cgi";
|
|
52739
|
+
let urltmalign = me.htmlCls.baseUrl + "tmalign/tmalign.cgi";
|
|
52740
|
+
|
|
52741
|
+
let resRangeArray = (me.cfg.resrange) ? me.cfg.resrange.split(' | ') : [];
|
|
52742
|
+
|
|
52743
|
+
// dynamically align pairs in all chainids
|
|
52744
|
+
let atomSet_t = (me.cfg.resrange) ? ic.realignParserCls.getSeqCoorResid(resRangeArray[0].split(','), chainidArray[0]).hAtoms : ic.chains[chainidArray[0]];
|
|
52745
|
+
for(let index = 1, indexl = chainidArray.length; index < indexl; ++index) {
|
|
52746
|
+
let atomSet_q = (me.cfg.resrange) ? ic.realignParserCls.getSeqCoorResid(resRangeArray[index].split(','), chainidArray[index]).hAtoms : ic.chains[chainidArray[index]];
|
|
52747
|
+
// end of new version to be done for VASTsrv ==============
|
|
52748
|
+
*/
|
|
52688
52749
|
|
|
52689
52750
|
let alignAjax;
|
|
52690
52751
|
if(me.cfg.aligntool != 'tmalign') {
|
|
52691
|
-
let jsonStr_q = ic.domain3dCls.getDomainJsonForAlign(
|
|
52692
|
-
let jsonStr_t = ic.domain3dCls.getDomainJsonForAlign(
|
|
52752
|
+
let jsonStr_q = ic.domain3dCls.getDomainJsonForAlign(atomSet_q);
|
|
52753
|
+
let jsonStr_t = ic.domain3dCls.getDomainJsonForAlign(atomSet_t);
|
|
52693
52754
|
|
|
52694
52755
|
let dataObj = {'domains1': jsonStr_q, 'domains2': jsonStr_t};
|
|
52695
52756
|
alignAjax = me.getAjaxPostPromise(urlalign, dataObj);
|
|
52696
52757
|
}
|
|
52697
52758
|
else {
|
|
52698
|
-
let pdb_query = ic.saveFileCls.getAtomPDB(
|
|
52699
|
-
|
|
52700
|
-
let pdb_target= ic.saveFileCls.getAtomPDB(ic.chains[mmdbid_t + '_' + chain_t]);
|
|
52759
|
+
let pdb_query = ic.saveFileCls.getAtomPDB(atomSet_q);
|
|
52760
|
+
let pdb_target= ic.saveFileCls.getAtomPDB(atomSet_t);
|
|
52701
52761
|
|
|
52702
52762
|
let dataObj = {'pdb_query': pdb_query, 'pdb_target': pdb_target};
|
|
52703
52763
|
alignAjax = me.getAjaxPostPromise(urltmalign, dataObj);
|
|
@@ -53100,7 +53160,7 @@ class ChainalignParser {
|
|
|
53100
53160
|
return chainidArray;
|
|
53101
53161
|
}
|
|
53102
53162
|
|
|
53103
|
-
async downloadChainalignment(chainalign
|
|
53163
|
+
async downloadChainalignment(chainalign) { let ic = this.icn3d, me = ic.icn3dui;
|
|
53104
53164
|
let thisClass = this;
|
|
53105
53165
|
|
|
53106
53166
|
ic.opts['proteins'] = 'c alpha trace';
|
|
@@ -53377,7 +53437,7 @@ class ChainalignParser {
|
|
|
53377
53437
|
async loadOpmDataForChainalign(data1, data2, chainidArray, mmdbidArray) { let ic = this.icn3d, me = ic.icn3dui;
|
|
53378
53438
|
let thisClass = this;
|
|
53379
53439
|
|
|
53380
|
-
if(me.cfg.resnum || me.cfg.resdef) {
|
|
53440
|
+
if(me.cfg.resnum || me.cfg.resdef || me.cfg.resrange) {
|
|
53381
53441
|
if(!ic.bCommandLoad) ic.init(); // remove all previously loaded data
|
|
53382
53442
|
await this.downloadChainalignmentPart2(data1, data2, undefined, chainidArray);
|
|
53383
53443
|
|
|
@@ -58254,6 +58314,7 @@ class DensityCifParser {
|
|
|
58254
58314
|
|
|
58255
58315
|
//https://www.ebi.ac.uk/pdbe/densities/doc.html
|
|
58256
58316
|
if(type == '2fofc' || type == 'fofc') {
|
|
58317
|
+
detail = 0;
|
|
58257
58318
|
url = "https://www.ebi.ac.uk/pdbe/densities/x-ray/" + pdbid.toLowerCase() + "/cell?detail=" + detail;
|
|
58258
58319
|
}
|
|
58259
58320
|
else if(type == 'em') {
|
|
@@ -58294,6 +58355,39 @@ class DensityCifParser {
|
|
|
58294
58355
|
}
|
|
58295
58356
|
}
|
|
58296
58357
|
|
|
58358
|
+
async densityCifParserBase(url, type, sigma, location, bInputSigma) { let ic = this.icn3d, me = ic.icn3dui;
|
|
58359
|
+
let thisClass = this;
|
|
58360
|
+
|
|
58361
|
+
//https://stackoverflow.com/questions/33902299/using-jquery-ajax-to-download-a-binary-file
|
|
58362
|
+
if(type == '2fofc' && ic.bAjax2fofc) {
|
|
58363
|
+
ic.mapData.sigma2 = sigma;
|
|
58364
|
+
ic.setOptionCls.setOption('map', type);
|
|
58365
|
+
}
|
|
58366
|
+
else if(type == 'fofc' && ic.bAjaxfofc) {
|
|
58367
|
+
ic.mapData.sigma = sigma;
|
|
58368
|
+
ic.setOptionCls.setOption('map', type);
|
|
58369
|
+
}
|
|
58370
|
+
else {
|
|
58371
|
+
let arrayBuffer = await me.getXMLHttpRqstPromise(url, 'GET', 'arraybuffer', type);
|
|
58372
|
+
|
|
58373
|
+
thisClass.parseChannels(arrayBuffer, type, sigma);
|
|
58374
|
+
|
|
58375
|
+
if(type == '2fofc' || type == 'fofc') {
|
|
58376
|
+
ic.bAjax2fofc = true;
|
|
58377
|
+
ic.bAjaxfofc = true;
|
|
58378
|
+
|
|
58379
|
+
ic.setOptionCls.setOption('map', type);
|
|
58380
|
+
}
|
|
58381
|
+
else if(type == 'em') {
|
|
58382
|
+
ic.bAjaxEm = true;
|
|
58383
|
+
|
|
58384
|
+
ic.setOptionCls.setOption('emmap', type);
|
|
58385
|
+
}
|
|
58386
|
+
}
|
|
58387
|
+
|
|
58388
|
+
// return sigma;
|
|
58389
|
+
}
|
|
58390
|
+
|
|
58297
58391
|
parseChannels(densitydata, type, sigma) { let ic = this.icn3d; ic.icn3dui;
|
|
58298
58392
|
let cif = this.BinaryParse(densitydata);
|
|
58299
58393
|
|
|
@@ -63286,7 +63380,7 @@ class LoadCIF {
|
|
|
63286
63380
|
|
|
63287
63381
|
let bFirstAtom = true;
|
|
63288
63382
|
|
|
63289
|
-
let cifArray = bcifData.split('ENDMDL\n');
|
|
63383
|
+
let cifArray = (bText) ? bcifData.split('ENDMDL\n') : [bcifData];
|
|
63290
63384
|
|
|
63291
63385
|
for(let index = 0, indexl = cifArray.length; index < indexl; ++index) {
|
|
63292
63386
|
++moleculeNum;
|
|
@@ -66277,6 +66371,16 @@ class ApplyCommand {
|
|
|
66277
66371
|
ic.transformCls.rotateCoord(ic.hAtoms, mArrayFloat);
|
|
66278
66372
|
ic.drawCls.draw();
|
|
66279
66373
|
}
|
|
66374
|
+
else if(command.indexOf('set dssp sse') == 0) {
|
|
66375
|
+
await ic.pdbParserCls.applyCommandDssp();
|
|
66376
|
+
ic.bResetAnno = true;
|
|
66377
|
+
|
|
66378
|
+
if(ic.bAnnoShown) {
|
|
66379
|
+
await ic.showAnnoCls.showAnnotations();
|
|
66380
|
+
|
|
66381
|
+
ic.annotationCls.resetAnnoTabAll();
|
|
66382
|
+
}
|
|
66383
|
+
}
|
|
66280
66384
|
|
|
66281
66385
|
// special, select ==========
|
|
66282
66386
|
|
|
@@ -68259,20 +68363,23 @@ class LoadScript {
|
|
|
68259
68363
|
}
|
|
68260
68364
|
}
|
|
68261
68365
|
else if(command.indexOf('load chainalignment') !== -1) {
|
|
68262
|
-
//load chainalignment [id] | resnum [resnum] | resdef [
|
|
68366
|
+
//load chainalignment [id] | resnum [resnum] | resdef [resdef] | aligntool [aligntool] | parameters [inpara] | resrange [resrange]
|
|
68263
68367
|
let urlArray = command.split(" | ");
|
|
68264
68368
|
if(urlArray.length > 1 && urlArray[1].indexOf('resnum') != -1) {
|
|
68265
68369
|
me.cfg.resnum = urlArray[1].substr(urlArray[1].indexOf('resnum') + 7);
|
|
68266
68370
|
}
|
|
68267
68371
|
if(urlArray.length > 2 && urlArray[2].indexOf('resdef') != -1) {
|
|
68268
|
-
me.cfg.resdef = urlArray[2].substr(urlArray[
|
|
68372
|
+
me.cfg.resdef = urlArray[2].substr(urlArray[2].indexOf('resdef') + 7);
|
|
68269
68373
|
}
|
|
68270
68374
|
if(urlArray.length > 3 && urlArray[3].indexOf('aligntool') != -1) {
|
|
68271
|
-
me.cfg.aligntool = urlArray[3].substr(urlArray[
|
|
68375
|
+
me.cfg.aligntool = urlArray[3].substr(urlArray[3].indexOf('aligntool') + 10);
|
|
68376
|
+
}
|
|
68377
|
+
if(urlArray.length > 5 && urlArray[5].indexOf('resrange') != -1) {
|
|
68378
|
+
me.cfg.resrange = urlArray[5].substr(urlArray[5].indexOf('resrange') + 9);
|
|
68272
68379
|
}
|
|
68273
68380
|
|
|
68274
68381
|
me.cfg.chainalign = id;
|
|
68275
|
-
await ic.chainalignParserCls.downloadChainalignment(id
|
|
68382
|
+
await ic.chainalignParserCls.downloadChainalignment(id);
|
|
68276
68383
|
}
|
|
68277
68384
|
else if(command.indexOf('load url') !== -1) {
|
|
68278
68385
|
let typeStr = load_parameters[1]; // type pdb
|
|
@@ -68321,7 +68428,8 @@ class LoadScript {
|
|
|
68321
68428
|
if(urlArray.length == 2) {
|
|
68322
68429
|
let bInputSigma = true;
|
|
68323
68430
|
if(fileType == 'dsn6') {
|
|
68324
|
-
await ic.dsn6ParserCls.dsn6ParserBase(urlArray[1], type, sigma, 'url', bInputSigma);
|
|
68431
|
+
// await ic.dsn6ParserCls.dsn6ParserBase(urlArray[1], type, sigma, 'url', bInputSigma);
|
|
68432
|
+
await ic.densityCifParserCls.densityCifParserBase(urlArray[1], type, sigma, 'url', bInputSigma);
|
|
68325
68433
|
}
|
|
68326
68434
|
else if(fileType == 'ccp4') {
|
|
68327
68435
|
await ic.ccp4ParserCls.ccp4ParserBase(urlArray[1], type, sigma, 'url', bInputSigma);
|
|
@@ -68334,7 +68442,8 @@ class LoadScript {
|
|
|
68334
68442
|
}
|
|
68335
68443
|
}
|
|
68336
68444
|
else {
|
|
68337
|
-
await ic.dsn6ParserCls.dsn6Parser(ic.inputid, type, sigma);
|
|
68445
|
+
// await ic.dsn6ParserCls.dsn6Parser(ic.inputid, type, sigma);
|
|
68446
|
+
await ic.densityCifParserCls.densityCifParser(ic.inputid, type, sigma);
|
|
68338
68447
|
}
|
|
68339
68448
|
}
|
|
68340
68449
|
// }); // end of me.deferred = $.Deferred(function() {
|
|
@@ -81136,7 +81245,7 @@ class iCn3DUI {
|
|
|
81136
81245
|
//even when multiple iCn3D viewers are shown together.
|
|
81137
81246
|
this.pre = this.cfg.divid + "_";
|
|
81138
81247
|
|
|
81139
|
-
this.REVISION = '3.33.
|
|
81248
|
+
this.REVISION = '3.33.3';
|
|
81140
81249
|
|
|
81141
81250
|
// In nodejs, iCn3D defines "window = {navigator: {}}"
|
|
81142
81251
|
this.bNode = (Object.keys(window).length < 2) ? true : false;
|
|
@@ -81579,9 +81688,9 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
|
|
|
81579
81688
|
|
|
81580
81689
|
ic.bChainAlign = true;
|
|
81581
81690
|
ic.inputid = me.cfg.chainalign;
|
|
81582
|
-
ic.loadCmd = 'load chainalignment ' + me.cfg.chainalign + ' | resnum ' + me.cfg.resnum + ' | resdef ' + me.cfg.resdef + ' | aligntool ' + me.cfg.aligntool + ' | parameters ' + me.cfg.inpara;
|
|
81691
|
+
ic.loadCmd = 'load chainalignment ' + me.cfg.chainalign + ' | resnum ' + me.cfg.resnum + ' | resdef ' + me.cfg.resdef + ' | aligntool ' + me.cfg.aligntool + ' | parameters ' + me.cfg.inpara + ' | resrange ' + me.cfg.resrange;
|
|
81583
81692
|
me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
|
|
81584
|
-
await ic.chainalignParserCls.downloadChainalignment(me.cfg.chainalign
|
|
81693
|
+
await ic.chainalignParserCls.downloadChainalignment(me.cfg.chainalign);
|
|
81585
81694
|
}
|
|
81586
81695
|
else if(me.cfg.mmdbafid !== undefined) {
|
|
81587
81696
|
// ic.bNCBI = true;
|