|
| 1 | +--- |
| 2 | +title: makoview |
| 3 | +layout: default |
| 4 | +nav_order: 6 |
| 5 | +--- |
| 6 | + |
| 7 | +Mako comes with an interactive application called **_makoview_** which can be used to visualise the results once the pipeline has finished. |
| 8 | + |
| 9 | +## Installation |
| 10 | + |
| 11 | +makoview is a Python package for Python 3.9 — 3.12.12, available on PyPI and downloadable through your preferred Python package manager. |
| 12 | + |
| 13 | +```bash |
| 14 | +# with pip: |
| 15 | +$ pip install makoview |
| 16 | +$ makoview --help |
| 17 | + |
| 18 | +# with pipx: |
| 19 | +$ pipx run makoview --help |
| 20 | + |
| 21 | +# using uvx (✅ recommended!!) |
| 22 | +$ uvx makoview --help # or uvx --python 3.12 makoview --help |
| 23 | +``` |
| 24 | + |
| 25 | +[`pipx`](https://github.com/pypa/pipx) and [`uv`](https://docs.astral.sh/uv/) allow executables to be run within their own isolated environment, preventing dependency resolution issues. They are recommended over `pip install`. |
| 26 | + |
| 27 | +## Usage |
| 28 | + |
| 29 | +Makoview has three parameters: |
| 30 | + |
| 31 | +```bash |
| 32 | +options: |
| 33 | + -h, --help show this help message and exit |
| 34 | + --differential-results DIFFERENTIAL_RESULTS |
| 35 | + Path to differential sites database file |
| 36 | + --modification-db MODIFICATION_DB |
| 37 | + Path to modification database file |
| 38 | + --port PORT Port for the Shiny application (default: 8000) |
| 39 | +``` |
| 40 | + |
| 41 | +The default usage is as follows: |
| 42 | + |
| 43 | +```bash |
| 44 | +export MAKO_OUTPUT_DIR="/data/gpfs/projects/punim0614/occheng/epi_differential/pipeline/runs/longbench/results" |
| 45 | +export MODCALLER="dorado" # either "dorado" or "m6anet" |
| 46 | +export DIFFERENTIAL_MODEL="adaptive_binomial" |
| 47 | +makoview \ |
| 48 | + --differential-results $MAKO_OUTPUT_DIR/differential/$MODCALLER/${DIFFERENTIAL_MODEL}_fits.tsv \ |
| 49 | + --modification-db $MAKO_OUTPUT_DIR/modcall/$MODCALLER/all_sites.duckdb \ |
| 50 | + --port 8000 |
| 51 | +``` |
| 52 | + |
| 53 | +This will launch a web server running on port `8000`, accessible at [http://127.0.0.1:8000](http://127.0.0.1:8000). |
| 54 | + |
| 55 | +### Running on HPC |
| 56 | + |
| 57 | +On HPC systems, if you have SSH access, you can port forward the web server from the server to your local machine. |
| 58 | + |
| 59 | +```bash |
| 60 | +# launch the server on port within [10000, 65535], i.e. |
| 61 | +🛜 SERVER $ makoview <params> --port <abcde> |
| 62 | + |
| 63 | +# next, on your local machine, forward that port: |
| 64 | +👩💻 CLIENT $ ssh -L <abcde>:localhost:<abcde> username@hpc.server |
| 65 | +``` |
| 66 | + |
| 67 | +You can now connect to Makoview locally using `http://127.0.0.1:<abcde>`. |
0 commit comments