Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Printing simplified DAG plot with snakemake

Tags:

snakemake

I have a long snakemake workflow processing 9 samples with many parallel rules. When I create a picture for the DAG with:

snakemake --forceall --dag | dot -Tpdf > dag.pdf

the resulting dag plot is huge and very redundant (and ugly because of complex node placement).

Is it possible to produce a canonical dag plot that will not show the 9 nodes for each task but only the main path through all steps?

I thought od simplifying my sample list to one sample but hope there is a better method without touching the snakefile (secret parameters?)

Thanks

like image 975
splaisan Avatar asked Nov 13 '18 14:11

splaisan


People also ask

What is Snakemake used for?

Summary: Snakemake is a workflow engine that provides a readable Python-based workflow definition language and a powerful execution environment that scales from single-core workstations to compute clusters without modifying the workflow.

What is Snakemake workflow?

The Snakemake workflow management system is a tool to create reproducible and scalable data analyses. Workflows are described via a human readable, Python based language. They can be seamlessly scaled to server, cluster, grid and cloud environments, without the need to modify the workflow definition.

How do you run one rule in Snakemake?

-R selects the one rule (and all its dependent rules also!), -n does a "dry run", it just prints what it would do without -n.

What is Snakefile?

Snakefiles are Python code. Completing the Pipeline. Resources and parallelism. Make your workflow portable and reduce duplication. Scaling a pipeline across a cluster.


Video Answer


1 Answers

Use the flag --rulegraph instead of --dag.

like image 200
The Unfun Cat Avatar answered Sep 28 '22 05:09

The Unfun Cat