为 Snakemake DAG 中的每条规则指定颜色

发布于 2025-01-19 02:57:11 字数 447 浏览 4 评论 0原文

我正在运行snakemake -n -c1 -dag |点-TSVG> dag.svg获取DAG文件。 我想知道我是否可以以某种方式为每个节点设置配色方案。例如,在下图中,规则samtools_fixmatesamtools_sortsamtools_markduplicates的颜色不同。您可以在snakemake文件中以某种方式指定节点应该是什么颜色?

我将安顿下来的解决方案。

I'm running snakemake -n -c1 --dag | dot -Tsvg > dag.svg to get the DAG file.
I was wondering if I could somehow set the color scheme for every node. For example, in the picture below, rule samtools_fixmate is of different color from samtools_sort and of samtools_markduplicates. Can you somehow specify within snakemake file what color the nodes should be?

I'll settle even for out-of-snakefile solutions.

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

思念满溢 2025-01-26 02:57:11

此答案类似,您可以将 dag 导出到点文件中:

snakemake --dag > test.dot

然后可以根据需要编辑点文件。

Similar to this answer, you can export the dag into a dot file:

snakemake --dag > test.dot

The dot file can then be edited as necessary.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文