Skip to content
StefanKurtenbachPublic

About

Publication quality NGS track plotting

Topics

Resources

Stars

120 stars

Watchers

5 watching

Forks

Repository files navigation

SparK 3.2.0

Plot BigWig and bedGraph signal files as editable genomic figures.

Every plot saves an SVG, a JPG, and a small run record automatically. PDF and PNG exports are also available.

Install

Use Python 3.10 or newer. Linux and macOS are tested.

git clone https://github.com/StefanKurtenbach/SparK.git
cd SparK
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt

Make a plot

Replace sample.bw with your BigWig or bedGraph file:

python SparK.py -cf sample.bw -pr chr1:10000-20000 -o figure

This creates figure.svg, figure.jpg, and figure.run.json. Coordinates are zero-based: chr1:0-100 covers 100 bases.

Try the included tiny example:

python SparK.py --config examples/demo.json

Common tasks

# Open the visual interface. Files stay on your computer.
python SparK.py --gui --data-dir /path/to/your/data

# Find a gene and include 10 kb on each side.
python SparK.py -cf sample.bw --gene GAPDH -gtf genes.gtf --flank 10000 -o GAPDH

# Plot every region in a BED file.
python SparK.py -cf sample.bw --regions-file regions.bed -o figures

# Add PDF and PNG copies; SVG and JPG are still saved.
python SparK.py -cf sample.bw -pr chr1:10000-20000 --formats pdf png -o figure

Save any working command's settings with --save-config settings.json. Run it again with python SparK.py --config settings.json. Use --no-jpg to skip the JPG copy.

SparK checks for a newer published release in the background and prints a notice after plotting. It never installs updates or waits for the network. Disable this with --no-update-check.

For replicates, multiple conditions, colors, differences/ratios, batch scales, or Python notebooks, see the usage guide. Run python SparK.py --help for all options.

Please cite the SparK preprint. Report problems in GitHub Issues.

About

Publication quality NGS track plotting

Topics

Resources

Stars

120 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages