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.module.js
CHANGED
|
@@ -11301,8 +11301,8 @@ class ClickMenu {
|
|
|
11301
11301
|
//if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
11302
11302
|
let sigma2fofc = parseFloat($("#" + me.pre + "sigma2fofc" ).val());
|
|
11303
11303
|
let type = '2fofc';
|
|
11304
|
-
await ic.dsn6ParserCls.dsn6Parser(ic.inputid, type, sigma2fofc);
|
|
11305
|
-
|
|
11304
|
+
//await ic.dsn6ParserCls.dsn6Parser(ic.inputid, type, sigma2fofc);
|
|
11305
|
+
await ic.densityCifParserCls.densityCifParser(ic.inputid, type, sigma2fofc);
|
|
11306
11306
|
|
|
11307
11307
|
//ic.setOptionCls.setOption('map', '2fofc');
|
|
11308
11308
|
thisClass.setLogCmd('set map 2fofc sigma ' + sigma2fofc, true);
|
|
@@ -11314,7 +11314,8 @@ class ClickMenu {
|
|
|
11314
11314
|
//if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
11315
11315
|
let sigmafofc = parseFloat($("#" + me.pre + "sigmafofc" ).val());
|
|
11316
11316
|
let type = 'fofc';
|
|
11317
|
-
await ic.dsn6ParserCls.dsn6Parser(ic.inputid, type, sigmafofc);
|
|
11317
|
+
//await ic.dsn6ParserCls.dsn6Parser(ic.inputid, type, sigmafofc);
|
|
11318
|
+
await ic.densityCifParserCls.densityCifParser(ic.inputid, type, sigma2fofc);
|
|
11318
11319
|
//ic.setOptionCls.setOption('map', 'fofc');
|
|
11319
11320
|
thisClass.setLogCmd('set map fofc sigma ' + sigmafofc, true);
|
|
11320
11321
|
});
|
|
@@ -11863,6 +11864,18 @@ class ClickMenu {
|
|
|
11863
11864
|
me.htmlCls.dialogCls.openDlg('dl_contact', 'Set contact map');
|
|
11864
11865
|
});
|
|
11865
11866
|
|
|
11867
|
+
me.myEventCls.onIds(["#" + me.pre + "mn6_DSSP"], "click", async function(e) { let ic = me.icn3d; //e.preventDefault();
|
|
11868
|
+
thisClass.setLogCmd('set dssp sse', true);
|
|
11869
|
+
await ic.pdbParserCls.applyCommandDssp();
|
|
11870
|
+
ic.bResetAnno = true;
|
|
11871
|
+
|
|
11872
|
+
if(ic.bAnnoShown) {
|
|
11873
|
+
await ic.showAnnoCls.showAnnotations();
|
|
11874
|
+
|
|
11875
|
+
ic.annotationCls.resetAnnoTabAll();
|
|
11876
|
+
}
|
|
11877
|
+
});
|
|
11878
|
+
|
|
11866
11879
|
|
|
11867
11880
|
me.myEventCls.onIds("#" + me.pre + "mn6_hbondsNo", "click", function(e) { let ic = me.icn3d; //e.preventDefault();
|
|
11868
11881
|
ic.showInterCls.hideHbondsContacts();
|
|
@@ -13783,6 +13796,8 @@ class SetMenu {
|
|
|
13783
13796
|
html += "</ul>";
|
|
13784
13797
|
html += "</li>";
|
|
13785
13798
|
|
|
13799
|
+
html += this.getLink('mn6_DSSP', 'DSSP Secondary', undefined, 1);
|
|
13800
|
+
|
|
13786
13801
|
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;
|
|
13787
13802
|
|
|
13788
13803
|
if(bOnePdb) {
|
|
@@ -15083,14 +15098,14 @@ class SetDialog {
|
|
|
15083
15098
|
|
|
15084
15099
|
html += "<span style='white-space:nowrap;font-weight:bold;'>2fofc contour at default threshold or at: "
|
|
15085
15100
|
+ me.htmlCls.inputTextStr + "id='" + me.pre + "dsn6sigma2fofc' value='' size=8> σ</span><br/>";
|
|
15086
|
-
//html += me.htmlCls.inputFileStr + "id='" + me.pre + "dsn6file2fofc'>
|
|
15087
|
-
html += me.htmlCls.inputFileStr + "id='" + me.pre + "dsn6file2fofc'><br>" + me.htmlCls.buttonStr + "
|
|
15101
|
+
//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/>";
|
|
15102
|
+
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/>";
|
|
15088
15103
|
|
|
15089
15104
|
html += "<span style='white-space:nowrap;font-weight:bold;'>fofc contour at default threshold or at: "
|
|
15090
15105
|
+ me.htmlCls.inputTextStr + "id='" + me.pre + "dsn6sigmafofc' value='' size=8> σ</span><br/>";
|
|
15091
15106
|
|
|
15092
|
-
//html += me.htmlCls.inputFileStr + "id='" + me.pre + "dsn6filefofc'>
|
|
15093
|
-
html += me.htmlCls.inputFileStr + "id='" + me.pre + "dsn6filefofc'><br>" + me.htmlCls.buttonStr + "
|
|
15107
|
+
//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>";
|
|
15108
|
+
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>";
|
|
15094
15109
|
|
|
15095
15110
|
|
|
15096
15111
|
html += me.htmlCls.buttonStr + "elecmapNo4'>Remove Map</button><br>";
|
|
@@ -15104,12 +15119,16 @@ class SetDialog {
|
|
|
15104
15119
|
html += "<span style='white-space:nowrap;font-weight:bold;'>2fofc contour at default threshold or at: "
|
|
15105
15120
|
+ me.htmlCls.inputTextStr + "id='" + me.pre + "dsn6sigmaurl2fofc' value='' size=8> σ</span><br/>";
|
|
15106
15121
|
|
|
15107
|
-
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/>";
|
|
15122
|
+
//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/>";
|
|
15123
|
+
|
|
15124
|
+
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/>";
|
|
15108
15125
|
|
|
15109
15126
|
html += "<span style='white-space:nowrap;font-weight:bold;'>fofc contour at default threshold or at: "
|
|
15110
15127
|
+ me.htmlCls.inputTextStr + "id='" + me.pre + "dsn6sigmaurlfofc' value='' size=8> σ</span><br/>";
|
|
15111
15128
|
|
|
15112
|
-
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>";
|
|
15129
|
+
//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>";
|
|
15130
|
+
|
|
15131
|
+
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>";
|
|
15113
15132
|
|
|
15114
15133
|
html += me.htmlCls.buttonStr + "elecmapNo5'>Remove Map</button><br>";
|
|
15115
15134
|
|
|
@@ -15658,8 +15677,9 @@ class SetDialog {
|
|
|
15658
15677
|
html += "</div>";
|
|
15659
15678
|
|
|
15660
15679
|
|
|
15661
|
-
html += me.htmlCls.divStr + "dl_anglemanysets' class='" + dialogClass + "'>";
|
|
15680
|
+
html += me.htmlCls.divStr + "dl_anglemanysets' class='" + dialogClass + "' style='max-width:500px'>";
|
|
15662
15681
|
html += this.addNotebookTitle('dl_anglemanysets', 'Measure angles among many sets');
|
|
15682
|
+
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/>";
|
|
15663
15683
|
html += me.htmlCls.spanNowrapStr + "1. Select sets for pairwise angles</span><br/>";
|
|
15664
15684
|
html += "<table border=0 width=400 cellspacing=10><tr><td>";
|
|
15665
15685
|
|
|
@@ -15981,8 +16001,8 @@ class SetDialog {
|
|
|
15981
16001
|
html += "Z: " + me.htmlCls.inputTextStr + "id='" + me.pre + "v2Z' value='' size=6><br>";
|
|
15982
16002
|
html += "<br>";
|
|
15983
16003
|
|
|
15984
|
-
html += me.htmlCls.buttonStr + "measure_angle'>Measure Angle</button>";
|
|
15985
|
-
html += "The angle is: " + me.htmlCls.inputTextStr + "id='" + me.pre + "angle_value' value='' size=6> degree
|
|
16004
|
+
html += me.htmlCls.buttonStr + "measure_angle'>Measure Angle</button><br><br>";
|
|
16005
|
+
html += "The angle is: " + me.htmlCls.inputTextStr + "id='" + me.pre + "angle_value' value='' size=6> degree.<br><br>";
|
|
15986
16006
|
html += "</div>";
|
|
15987
16007
|
|
|
15988
16008
|
html += me.htmlCls.divStr + "dl_matrix' class='" + dialogClass + "'>";
|
|
@@ -45427,7 +45447,7 @@ class AddTrack {
|
|
|
45427
45447
|
|
|
45428
45448
|
}
|
|
45429
45449
|
|
|
45430
|
-
showNewTrack(chnid, title, text, cssColorArray, inTarget2queryHash, type, color, bMsa, fromArray, toArray, seqStartLen, exonArray) { let ic = this.icn3d, me = ic.icn3dui;
|
|
45450
|
+
showNewTrack(chnid, title, text, cssColorArray, inTarget2queryHash, type, color, bMsa, fromArray, toArray, seqStartLen, exonArray, offsetArray) { let ic = this.icn3d, me = ic.icn3dui;
|
|
45431
45451
|
//if(ic.customTracks[chnid] === undefined) {
|
|
45432
45452
|
// ic.customTracks[chnid] = {}
|
|
45433
45453
|
//}
|
|
@@ -45645,14 +45665,16 @@ class AddTrack {
|
|
|
45645
45665
|
|
|
45646
45666
|
if(fromArray !== undefined) {
|
|
45647
45667
|
htmlTmp2 = '';
|
|
45648
|
-
let fromArray2 = [], toArray2 = [];
|
|
45668
|
+
let fromArray2 = [], toArray2 = [], offsetArray2 = [];
|
|
45649
45669
|
for(let i = 0, il = fromArray.length; i < il; ++i) {
|
|
45650
45670
|
fromArray2.push(fromArray[i]);
|
|
45671
|
+
offsetArray2.push(offsetArray[i]);
|
|
45651
45672
|
|
|
45652
45673
|
for(let j = parseInt(fromArray[i]); j <= parseInt(toArray[i]); ++j) {
|
|
45653
45674
|
if(ic.targetGapHash !== undefined && ic.targetGapHash.hasOwnProperty(j)) {
|
|
45654
45675
|
toArray2.push(j - 1);
|
|
45655
45676
|
fromArray2.push(j);
|
|
45677
|
+
offsetArray2.push(offsetArray[i]);
|
|
45656
45678
|
}
|
|
45657
45679
|
}
|
|
45658
45680
|
|
|
@@ -45686,6 +45708,7 @@ class AddTrack {
|
|
|
45686
45708
|
// determine how this range sits in the exon ranges in exonArray
|
|
45687
45709
|
let startExon, endExon;
|
|
45688
45710
|
|
|
45711
|
+
let offset = offsetArray2[i];
|
|
45689
45712
|
cnt = toArray[i] - fromArray[i] + 1;
|
|
45690
45713
|
let from = prevCntTotal, to = prevCntTotal + cnt - 1;
|
|
45691
45714
|
|
|
@@ -45714,26 +45737,26 @@ class AddTrack {
|
|
|
45714
45737
|
endColorStr = this.getExonColor(startExon.rangeStart, startExon.rangeEnd, to);
|
|
45715
45738
|
|
|
45716
45739
|
colorGradient = startColorStr + ' 0%, #FFF 50%, ' + endColorStr + ' 100%';
|
|
45717
|
-
htmlTmp2 += this.getExonHtml(startExon.exonIndex, colorGradient, startExon.from, endExon.to, startExon.genomeRange, chnid, simpTitle);
|
|
45740
|
+
htmlTmp2 += this.getExonHtml(startExon.exonIndex, colorGradient, startExon.from, endExon.to, startExon.genomeRange, chnid, simpTitle, offset);
|
|
45718
45741
|
}
|
|
45719
45742
|
else {
|
|
45720
45743
|
if(startExon) {
|
|
45721
45744
|
startColorStr = this.getExonColor(startExon.rangeStart, startExon.rangeEnd, from);
|
|
45722
45745
|
|
|
45723
45746
|
colorGradient = startColorStr + ' 0%, #FFF 50%, #00F 100%';
|
|
45724
|
-
htmlTmp2 += this.getExonHtml(startExon.exonIndex, colorGradient, startExon.from, startExon.rangeEnd, startExon.genomeRange, chnid, simpTitle);
|
|
45747
|
+
htmlTmp2 += this.getExonHtml(startExon.exonIndex, colorGradient, startExon.from, startExon.rangeEnd, startExon.genomeRange, chnid, simpTitle, offset);
|
|
45725
45748
|
}
|
|
45726
45749
|
|
|
45727
45750
|
if(startExon && endExon) {
|
|
45728
45751
|
for(let j = startExon.exonIndex + 1; j < endExon.exonIndex; ++j) {
|
|
45729
45752
|
colorGradient = '#F00 0%, #FFF 50%, #00F 100%';
|
|
45730
|
-
htmlTmp2 += this.getExonHtml(j, colorGradient, exonArray[j].resStart, exonArray[j].resEnd, exonArray[j].genomeRange, chnid, simpTitle);
|
|
45753
|
+
htmlTmp2 += this.getExonHtml(j, colorGradient, exonArray[j].resStart, exonArray[j].resEnd, exonArray[j].genomeRange, chnid, simpTitle, offset);
|
|
45731
45754
|
}
|
|
45732
45755
|
|
|
45733
45756
|
endColorStr = this.getExonColor(endExon.rangeStart, endExon.rangeEnd, to);
|
|
45734
45757
|
|
|
45735
45758
|
colorGradient = '#F00 0%, #FFF 50%, ' + endColorStr + ' 100%';
|
|
45736
|
-
htmlTmp2 += this.getExonHtml(endExon.exonIndex, colorGradient, endExon.rangeStart, endExon.to, endExon.genomeRange, chnid, simpTitle);
|
|
45759
|
+
htmlTmp2 += this.getExonHtml(endExon.exonIndex, colorGradient, endExon.rangeStart, endExon.to, endExon.genomeRange, chnid, simpTitle, offset);
|
|
45737
45760
|
}
|
|
45738
45761
|
}
|
|
45739
45762
|
|
|
@@ -45767,8 +45790,8 @@ class AddTrack {
|
|
|
45767
45790
|
}
|
|
45768
45791
|
}
|
|
45769
45792
|
|
|
45770
|
-
getExonHtml(exonIndex, colorGradient, from, to, genomeRange, chainid, simpTitle) { let ic = this.icn3d; ic.icn3dui;
|
|
45771
|
-
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>';
|
|
45793
|
+
getExonHtml(exonIndex, colorGradient, from, to, genomeRange, chainid, simpTitle, offset) { let ic = this.icn3d; ic.icn3dui;
|
|
45794
|
+
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>';
|
|
45772
45795
|
}
|
|
45773
45796
|
|
|
45774
45797
|
getExonColor(start, end, pos) { let ic = this.icn3d; ic.icn3dui;
|
|
@@ -46715,6 +46738,7 @@ class AddTrack {
|
|
|
46715
46738
|
let fromArray = [], toArray = [];
|
|
46716
46739
|
let bFound = false;
|
|
46717
46740
|
let seqStartLen = 0;
|
|
46741
|
+
let offset = 0, offsetArray = [];
|
|
46718
46742
|
// for(let k = seqStart; k <= seqEnd; ++k) {
|
|
46719
46743
|
for(let k = 0; k < seqLength; ++k) {
|
|
46720
46744
|
//if(seqFirst[k] == '-') continue;
|
|
@@ -46723,19 +46747,29 @@ class AddTrack {
|
|
|
46723
46747
|
|
|
46724
46748
|
resn = trackSeqArray[j][k];
|
|
46725
46749
|
|
|
46750
|
+
if(resn != '-') {
|
|
46751
|
+
if(!bFound) {
|
|
46752
|
+
seqStartLen = k;
|
|
46753
|
+
bFound = true;
|
|
46754
|
+
|
|
46755
|
+
offset = ic.startposGiSeq - ic.seqStartLen[chainid] + seqStartLen;
|
|
46756
|
+
}
|
|
46757
|
+
}
|
|
46758
|
+
|
|
46726
46759
|
if(prevResn == '-' && resn != '-') {
|
|
46727
46760
|
fromArray.push(k);
|
|
46761
|
+
offsetArray.push(offset);
|
|
46728
46762
|
}
|
|
46729
46763
|
|
|
46730
46764
|
if(prevResn != '-' && resn == '-') {
|
|
46731
46765
|
toArray.push(k - 1);
|
|
46732
46766
|
}
|
|
46733
46767
|
|
|
46734
|
-
|
|
46735
|
-
|
|
46736
|
-
|
|
46737
|
-
|
|
46738
|
-
|
|
46768
|
+
// use "offset" to adjut the residue numbers, e.g., P20138
|
|
46769
|
+
// some isoforms starts residues before the first residue in the template sequence
|
|
46770
|
+
if(k >= ic.seqStartLen[chainid]) {
|
|
46771
|
+
if(seqFirst[k] == '-') offset--;
|
|
46772
|
+
if(resn == '-') offset++;
|
|
46739
46773
|
}
|
|
46740
46774
|
|
|
46741
46775
|
text += resn; //ic.giSeq[chainid][i];
|
|
@@ -46756,7 +46790,7 @@ class AddTrack {
|
|
|
46756
46790
|
let title =(trackTitleArray[j].length < 20) ? trackTitleArray[j] : trackTitleArray[j].substr(0, 20) + '...';
|
|
46757
46791
|
let bMsa = true;
|
|
46758
46792
|
let exonArray = (acc2exons) ? acc2exons[trackTitleArray[j]] : undefined;
|
|
46759
|
-
this.showNewTrack(chainid, title, text, undefined, undefined, type, undefined, bMsa, fromArray, toArray, seqStartLen, exonArray);
|
|
46793
|
+
this.showNewTrack(chainid, title, text, undefined, undefined, type, undefined, bMsa, fromArray, toArray, seqStartLen, exonArray, offsetArray);
|
|
46760
46794
|
}
|
|
46761
46795
|
|
|
46762
46796
|
// update exon color
|
|
@@ -53564,8 +53598,10 @@ class ChainalignParser {
|
|
|
53564
53598
|
//$.when(ic.pdbParserCls.applyCommandDssp(true)).then(function() {
|
|
53565
53599
|
await ic.pdbParserCls.applyCommandDssp(true);
|
|
53566
53600
|
|
|
53601
|
+
// original version =============
|
|
53567
53602
|
// align PDB chains
|
|
53568
53603
|
for(let index in ic.pdbChainIndexHash) {
|
|
53604
|
+
//ic.pdbChainIndexHash[index] = mmdbid_q_tmp + "_" + ic.chain_q + "_" + ic.mmdbid_t + "_" + ic.chain_t;
|
|
53569
53605
|
let idArray = ic.pdbChainIndexHash[index].split('_');
|
|
53570
53606
|
mmdbid_q = idArray[0];
|
|
53571
53607
|
idArray[1];
|
|
@@ -53580,25 +53616,49 @@ class ChainalignParser {
|
|
|
53580
53616
|
let urlalign = me.htmlCls.baseUrl + "vastdyn/vastdyn.cgi";
|
|
53581
53617
|
let urltmalign = me.htmlCls.baseUrl + "tmalign/tmalign.cgi";
|
|
53582
53618
|
|
|
53619
|
+
let resRangeArray = (me.cfg.resrange) ? me.cfg.resrange.split(' | ') : [];
|
|
53620
|
+
|
|
53583
53621
|
for(let index in ic.afChainIndexHash) {
|
|
53584
53622
|
let idArray = ic.afChainIndexHash[index].split('_');
|
|
53585
53623
|
mmdbid_q = idArray[0];
|
|
53586
53624
|
let chain_q = idArray[1];
|
|
53625
|
+
let chainid_q = mmdbid_q + '_' + chain_q;
|
|
53626
|
+
|
|
53587
53627
|
mmdbid_t = idArray[2];
|
|
53588
53628
|
let chain_t = idArray[3];
|
|
53629
|
+
let chainid_t = mmdbid_t + '_' + chain_t;
|
|
53630
|
+
|
|
53631
|
+
let atomSet_t = (me.cfg.resrange) ? ic.realignParserCls.getSeqCoorResid(resRangeArray[0].split(','), chainid_t).hAtoms : ic.chains[chainid_t];
|
|
53632
|
+
let atomSet_q = (me.cfg.resrange) ? ic.realignParserCls.getSeqCoorResid(resRangeArray[index].split(','), chainid_q).hAtoms : ic.chains[chainid_q];
|
|
53633
|
+
// end of original version =============
|
|
53634
|
+
|
|
53635
|
+
/*
|
|
53636
|
+
// new version to be done for VASTsrv ==============
|
|
53637
|
+
// dynamically align pairs in all chainids
|
|
53638
|
+
let ajaxArray = [], indexArray = [], struArray = [];
|
|
53639
|
+
let urlalign = me.htmlCls.baseUrl + "vastdyn/vastdyn.cgi";
|
|
53640
|
+
let urltmalign = me.htmlCls.baseUrl + "tmalign/tmalign.cgi";
|
|
53641
|
+
|
|
53642
|
+
let resRangeArray = (me.cfg.resrange) ? me.cfg.resrange.split(' | ') : [];
|
|
53643
|
+
|
|
53644
|
+
// dynamically align pairs in all chainids
|
|
53645
|
+
let atomSet_t = (me.cfg.resrange) ? ic.realignParserCls.getSeqCoorResid(resRangeArray[0].split(','), chainidArray[0]).hAtoms : ic.chains[chainidArray[0]];
|
|
53646
|
+
for(let index = 1, indexl = chainidArray.length; index < indexl; ++index) {
|
|
53647
|
+
let atomSet_q = (me.cfg.resrange) ? ic.realignParserCls.getSeqCoorResid(resRangeArray[index].split(','), chainidArray[index]).hAtoms : ic.chains[chainidArray[index]];
|
|
53648
|
+
// end of new version to be done for VASTsrv ==============
|
|
53649
|
+
*/
|
|
53589
53650
|
|
|
53590
53651
|
let alignAjax;
|
|
53591
53652
|
if(me.cfg.aligntool != 'tmalign') {
|
|
53592
|
-
let jsonStr_q = ic.domain3dCls.getDomainJsonForAlign(
|
|
53593
|
-
let jsonStr_t = ic.domain3dCls.getDomainJsonForAlign(
|
|
53653
|
+
let jsonStr_q = ic.domain3dCls.getDomainJsonForAlign(atomSet_q);
|
|
53654
|
+
let jsonStr_t = ic.domain3dCls.getDomainJsonForAlign(atomSet_t);
|
|
53594
53655
|
|
|
53595
53656
|
let dataObj = {'domains1': jsonStr_q, 'domains2': jsonStr_t};
|
|
53596
53657
|
alignAjax = me.getAjaxPostPromise(urlalign, dataObj);
|
|
53597
53658
|
}
|
|
53598
53659
|
else {
|
|
53599
|
-
let pdb_query = ic.saveFileCls.getAtomPDB(
|
|
53600
|
-
|
|
53601
|
-
let pdb_target= ic.saveFileCls.getAtomPDB(ic.chains[mmdbid_t + '_' + chain_t]);
|
|
53660
|
+
let pdb_query = ic.saveFileCls.getAtomPDB(atomSet_q);
|
|
53661
|
+
let pdb_target= ic.saveFileCls.getAtomPDB(atomSet_t);
|
|
53602
53662
|
|
|
53603
53663
|
let dataObj = {'pdb_query': pdb_query, 'pdb_target': pdb_target};
|
|
53604
53664
|
alignAjax = me.getAjaxPostPromise(urltmalign, dataObj);
|
|
@@ -54001,7 +54061,7 @@ class ChainalignParser {
|
|
|
54001
54061
|
return chainidArray;
|
|
54002
54062
|
}
|
|
54003
54063
|
|
|
54004
|
-
async downloadChainalignment(chainalign
|
|
54064
|
+
async downloadChainalignment(chainalign) { let ic = this.icn3d, me = ic.icn3dui;
|
|
54005
54065
|
let thisClass = this;
|
|
54006
54066
|
|
|
54007
54067
|
ic.opts['proteins'] = 'c alpha trace';
|
|
@@ -54278,7 +54338,7 @@ class ChainalignParser {
|
|
|
54278
54338
|
async loadOpmDataForChainalign(data1, data2, chainidArray, mmdbidArray) { let ic = this.icn3d, me = ic.icn3dui;
|
|
54279
54339
|
let thisClass = this;
|
|
54280
54340
|
|
|
54281
|
-
if(me.cfg.resnum || me.cfg.resdef) {
|
|
54341
|
+
if(me.cfg.resnum || me.cfg.resdef || me.cfg.resrange) {
|
|
54282
54342
|
if(!ic.bCommandLoad) ic.init(); // remove all previously loaded data
|
|
54283
54343
|
await this.downloadChainalignmentPart2(data1, data2, undefined, chainidArray);
|
|
54284
54344
|
|
|
@@ -59155,6 +59215,7 @@ class DensityCifParser {
|
|
|
59155
59215
|
|
|
59156
59216
|
//https://www.ebi.ac.uk/pdbe/densities/doc.html
|
|
59157
59217
|
if(type == '2fofc' || type == 'fofc') {
|
|
59218
|
+
detail = 0;
|
|
59158
59219
|
url = "https://www.ebi.ac.uk/pdbe/densities/x-ray/" + pdbid.toLowerCase() + "/cell?detail=" + detail;
|
|
59159
59220
|
}
|
|
59160
59221
|
else if(type == 'em') {
|
|
@@ -59195,6 +59256,39 @@ class DensityCifParser {
|
|
|
59195
59256
|
}
|
|
59196
59257
|
}
|
|
59197
59258
|
|
|
59259
|
+
async densityCifParserBase(url, type, sigma, location, bInputSigma) { let ic = this.icn3d, me = ic.icn3dui;
|
|
59260
|
+
let thisClass = this;
|
|
59261
|
+
|
|
59262
|
+
//https://stackoverflow.com/questions/33902299/using-jquery-ajax-to-download-a-binary-file
|
|
59263
|
+
if(type == '2fofc' && ic.bAjax2fofc) {
|
|
59264
|
+
ic.mapData.sigma2 = sigma;
|
|
59265
|
+
ic.setOptionCls.setOption('map', type);
|
|
59266
|
+
}
|
|
59267
|
+
else if(type == 'fofc' && ic.bAjaxfofc) {
|
|
59268
|
+
ic.mapData.sigma = sigma;
|
|
59269
|
+
ic.setOptionCls.setOption('map', type);
|
|
59270
|
+
}
|
|
59271
|
+
else {
|
|
59272
|
+
let arrayBuffer = await me.getXMLHttpRqstPromise(url, 'GET', 'arraybuffer', type);
|
|
59273
|
+
|
|
59274
|
+
thisClass.parseChannels(arrayBuffer, type, sigma);
|
|
59275
|
+
|
|
59276
|
+
if(type == '2fofc' || type == 'fofc') {
|
|
59277
|
+
ic.bAjax2fofc = true;
|
|
59278
|
+
ic.bAjaxfofc = true;
|
|
59279
|
+
|
|
59280
|
+
ic.setOptionCls.setOption('map', type);
|
|
59281
|
+
}
|
|
59282
|
+
else if(type == 'em') {
|
|
59283
|
+
ic.bAjaxEm = true;
|
|
59284
|
+
|
|
59285
|
+
ic.setOptionCls.setOption('emmap', type);
|
|
59286
|
+
}
|
|
59287
|
+
}
|
|
59288
|
+
|
|
59289
|
+
// return sigma;
|
|
59290
|
+
}
|
|
59291
|
+
|
|
59198
59292
|
parseChannels(densitydata, type, sigma) { let ic = this.icn3d; ic.icn3dui;
|
|
59199
59293
|
let cif = this.BinaryParse(densitydata);
|
|
59200
59294
|
|
|
@@ -64187,7 +64281,7 @@ class LoadCIF {
|
|
|
64187
64281
|
|
|
64188
64282
|
let bFirstAtom = true;
|
|
64189
64283
|
|
|
64190
|
-
let cifArray = bcifData.split('ENDMDL\n');
|
|
64284
|
+
let cifArray = (bText) ? bcifData.split('ENDMDL\n') : [bcifData];
|
|
64191
64285
|
|
|
64192
64286
|
for(let index = 0, indexl = cifArray.length; index < indexl; ++index) {
|
|
64193
64287
|
++moleculeNum;
|
|
@@ -67178,6 +67272,16 @@ class ApplyCommand {
|
|
|
67178
67272
|
ic.transformCls.rotateCoord(ic.hAtoms, mArrayFloat);
|
|
67179
67273
|
ic.drawCls.draw();
|
|
67180
67274
|
}
|
|
67275
|
+
else if(command.indexOf('set dssp sse') == 0) {
|
|
67276
|
+
await ic.pdbParserCls.applyCommandDssp();
|
|
67277
|
+
ic.bResetAnno = true;
|
|
67278
|
+
|
|
67279
|
+
if(ic.bAnnoShown) {
|
|
67280
|
+
await ic.showAnnoCls.showAnnotations();
|
|
67281
|
+
|
|
67282
|
+
ic.annotationCls.resetAnnoTabAll();
|
|
67283
|
+
}
|
|
67284
|
+
}
|
|
67181
67285
|
|
|
67182
67286
|
// special, select ==========
|
|
67183
67287
|
|
|
@@ -69160,20 +69264,23 @@ class LoadScript {
|
|
|
69160
69264
|
}
|
|
69161
69265
|
}
|
|
69162
69266
|
else if(command.indexOf('load chainalignment') !== -1) {
|
|
69163
|
-
//load chainalignment [id] | resnum [resnum] | resdef [
|
|
69267
|
+
//load chainalignment [id] | resnum [resnum] | resdef [resdef] | aligntool [aligntool] | parameters [inpara] | resrange [resrange]
|
|
69164
69268
|
let urlArray = command.split(" | ");
|
|
69165
69269
|
if(urlArray.length > 1 && urlArray[1].indexOf('resnum') != -1) {
|
|
69166
69270
|
me.cfg.resnum = urlArray[1].substr(urlArray[1].indexOf('resnum') + 7);
|
|
69167
69271
|
}
|
|
69168
69272
|
if(urlArray.length > 2 && urlArray[2].indexOf('resdef') != -1) {
|
|
69169
|
-
me.cfg.resdef = urlArray[2].substr(urlArray[
|
|
69273
|
+
me.cfg.resdef = urlArray[2].substr(urlArray[2].indexOf('resdef') + 7);
|
|
69170
69274
|
}
|
|
69171
69275
|
if(urlArray.length > 3 && urlArray[3].indexOf('aligntool') != -1) {
|
|
69172
|
-
me.cfg.aligntool = urlArray[3].substr(urlArray[
|
|
69276
|
+
me.cfg.aligntool = urlArray[3].substr(urlArray[3].indexOf('aligntool') + 10);
|
|
69277
|
+
}
|
|
69278
|
+
if(urlArray.length > 5 && urlArray[5].indexOf('resrange') != -1) {
|
|
69279
|
+
me.cfg.resrange = urlArray[5].substr(urlArray[5].indexOf('resrange') + 9);
|
|
69173
69280
|
}
|
|
69174
69281
|
|
|
69175
69282
|
me.cfg.chainalign = id;
|
|
69176
|
-
await ic.chainalignParserCls.downloadChainalignment(id
|
|
69283
|
+
await ic.chainalignParserCls.downloadChainalignment(id);
|
|
69177
69284
|
}
|
|
69178
69285
|
else if(command.indexOf('load url') !== -1) {
|
|
69179
69286
|
let typeStr = load_parameters[1]; // type pdb
|
|
@@ -69222,7 +69329,8 @@ class LoadScript {
|
|
|
69222
69329
|
if(urlArray.length == 2) {
|
|
69223
69330
|
let bInputSigma = true;
|
|
69224
69331
|
if(fileType == 'dsn6') {
|
|
69225
|
-
await ic.dsn6ParserCls.dsn6ParserBase(urlArray[1], type, sigma, 'url', bInputSigma);
|
|
69332
|
+
// await ic.dsn6ParserCls.dsn6ParserBase(urlArray[1], type, sigma, 'url', bInputSigma);
|
|
69333
|
+
await ic.densityCifParserCls.densityCifParserBase(urlArray[1], type, sigma, 'url', bInputSigma);
|
|
69226
69334
|
}
|
|
69227
69335
|
else if(fileType == 'ccp4') {
|
|
69228
69336
|
await ic.ccp4ParserCls.ccp4ParserBase(urlArray[1], type, sigma, 'url', bInputSigma);
|
|
@@ -69235,7 +69343,8 @@ class LoadScript {
|
|
|
69235
69343
|
}
|
|
69236
69344
|
}
|
|
69237
69345
|
else {
|
|
69238
|
-
await ic.dsn6ParserCls.dsn6Parser(ic.inputid, type, sigma);
|
|
69346
|
+
// await ic.dsn6ParserCls.dsn6Parser(ic.inputid, type, sigma);
|
|
69347
|
+
await ic.densityCifParserCls.densityCifParser(ic.inputid, type, sigma);
|
|
69239
69348
|
}
|
|
69240
69349
|
}
|
|
69241
69350
|
// }); // end of me.deferred = $.Deferred(function() {
|
|
@@ -82037,7 +82146,7 @@ class iCn3DUI {
|
|
|
82037
82146
|
//even when multiple iCn3D viewers are shown together.
|
|
82038
82147
|
this.pre = this.cfg.divid + "_";
|
|
82039
82148
|
|
|
82040
|
-
this.REVISION = '3.33.
|
|
82149
|
+
this.REVISION = '3.33.3';
|
|
82041
82150
|
|
|
82042
82151
|
// In nodejs, iCn3D defines "window = {navigator: {}}"
|
|
82043
82152
|
this.bNode = (Object.keys(window).length < 2) ? true : false;
|
|
@@ -82480,9 +82589,9 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
|
|
|
82480
82589
|
|
|
82481
82590
|
ic.bChainAlign = true;
|
|
82482
82591
|
ic.inputid = me.cfg.chainalign;
|
|
82483
|
-
ic.loadCmd = 'load chainalignment ' + me.cfg.chainalign + ' | resnum ' + me.cfg.resnum + ' | resdef ' + me.cfg.resdef + ' | aligntool ' + me.cfg.aligntool + ' | parameters ' + me.cfg.inpara;
|
|
82592
|
+
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;
|
|
82484
82593
|
me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
|
|
82485
|
-
await ic.chainalignParserCls.downloadChainalignment(me.cfg.chainalign
|
|
82594
|
+
await ic.chainalignParserCls.downloadChainalignment(me.cfg.chainalign);
|
|
82486
82595
|
}
|
|
82487
82596
|
else if(me.cfg.mmdbafid !== undefined) {
|
|
82488
82597
|
// ic.bNCBI = true;
|