Skip to content

Latest commit

 

History

History
118 lines (88 loc) · 5.34 KB

README.md

File metadata and controls

118 lines (88 loc) · 5.34 KB

snakevision 🐍

An awesome tool to visualize Snakemake DAGs

GitHub issues GitHub license

Overview

Welcome to snakevision! Before getting started, we highly recommend reading through our documentation below.

./snakevision provides a simplified command-line interface to visualize Snakemake DAGs or rule graphs. If you are familiar with other existing tools to visualize DAGs like graphviz, getting started with snakevision should be a breeze.

Examples

Here are a few Snakemake rule graphs rendered by snakevision. These DAGs come from different pipelines available from OpenOmics.

example_genome_snakevision_dag example_rna_snakevision_dag Left: A snakevision rule graph of a slimmed-down version of the whole genome sequencing pipeline, genome-seek.
Right: A snakevision rule graph of a slimmed-down version of the rna-seek pipeline.


example_ont_snakevision_dag example_viral_snakevision_dag Left: A snakevision rule graph of a slimmed-down version of our Oxford Nanopore direct RNA-sequencing pipeline, modr.
Right: A snakevision rule graph of a slimmed-down version of our viral metagenomics pipeline, metavirs.


example_chrom_chip_snakevision_dag example_chrom_atac_snakevision_dag Left: A snakevision rule graph of a slimmed-down version of our ChIP-seq pipeline, chrom-seek run with the --assay chip option.
Right: A snakevision rule graph of a slimmed-down version of our bulk ATAC-seq pipeline, chrom-seek run with the --assay atac option.

Dependencies

Requires: snakemake python>=3.7

At the current moment, the tool is designed to visualize rule graphs of existing snakemake pipelines. As so, Snakemake1 and any dependencies of the pipeline should be installed on the target system. This tool relies on a few 3rd-party pypi python packages which can be installed via pip from the provided requirements.txt.

Please follow the instructions directly below to install snakevision on your local system.

Installation

Please clone this repository to your local filesystem using the following command:

# Clone Repository from Github
git clone https://github.com/OpenOmics/snakevision.git
# Change your working directory
cd snakevision/
# Create a python virtual environment
# to install required python packages
python -m venv .venv
# Activate the virtual environment
source .venv/bin/activate
# Upgrade pip and install the list
# of required python packages
pip install -U pip
pip install -r requirements.txt
# Get check installation, get 
# usage information of tool
./bin/snakevision -h
# Add snakevision to $PATH
export PATH="${PATH}:$PWD/bin"

Getting Started

Snakevision can read an input snakemake rulegraph via an input file or via standard input directly from a pipe. To create an input rule graph to the snakevision, please run snakemake with the --rulegraph and --forceall options.

Here is an basic example:

# Create a input file for snakevision
snakemake  --configfile=$pipeline_outdir/config.json \
    -s $pipeline_outdir/workflow/Snakefile \
    -d $pipeline_outdir \
    --forceall \
    --rulegraph \
> pipeline_rulegraph.dot

# Run snakevision, do not include
# rule all and multiqc in the image, 
# makes final image less cluttered
snakevision \
    -s all mutliqc \
    -o pipeline_rulegraph.svg \
    pipeline_rulegraph.dot

Contribute

This site is a living document, created for and by members like you. snakevision is maintained by the members of OpenOmics and is improved by continuous feedback! We encourage you to contribute new content and make improvements to existing content via pull requests to our GitHub repository.

Cite

If you use this software, please cite it as below:

@BibText
Citation coming soon!
@APA
Citation coming soon!

References

1. Koster, J. and S. Rahmann (2018). "Snakemake-a scalable bioinformatics workflow engine." Bioinformatics 34(20): 3600.