Commit 670d34f9 authored by Hoogenboom, Jerry's avatar Hoogenboom, Jerry
Browse files

Add Samplevis option to apply graph filtering before noise correction

parent 13451a12
...@@ -29,6 +29,9 @@ Alternatively, FDSTools can be installed by running: ...@@ -29,6 +29,9 @@ Alternatively, FDSTools can be installed by running:
FDSTools Changelog FDSTools Changelog
------------------ ------------------
v1.1.2
- Includes Samplevis v2.2.1
v1.1.1 v1.1.1
- Includes TSSV v1.1.1 - Includes TSSV v1.1.1
...@@ -616,6 +619,10 @@ v1.0.0 ...@@ -616,6 +619,10 @@ v1.0.0
Samplevis Samplevis
~~~~~~~~~ ~~~~~~~~~
v2.2.1
- Added an option to apply graph filtering before noise correction (on by
default)
v2.2.0 v2.2.0
- Fixed incorrect calculation of 'percentage of highest' if the 'sequence' - Fixed incorrect calculation of 'percentage of highest' if the 'sequence'
with the highest read count within a marker is the aggregated 'Other with the highest read count within a marker is the aggregated 'Other
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Sample Visualisation - FDSTools</title> <title>Sample Visualisation - FDSTools</title>
<!-- VERSION 2.1.2 --> <!-- VERSION 2.2.1 -->
<!-- BEGIN_LIBRARIES --> <!-- BEGIN_LIBRARIES -->
<script src="https://vega.github.io/vega-editor/vendor/d3.min.js"></script> <script src="https://vega.github.io/vega-editor/vendor/d3.min.js"></script>
<script src="https://vega.github.io/vega/vega.min.js"></script> <script src="https://vega.github.io/vega/vega.min.js"></script>
...@@ -531,6 +531,14 @@ ...@@ -531,6 +531,14 @@
</label> </label>
</td> </td>
</tr> </tr>
<tr>
<td colspan="2">
<label>
<input type="checkbox" id="filteruncorrected" checked>
Filter before noise correction
</label>
</td>
</tr>
<tr> <tr>
<td colspan="2"> <td colspan="2">
<label> <label>
...@@ -1667,6 +1675,9 @@ function onLoadSpec(has_data, no_file_chooser){ ...@@ -1667,6 +1675,9 @@ function onLoadSpec(has_data, no_file_chooser){
document.getElementById("shownegative").addEventListener('change', function(){ document.getElementById("shownegative").addEventListener('change', function(){
setSignalValue("show_negative", this.checked); setSignalValue("show_negative", this.checked);
}, false); }, false);
document.getElementById("filteruncorrected").addEventListener('change', function(){
setSignalValue("filter_uncorrected", this.checked);
}, false);
document.getElementById("showother").addEventListener('change', function(){ document.getElementById("showother").addEventListener('change', function(){
setSignalValue("show_other", this.checked); setSignalValue("show_other", this.checked);
}, false); }, false);
...@@ -1701,6 +1712,7 @@ function onLoadSpec(has_data, no_file_chooser){ ...@@ -1701,6 +1712,7 @@ function onLoadSpec(has_data, no_file_chooser){
document.getElementById("minOa").value = getSignalValue("allele_orientation_threshold"); document.getElementById("minOa").value = getSignalValue("allele_orientation_threshold");
document.getElementById("minBias").value = getSignalValue("bias_threshold"); document.getElementById("minBias").value = getSignalValue("bias_threshold");
document.getElementById("shownegative").checked = getSignalValue("show_negative"); document.getElementById("shownegative").checked = getSignalValue("show_negative");
document.getElementById("filteruncorrected").checked = getSignalValue("filter_uncorrected");
document.getElementById("showother").checked = getSignalValue("show_other"); document.getElementById("showother").checked = getSignalValue("show_other");
document.getElementById("sortstrbylength").checked = getSignalValue("sort_str_by_length"); document.getElementById("sortstrbylength").checked = getSignalValue("sort_str_by_length");
document.getElementById("commonrange").checked = (graph_spec.marks[1].scales[0].domain.data == "table"); document.getElementById("commonrange").checked = (graph_spec.marks[1].scales[0].domain.data == "table");
......
{ {
"fdstools_visversion": "2.2.0", "fdstools_visversion": "2.2.1",
"width": 600, "width": 600,
"height": 10, "height": 10,
"signals": [ "signals": [
...@@ -47,6 +47,10 @@ ...@@ -47,6 +47,10 @@
"name": "show_negative", "name": "show_negative",
"init": true "init": true
}, },
{
"name": "filter_uncorrected",
"init": true
},
{ {
"name": "show_other", "name": "show_other",
"init": true "init": true
...@@ -181,7 +185,7 @@ ...@@ -181,7 +185,7 @@
{ {
"type": "aggregate", "type": "aggregate",
"groupby": ["marker"], "groupby": ["marker"],
"summarize": {"total_added": ["max"]} "summarize": {"total_added": ["max"], "total": ["max"]}
} }
] ]
}, },
...@@ -196,7 +200,7 @@ ...@@ -196,7 +200,7 @@
{ {
"type": "aggregate", "type": "aggregate",
"groupby": ["marker"], "groupby": ["marker"],
"summarize": {"total_added": ["sum"]} "summarize": {"total_added": ["sum"], "total": ["sum"]}
} }
] ]
}, },
...@@ -230,6 +234,16 @@ ...@@ -230,6 +234,16 @@
"field": "pct_of_sum", "field": "pct_of_sum",
"expr": "datum.aggrs.sum_total_added? (datum.total_added / datum.aggrs.sum_total_added * 100) : 100" "expr": "datum.aggrs.sum_total_added? (datum.total_added / datum.aggrs.sum_total_added * 100) : 100"
}, },
{
"type": "formula",
"field": "pct_of_max_uncorrected",
"expr": "datum.aggrm.max_total? (datum.total / datum.aggrm.max_total * 100) : 100"
},
{
"type": "formula",
"field": "pct_of_sum_uncorrected",
"expr": "datum.aggrs.sum_total? (datum.total / datum.aggrs.sum_total * 100) : 100"
},
{ {
"type": "formula", "type": "formula",
"field": "strlength", "field": "strlength",
...@@ -316,7 +330,7 @@ ...@@ -316,7 +330,7 @@
{ {
"type": "formula", "type": "formula",
"field": "sequence", "field": "sequence",
"expr": "((show_negative? abs(datum.total_added) : datum.total_added) >= amplitude_threshold && (show_negative? abs(datum.pct_of_max) : datum.pct_of_max) >= amplitude_pct_threshold && (show_negative? abs(datum.pct_of_sum) : datum.pct_of_sum) >= amplitude_markerpct_threshold && min(show_negative? abs(datum.forward_added) : datum.forward_added, show_negative? abs(datum.reverse_added) : datum.reverse_added) >= orientation_threshold)? datum.sequence : 'Other sequences'" "expr": "((show_negative? abs(filter_uncorrected? datum.total : datum.total_added) : filter_uncorrected? datum.total : datum.total_added) >= amplitude_threshold && (show_negative? abs(filter_uncorrected? datum.pct_of_max_uncorrected : datum.pct_of_max) : filter_uncorrected? datum.pct_of_max_uncorrected : datum.pct_of_max) >= amplitude_pct_threshold && (show_negative? abs(filter_uncorrected? datum.pct_of_sum_uncorrected : datum.pct_of_sum) : filter_uncorrected? datum.pct_of_sum_uncorrected : datum.pct_of_sum) >= amplitude_markerpct_threshold && min(show_negative? abs(filter_uncorrected? datum.forward : datum.forward_added) : filter_uncorrected? datum.forward : datum.forward_added, show_negative? abs(filter_uncorrected? datum.reverse : datum.reverse_added) : filter_uncorrected? datum.reverse : datum.reverse_added) >= orientation_threshold)? datum.sequence : 'Other sequences'"
}, },
{ {
"type": "filter", "type": "filter",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment