Skip to content

Commit c77aad3

Browse files
committed
Locus auto-fixes whitespace, change complex content and bug fix
New feature: • Locus input now allow whitespace by trimming it from the final value • Change content of dumpJSON_full (dumpMethod "complex") by adding both expression data (one with just the nucleotide positions that are expressed and one with all) Bug fix: • Responsive UI stopped working, fixed • Compressed size of style.min.css In progress: • Getting the eFP-Seq Browser to work for internet explorer TODO: • Make eFP Overview more responsive to screen's resolution • TMM or TPM and median for additional normalization methods • Expand the creation of the private database to include adding from public and private database to your creation Known bugs: • After generating new data, scrolling up doesn’t work unless the user scrolls down first • Does not work on IE • When selecting more than two datasets to add from existing data to generate new data, it does not add to the generated new data modal • Google Drive repos do not work for IGB links
1 parent 05108ea commit c77aad3

File tree

5 files changed

+33
-121
lines changed

5 files changed

+33
-121
lines changed

Diff for: cgi-bin/core/custom.js

+23-19
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,7 @@ var totalreadsMapped_dic = {};
555555
var locus_dic = {};
556556
var dumpOutputs = "";
557557
var dumpMethod = "simple";
558+
var callDumpOutputs = false;
558559
/**
559560
* Makes AJAX request for each RNA-Seq image based on the rnaseq_calls array that was produced by the populate_table() function
560561
*/
@@ -647,21 +648,24 @@ function rnaseq_images(status) {
647648
document.getElementById(response_rnaseq['record'] + '_totalReadsNum').innerHTML = "Total reads = " + response_rnaseq['totalReadsMapped'];
648649
filtered_2d_totalReads[response_rnaseq['record']] = response_rnaseq['totalReadsMapped'];
649650

650-
// // Generate pre-caching information
651-
// dumpOutputs += '\t\telif (record == "' + response_rnaseq["record"] + '"):\n';
652-
// if (dumpMethod == "complex") {
653-
// dumpOutputs += '\t\t\tdumpJSON(200, "' + response_rnaseq["locus"] + '", ' + response_rnaseq["variant"] + ', ' + response_rnaseq["chromosome"] + ', ' + response_rnaseq["start"] + ', ' + response_rnaseq["end"] + ', "' + response_rnaseq["record"] + '", "' + response_rnaseq["tissue"] + '", "' + response_rnaseq["rnaseqbase64"] + '", ' + response_rnaseq["reads_mapped_to_locus"] + ', ' + response_rnaseq["absolute-fpkm"] + ', [' + response_rnaseq["r"] + '], ' + response_rnaseq["totalReadsMapped"] + ', [' + response_rnaseq["RNASeq_ReadsPerNucleotide"] + '], [';
654-
// for (e = 0; e < response_rnaseq["expected_expr_in_variant"].length; e++) {
655-
// dumpOutputs += '[' + response_rnaseq["expected_expr_in_variant"][e] + ']';
656-
// if (e != response_rnaseq["expected_expr_in_variant"].length - 1) {
657-
// dumpOutputs += ', ';
658-
// }
659-
// }
660-
// dumpOutputs += '])\n'
661-
// }
662-
// else {
663-
// dumpOutputs += '\t\t\tdumpJSON(200, "' + response_rnaseq["locus"] + '", ' + response_rnaseq["variant"] + ', ' + response_rnaseq["chromosome"] + ', ' + response_rnaseq["start"] + ', ' + response_rnaseq["end"] + ', "' + response_rnaseq["record"] + '", "' + response_rnaseq["tissue"] + '", "' + response_rnaseq["rnaseqbase64"] + '", ' + response_rnaseq["reads_mapped_to_locus"] + ', ' + response_rnaseq["absolute-fpkm"] + ', [' + response_rnaseq["r"] + '], ' + response_rnaseq["totalReadsMapped"] + ')\n';
664-
// }
651+
// Generate pre-caching information
652+
if (callDumpOutputs == true) {
653+
dumpOutputs += '\t\telif (record == "' + response_rnaseq["record"] + '"):\n';
654+
if (dumpMethod == "complex") {
655+
dumpOutputs += '\t\t\tdumpJSON(200, "' + response_rnaseq["locus"] + '", ' + response_rnaseq["variant"] + ', ' + response_rnaseq["chromosome"] + ', ' + response_rnaseq["start"] + ', ' + response_rnaseq["end"] + ', "' + response_rnaseq["record"] + '", "' + response_rnaseq["tissue"] + '", "' + response_rnaseq["rnaseqbase64"] + '", ' + response_rnaseq["reads_mapped_to_locus"] + ', ' + response_rnaseq["absolute-fpkm"] + ', [' + response_rnaseq["r"] + '], ' + response_rnaseq["totalReadsMapped"] + ', [' + response_rnaseq["exp_arr"] + '], [' + response_rnaseq["ReadsMappedNucleotidePosition"] + '], {';
656+
for (e = 0; e < response_rnaseq["expected_expr_in_variant"].length; e++) {
657+
dumpOutputs += '"' + GFF_List[e].replace(locus, '') + '": ';
658+
dumpOutputs += '[' + response_rnaseq["expected_expr_in_variant"][e] + ']';
659+
if (e != response_rnaseq["expected_expr_in_variant"].length - 1) {
660+
dumpOutputs += ', ';
661+
}
662+
}
663+
dumpOutputs += '})\n'
664+
}
665+
else {
666+
dumpOutputs += '\t\t\tdumpJSON(200, "' + response_rnaseq["locus"] + '", ' + response_rnaseq["variant"] + ', ' + response_rnaseq["chromosome"] + ', ' + response_rnaseq["start"] + ', ' + response_rnaseq["end"] + ', "' + response_rnaseq["record"] + '", "' + response_rnaseq["tissue"] + '", "' + response_rnaseq["rnaseqbase64"] + '", ' + response_rnaseq["reads_mapped_to_locus"] + ', ' + response_rnaseq["absolute-fpkm"] + ', [' + response_rnaseq["r"] + '], ' + response_rnaseq["totalReadsMapped"] + ')\n';
667+
}
668+
}
665669

666670
// Save the abs-fpkm, and the stats numbers
667671
for (var ii = 0; ii < count_bam_entries_in_xml; ii++) {
@@ -2344,7 +2348,7 @@ function remove_private_database() {
23442348
function correctAGIIDInput() {
23452349
if (document.getElementById("locus").value != "" || document.getElementById("locus").value != " " || document.getElementById("locus").value != undefined || document.getElementById("locus").value != null) {
23462350
var locusID = document.getElementById("locus").value.split("/");
2347-
document.getElementById("locus").value = locusID[0].toUpperCase();
2351+
document.getElementById("locus").value = locusID[0].toUpperCase().trim();
23482352
locus_validation();
23492353
}
23502354
}
@@ -2468,7 +2472,7 @@ function toggleResponsiveTable(forceToggle = 0, buttonClick = false) {
24682472
toggleTableCol("colTitle", true);
24692473
document.getElementById("toggleTitle").checked = true;
24702474
toggleTableCol("colRNA", true);
2471-
document.getElementById("colRNA").checked = true;
2475+
document.getElementById("toggleRNA").checked = true;
24722476
toggleTableCol("colPCC", true);
24732477
document.getElementById("togglePCC").checked = true;
24742478
toggleTableCol("coleFP", true);
@@ -2483,7 +2487,7 @@ function toggleResponsiveTable(forceToggle = 0, buttonClick = false) {
24832487
toggleTableCol("colTitle", false);
24842488
document.getElementById("toggleTitle").checked = false;
24852489
toggleTableCol("colRNA", true);
2486-
document.getElementById("colRNA").checked = true;
2490+
document.getElementById("toggleRNA").checked = true;
24872491
toggleTableCol("colPCC", false);
24882492
document.getElementById("togglePCC").checked = false;
24892493
toggleTableCol("coleFP", false);
@@ -2501,7 +2505,7 @@ function toggleResponsiveTable(forceToggle = 0, buttonClick = false) {
25012505
toggleTableCol("colTitle", ToggledTable[0]);
25022506
document.getElementById("toggleTitle").checked = ToggledTable[0];
25032507
toggleTableCol("colRNA", ToggledTable[1]);
2504-
document.getElementById("colRNA").checked = ToggledTable[1];
2508+
document.getElementById("toggleRNA").checked = ToggledTable[1];
25052509
toggleTableCol("colPCC", ToggledTable[2]);
25062510
document.getElementById("togglePCC").checked = ToggledTable[2];
25072511
toggleTableCol("coleFP", ToggledTable[3]);

0 commit comments

Comments
 (0)