Commit 2cc50b91 authored by Niklas Mähler's avatar Niklas Mähler

Filter orthology edges on p-value

parent ff983b7d
......@@ -47,6 +47,8 @@
<label for="th1">Co-expression threshold: <span id="th1_span">(>=0.990)</label>
<input type="range" min="0.95" max="1" step="0.001" value="0.99" id="th1" name="th1">
<label for="complex-pval-threshold">P-value threshold: <span id="complex-pval-threshold-value">0.05</span></label>
<input id="complex-pval-threshold" type="range" min="0" max="0.2" step="0.01" value="0.05">
<button id="align_to_species_button" class="btn btn-4 btn-4c">Align</button>
</div>
</div>
......
......@@ -160,7 +160,9 @@ window.onload = init(function(d) {
populateNetworkSelect(d, '#network-buttons');
view1 = new TableNetwork('#active-network-table', '#other-network-table', '#cytoscapeweb1');
view1 = new TableNetwork('#active-network-table',
'#other-network-table', '#cytoscapeweb1',
$('#complex-pval-threshold').val());
$("#load-example-button").click(function(event) {
event.stopPropagation();
......@@ -176,5 +178,10 @@ window.onload = init(function(d) {
align();
});
$('#complex-pval-threshold').on('change', function() {
view1.setPvalueThreshold(this.value);
$('#complex-pval-threshold-value').html(this.value);
})
$("#prebox").delay(500).fadeOut();
});
......@@ -5,7 +5,11 @@ var layoutOptions = {
refresh: 60
};
function TableNetwork(active_table_element, other_table_element, network_element) {
function TableNetwork(active_table_element,
other_table_element,
network_element,
pvalueThreshold) {
this.pvalueThreshold = pvalueThreshold;
this.activeTable = $(active_table_element).DataTable({
searching: false,
columnDefs: [{
......@@ -127,6 +131,10 @@ function TableNetwork(active_table_element, other_table_element, network_element
self.otherTable.rows().deselect();
}
this.setPvalueThreshold = function(p) {
self.pvalueThreshold = p;
}
/**
* Select a node
*
......@@ -137,7 +145,9 @@ function TableNetwork(active_table_element, other_table_element, network_element
var selectNode = function(node, fromTable) {
// Display orthology edges
node.selectify().select().unselectify();
node.connectedEdges('.orthology').style('display', 'element');
node
.connectedEdges(`.orthology[conservation_pvalue < ${self.pvalueThreshold}]`)
.show();
// Select the orthologs in the connected networks
if (node.data('parent') === `network${self.activeNetworkID}`) {
......
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