{"action":"created","comment":{"url":"https://api.github.com/repos/kyleam/snakemake-mode/pulls/comments/59819291","id":59819291,"diff_hunk":"@@ -350,6 +350,17 @@ targets.\"\n                                        (snakemake-all-rules))\n              \" \"))\n \n+(defun snakemake-graph-workflow ()\n+  (interactive)\n+  \"\"\"Creates a graph for the current snakefile.\"\"\"\n+  (let ((dot (shell-command-to-string \"which dot\")))\n+    (when (equal dot \"\")\n+      (error \"You do not have dot (graphviz) on your emacs path!\")))\n+  (let* ((fname (buffer-file-name))\n+         (graphname (concat (buffer-file-name) \".pdf\"))\n+         (graph-command (concat \"snakemake --dag --snakefile \" fname \" | dot -Tpdf > \" graphname)))","path":"snakemake.el","position":12,"original_position":12,"commit_id":"b05d89b5ff5589b4bf5a4d053d6dcf00ad8b96e3","original_commit_id":"b05d89b5ff5589b4bf5a4d053d6dcf00ad8b96e3","user":{"login":"kyleam","id":1297788,"avatar_url":"https://avatars.githubusercontent.com/u/1297788?v=3","gravatar_id":"","url":"https://api.github.com/users/kyleam","html_url":"https://github.com/kyleam","followers_url":"https://api.github.com/users/kyleam/followers","following_url":"https://api.github.com/users/kyleam/following{/other_user}","gists_url":"https://api.github.com/users/kyleam/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleam/subscriptions","organizations_url":"https://api.github.com/users/kyleam/orgs","repos_url":"https://api.github.com/users/kyleam/repos","events_url":"https://api.github.com/users/kyleam/events{/privacy}","received_events_url":"https://api.github.com/users/kyleam/received_events","type":"User","site_admin":false},"body":"Hmm, but this is limited to creating the graph for the first rule of\r\nthe Snakefile, right?  Instead, a compile command could be constructed\r\n(similar to what is done in `snakemake-compile`).  This could default\r\nto naming the output something like `<rule>-dag.pdf`, but the user could\r\nedit the compile command further.","created_at":"2016-04-15T02:14:23Z","updated_at":"2016-04-15T02:14:23Z","html_url":"https://github.com/kyleam/snakemake-mode/pull/7#discussion_r59819291","pull_request_url":"https://api.github.com/repos/kyleam/snakemake-mode/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/kyleam/snakemake-mode/pulls/comments/59819291"},"html":{"href":"https://github.com/kyleam/snakemake-mode/pull/7#discussion_r59819291"},"pull_request":{"href":"https://api.github.com/repos/kyleam/snakemake-mode/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/kyleam/snakemake-mode/pulls/7","id":66433328,"html_url":"https://github.com/kyleam/snakemake-mode/pull/7","diff_url":"https://github.com/kyleam/snakemake-mode/pull/7.diff","patch_url":"https://github.com/kyleam/snakemake-mode/pull/7.patch","issue_url":"https://api.github.com/repos/kyleam/snakemake-mode/issues/7","number":7,"state":"open","locked":false,"title":"Function to create rule-graph","user":{"login":"endrebak","id":17778898,"avatar_url":"https://avatars.githubusercontent.com/u/17778898?v=3","gravatar_id":"","url":"https://api.github.com/users/endrebak","html_url":"https://github.com/endrebak","followers_url":"https://api.github.com/users/endrebak/followers","following_url":"https://api.github.com/users/endrebak/following{/other_user}","gists_url":"https://api.github.com/users/endrebak/gists{/gist_id}","starred_url":"https://api.github.com/users/endrebak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endrebak/subscriptions","organizations_url":"https://api.github.com/users/endrebak/orgs","repos_url":"https://api.github.com/users/endrebak/repos","events_url":"https://api.github.com/users/endrebak/events{/privacy}","received_events_url":"https://api.github.com/users/endrebak/received_events","type":"User","site_admin":false},"body":"The way I am used to doing this is to PR against develop with a new branch.","created_at":"2016-04-14T06:10:58Z","updated_at":"2016-04-15T02:14:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e5e9030d6aec7b05d9ca11748f6a49e4c3658ad","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kyleam/snakemake-mode/pulls/7/commits","review_comments_url":"https://api.github.com/repos/kyleam/snakemake-mode/pulls/7/comments","review_comment_url":"https://api.github.com/repos/kyleam/snakemake-mode/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kyleam/snakemake-mode/issues/7/comments","statuses_url":"https://api.github.com/repos/kyleam/snakemake-mode/statuses/b05d89b5ff5589b4bf5a4d053d6dcf00ad8b96e3","head":{"label":"endrebak:add_graphing_function","ref":"add_graphing_function","sha":"b05d89b5ff5589b4bf5a4d053d6dcf00ad8b96e3","user":{"login":"endrebak","id":17778898,"avatar_url":"https://avatars.githubusercontent.com/u/17778898?v=3","gravatar_id":"","url":"https://api.github.com/users/endrebak","html_url":"https://github.com/endrebak","followers_url":"https://api.github.com/users/endrebak/followers","following_url":"https://api.github.com/users/endrebak/following{/other_user}","gists_url":"https://api.github.com/users/endrebak/gists{/gist_id}","starred_url":"https://api.github.com/users/endrebak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endrebak/subscriptions","organizations_url":"https://api.github.com/users/endrebak/orgs","repos_url":"https://api.github.com/users/endrebak/repos","events_url":"https://api.github.com/users/endrebak/events{/privacy}","received_events_url":"https://api.github.com/users/endrebak/received_events","type":"User","site_admin":false},"repo":{"id":56134249,"name":"snakemake-mode","full_name":"endrebak/snakemake-mode","owner":{"login":"endrebak","id":17778898,"avatar_url":"https://avatars.githubusercontent.com/u/17778898?v=3","gravatar_id":"","url":"https://api.github.com/users/endrebak","html_url":"https://github.com/endrebak","followers_url":"https://api.github.com/users/endrebak/followers","following_url":"https://api.github.com/users/endrebak/following{/other_user}","gists_url":"https://api.github.com/users/endrebak/gists{/gist_id}","starred_url":"https://api.github.com/users/endrebak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endrebak/subscriptions","organizations_url":"https://api.github.com/users/endrebak/orgs","repos_url":"https://api.github.com/users/endrebak/repos","events_url":"https://api.github.com/users/endrebak/events{/privacy}","received_events_url":"https://api.github.com/users/endrebak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/endrebak/snakemake-mode","description":"Emacs support for Snakemake","fork":true,"url":"https://api.github.com/repos/endrebak/snakemake-mode","forks_url":"https://api.github.com/repos/endrebak/snakemake-mode/forks","keys_url":"https://api.github.com/repos/endrebak/snakemake-mode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endrebak/snakemake-mode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endrebak/snakemake-mode/teams","hooks_url":"https://api.github.com/repos/endrebak/snakemake-mode/hooks","issue_events_url":"https://api.github.com/repos/endrebak/snakemake-mode/issues/events{/number}","events_url":"https://api.github.com/repos/endrebak/snakemake-mode/events","assignees_url":"https://api.github.com/repos/endrebak/snakemake-mode/assignees{/user}","branches_url":"https://api.github.com/repos/endrebak/snakemake-mode/branches{/branch}","tags_url":"https://api.github.com/repos/endrebak/snakemake-mode/tags","blobs_url":"https://api.github.com/repos/endrebak/snakemake-mode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endrebak/snakemake-mode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endrebak/snakemake-mode/git/refs{/sha}","trees_url":"https://api.github.com/repos/endrebak/snakemake-mode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endrebak/snakemake-mode/statuses/{sha}","languages_url":"https://api.github.com/repos/endrebak/snakemake-mode/languages","stargazers_url":"https://api.github.com/repos/endrebak/snakemake-mode/stargazers","contributors_url":"https://api.github.com/repos/endrebak/snakemake-mode/contributors","subscribers_url":"https://api.github.com/repos/endrebak/snakemake-mode/subscribers","subscription_url":"https://api.github.com/repos/endrebak/snakemake-mode/subscription","commits_url":"https://api.github.com/repos/endrebak/snakemake-mode/commits{/sha}","git_commits_url":"https://api.github.com/repos/endrebak/snakemake-mode/git/commits{/sha}","comments_url":"https://api.github.com/repos/endrebak/snakemake-mode/comments{/number}","issue_comment_url":"https://api.github.com/repos/endrebak/snakemake-mode/issues/comments{/number}","contents_url":"https://api.github.com/repos/endrebak/snakemake-mode/contents/{+path}","compare_url":"https://api.github.com/repos/endrebak/snakemake-mode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endrebak/snakemake-mode/merges","archive_url":"https://api.github.com/repos/endrebak/snakemake-mode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endrebak/snakemake-mode/downloads","issues_url":"https://api.github.com/repos/endrebak/snakemake-mode/issues{/number}","pulls_url":"https://api.github.com/repos/endrebak/snakemake-mode/pulls{/number}","milestones_url":"https://api.github.com/repos/endrebak/snakemake-mode/milestones{/number}","notifications_url":"https://api.github.com/repos/endrebak/snakemake-mode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endrebak/snakemake-mode/labels{/name}","releases_url":"https://api.github.com/repos/endrebak/snakemake-mode/releases{/id}","deployments_url":"https://api.github.com/repos/endrebak/snakemake-mode/deployments","created_at":"2016-04-13T08:25:14Z","updated_at":"2016-04-13T08:25:15Z","pushed_at":"2016-04-14T06:09:39Z","git_url":"git://github.com/endrebak/snakemake-mode.git","ssh_url":"git@github.com:endrebak/snakemake-mode.git","clone_url":"https://github.com/endrebak/snakemake-mode.git","svn_url":"https://github.com/endrebak/snakemake-mode","homepage":"","size":69,"stargazers_count":0,"watchers_count":0,"language":"Emacs Lisp","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kyleam:master","ref":"master","sha":"90faba359fe4263c365f33c32e00131a7cf61d53","user":{"login":"kyleam","id":1297788,"avatar_url":"https://avatars.githubusercontent.com/u/1297788?v=3","gravatar_id":"","url":"https://api.github.com/users/kyleam","html_url":"https://github.com/kyleam","followers_url":"https://api.github.com/users/kyleam/followers","following_url":"https://api.github.com/users/kyleam/following{/other_user}","gists_url":"https://api.github.com/users/kyleam/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleam/subscriptions","organizations_url":"https://api.github.com/users/kyleam/orgs","repos_url":"https://api.github.com/users/kyleam/repos","events_url":"https://api.github.com/users/kyleam/events{/privacy}","received_events_url":"https://api.github.com/users/kyleam/received_events","type":"User","site_admin":false},"repo":{"id":21295716,"name":"snakemake-mode","full_name":"kyleam/snakemake-mode","owner":{"login":"kyleam","id":1297788,"avatar_url":"https://avatars.githubusercontent.com/u/1297788?v=3","gravatar_id":"","url":"https://api.github.com/users/kyleam","html_url":"https://github.com/kyleam","followers_url":"https://api.github.com/users/kyleam/followers","following_url":"https://api.github.com/users/kyleam/following{/other_user}","gists_url":"https://api.github.com/users/kyleam/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleam/subscriptions","organizations_url":"https://api.github.com/users/kyleam/orgs","repos_url":"https://api.github.com/users/kyleam/repos","events_url":"https://api.github.com/users/kyleam/events{/privacy}","received_events_url":"https://api.github.com/users/kyleam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kyleam/snakemake-mode","description":"Emacs support for Snakemake","fork":false,"url":"https://api.github.com/repos/kyleam/snakemake-mode","forks_url":"https://api.github.com/repos/kyleam/snakemake-mode/forks","keys_url":"https://api.github.com/repos/kyleam/snakemake-mode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kyleam/snakemake-mode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kyleam/snakemake-mode/teams","hooks_url":"https://api.github.com/repos/kyleam/snakemake-mode/hooks","issue_events_url":"https://api.github.com/repos/kyleam/snakemake-mode/issues/events{/number}","events_url":"https://api.github.com/repos/kyleam/snakemake-mode/events","assignees_url":"https://api.github.com/repos/kyleam/snakemake-mode/assignees{/user}","branches_url":"https://api.github.com/repos/kyleam/snakemake-mode/branches{/branch}","tags_url":"https://api.github.com/repos/kyleam/snakemake-mode/tags","blobs_url":"https://api.github.com/repos/kyleam/snakemake-mode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kyleam/snakemake-mode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kyleam/snakemake-mode/git/refs{/sha}","trees_url":"https://api.github.com/repos/kyleam/snakemake-mode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kyleam/snakemake-mode/statuses/{sha}","languages_url":"https://api.github.com/repos/kyleam/snakemake-mode/languages","stargazers_url":"https://api.github.com/repos/kyleam/snakemake-mode/stargazers","contributors_url":"https://api.github.com/repos/kyleam/snakemake-mode/contributors","subscribers_url":"https://api.github.com/repos/kyleam/snakemake-mode/subscribers","subscription_url":"https://api.github.com/repos/kyleam/snakemake-mode/subscription","commits_url":"https://api.github.com/repos/kyleam/snakemake-mode/commits{/sha}","git_commits_url":"https://api.github.com/repos/kyleam/snakemake-mode/git/commits{/sha}","comments_url":"https://api.github.com/repos/kyleam/snakemake-mode/comments{/number}","issue_comment_url":"https://api.github.com/repos/kyleam/snakemake-mode/issues/comments{/number}","contents_url":"https://api.github.com/repos/kyleam/snakemake-mode/contents/{+path}","compare_url":"https://api.github.com/repos/kyleam/snakemake-mode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kyleam/snakemake-mode/merges","archive_url":"https://api.github.com/repos/kyleam/snakemake-mode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kyleam/snakemake-mode/downloads","issues_url":"https://api.github.com/repos/kyleam/snakemake-mode/issues{/number}","pulls_url":"https://api.github.com/repos/kyleam/snakemake-mode/pulls{/number}","milestones_url":"https://api.github.com/repos/kyleam/snakemake-mode/milestones{/number}","notifications_url":"https://api.github.com/repos/kyleam/snakemake-mode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kyleam/snakemake-mode/labels{/name}","releases_url":"https://api.github.com/repos/kyleam/snakemake-mode/releases{/id}","deployments_url":"https://api.github.com/repos/kyleam/snakemake-mode/deployments","created_at":"2014-06-28T04:04:41Z","updated_at":"2016-03-09T08:50:54Z","pushed_at":"2016-04-14T06:11:00Z","git_url":"git://github.com/kyleam/snakemake-mode.git","ssh_url":"git@github.com:kyleam/snakemake-mode.git","clone_url":"https://github.com/kyleam/snakemake-mode.git","svn_url":"https://github.com/kyleam/snakemake-mode","homepage":"","size":66,"stargazers_count":4,"watchers_count":4,"language":"Emacs Lisp","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":1,"forks":6,"open_issues":1,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kyleam/snakemake-mode/pulls/7"},"html":{"href":"https://github.com/kyleam/snakemake-mode/pull/7"},"issue":{"href":"https://api.github.com/repos/kyleam/snakemake-mode/issues/7"},"comments":{"href":"https://api.github.com/repos/kyleam/snakemake-mode/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/kyleam/snakemake-mode/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/kyleam/snakemake-mode/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kyleam/snakemake-mode/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/kyleam/snakemake-mode/statuses/b05d89b5ff5589b4bf5a4d053d6dcf00ad8b96e3"}}}}