New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function to create rule-graph #7
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -350,6 +350,17 @@ targets." | |
(snakemake-all-rules)) | ||
" ")) | ||
|
||
(defun snakemake-graph-workflow () | ||
(interactive) | ||
"""Creates a graph for the current snakefile.""" | ||
(let ((dot (shell-command-to-string "which dot"))) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd prefer to have this as a customizable variable, as is done with |
||
(when (equal dot "") | ||
(error "You do not have dot (graphviz) on your emacs path!"))) | ||
(let* ((fname (buffer-file-name)) | ||
(graphname (concat (buffer-file-name) ".pdf")) | ||
(graph-command (concat "snakemake --dag --snakefile " fname " | dot -Tpdf > " graphname))) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, but this is limited to creating the graph for the first rule of |
||
(shell-command graph-command))) | ||
|
||
|
||
;;; Compilation commands | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This docstring should be moved up a line and should only consist of
a single set of double quotes.