This is a Python wrapper for the GenomeTornadoPlot R script. It streamlines the process of running the GenomeTornadoPlot visualization on a batch of genes based on a provided CSV file.
Make sure to clone this repository with the --recurse-submodules flag to include the necessary submodules:
git clone --recurse-submodules https://github.com/nicholas-abad/genome-tornado-plot-wrapper.gitIf you've already cloned without submodules, run:
git submodule update --init --recursiveThis will ensure that both GenomeTornadoPlot/ and GenomeTornadoPlot-files/ are available.
To ensure reproducibility and install all necessary dependencies (Python, R, and Bioconductor packages), you can use the provided environment.yml file.
If you're on Apple Silicon (M1/M2), run:
CONDA_SUBDIR=osx-64 conda env create -f environment.ymlOtherwise:
conda env create -f environment.ymlThen activate it:
conda activate gtpThis sets up the environment with all required packages for both Python and R scripts.
genome-tornado-plot-wrapper/
├── main.py # Main wrapper script
├── _singular_tornado_plot.R # R script wrapper
├── GenomeTornadoPlot/ # Git submodule
├── GenomeTornadoPlot-files/ # Git submodule
└── README.md
- Python 3.x
- pandas
- R with required packages for GenomeTornadoPlot
To run the wrapper script:
python main.py \
--path-to-csv examples/sample_file.tsv \
--output-folder examples/output/ \
--delimiter "\t" \
--starting-index 0 \
--ending-index 3--path-to-csv: Path to the input CSV file.--output-folder: Folder where output plots will be saved.--delimiter: Delimiter used in the CSV file (e.g.,,,\t).--starting-index: Start index of the CSV rows to process.--ending-index: End index of the CSV rows to process.
Ensure the input CSV has at least #CHROM and GENE columns.
Running this main.py generates two PNG files: a chromosome-level plot and a zoomed-in version of that plot. An example of each of these can be seen below:
This wrapper script is based on the original GenomeTornadoPlot by chenhong-dkfz. Refer to their repository for licensing details.

