Skip to content

Visualization

matthewreyna edited this page May 9, 2016 · 1 revision

We provide two scripts for generating an interactive web application for viewing and exploring the exclusive sets enumerated by compute_exclusivity.py. Below, we describe the usage of the scripts, and then demonstrate an example.

Usage

1. Generate JSON files

After enumerating sets with compute_exclusivity.py, run viz/generate_viz_data.py with the following arguments to generate the JSON files used by the web sever:

Argument Required (Default) Description
-mf/--mutation_file True Path to mutation file generated by process_mutations.py.
-rf/--results_files True Path to output files generated by compute_exclusivity.py.
-o/--output_file True Path to output file in JSON format.
-wf/--weights_file True Path to weights file in Numpy format generated by compute_mutation_probabilities.py.
-N/--num_sets False (1000) Restrict the number of sets included per result file. The output will include the union of all such sets.
-h/--help False Display usage instructions.
-v/--verbose False (0) Choices: 0, 1, 2, 3, 4, 5. Higher values correspond to more verbose output.

For performance, we recommend only viewing a few thousand sets in the browser. You can control the number of sets with the -N argument.

2. Run web server

After generating the visualization JSON files, run server.py with the following arguments:

Argument Required (Default) Description
-i/--input_files True Path to JSON files generated by generate_viz_data.py.
-r/--run_names True Short (one word) names for each of the JSON files.
-p/--port False (8000) Port used by the web server.
-h/--help False Display usage instructions.

Example

In this example, we view the output of two runs on the colorectal and endometrial data.

First, run the web server on the two JSON files we generated with viz/generate_viz_data.py:

python viz/server.py -i data/coadread-triple-viz.json data/ucec-triple-viz.json -r COADREAD UCEC

Then point your browser to http://localhost:8000. There are two key features on the page.

  1. A paginated table, listing the exclusive sets. You can search, sort, or filter the rows or columns in the table, and switch between viewing the p-values, FDRs, or runtimes using the tabs at the top. Example table

  2. Click on a row in the table to view the corresponding rows in the mutation matrix A and the mutation probability matrix P. Example matrices


Last modified: 9:46 PM Monday, May 9, 2016 (EDT)

Clone this wiki locally