{"id":17526918,"url":"https://github.com/snakemake/shournal-to-snakemake","last_synced_at":"2025-04-21T01:31:55.000Z","repository":{"id":57466921,"uuid":"254943434","full_name":"snakemake/shournal-to-snakemake","owner":"snakemake","description":null,"archived":false,"fork":false,"pushed_at":"2020-04-24T21:11:38.000Z","size":18,"stargazers_count":8,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-17T12:29:35.000Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snakemake.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-11T19:49:05.000Z","updated_at":"2025-02-22T13:50:54.000Z","dependencies_parsed_at":"2022-09-19T08:32:05.238Z","dependency_job_id":null,"html_url":"https://github.com/snakemake/shournal-to-snakemake","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snakemake%2Fshournal-to-snakemake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snakemake%2Fshournal-to-snakemake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snakemake%2Fshournal-to-snakemake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snakemake%2Fshournal-to-snakemake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snakemake","download_url":"https://codeload.github.com/snakemake/shournal-to-snakemake/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249982555,"owners_count":21355718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-20T15:02:37.718Z","updated_at":"2025-04-21T01:31:54.758Z","avatar_url":"https://github.com/snakemake.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# shournal-to-snakemake\n\nTransform a command series observed by \n[shournal](https://github.com/tycho-kirchner/shournal)\n to \n[snakemake](https://github.com/snakemake/snakemake)\n rules.\n\n[shournal](https://github.com/tycho-kirchner/shournal) \ntracks read and written files of shell commands. Thus, for\neach command the input- and output-section of a snakemake rule \nmay be generated. Matched file-paths are automatically replaced\nin the command string with {input} and {output}.\n\n\n## Basic Usage\nAfter \n[shournal](https://github.com/tycho-kirchner/shournal)\nis installed, start a new (by shournal observed) shell session. Within that\nperform the (shell-based) data analysis of your choice. \n\nOnce done, from within the same shell-session, generate the snakemake rules by\n\n```\nshournal -q --output-format json -sid $SHOURNAL_SESSION_ID | shournal-to-snakemake\n```\n\n## Toy example\n```\n$ SHOURNAL_ENABLE\n$ echo stuff \u003e foo\n$ cat foo \u003e bar\n$ shournal -q --output-format json -sid $SHOURNAL_SESSION_ID | shournal-to-snakemake\nrule undefined_1:\n    output:\n        \"foo\",\n    shell:\n        # raw: echo stuff \u003e foo\n        \"echo stuff \u003e {output}\"\n\n\nrule undefined_2:\n    input:\n        \"foo\",\n    output:\n        \"bar\",\n    shell:\n        # raw: cat foo \u003e bar\n        \"cat {input} \u003e {output}\"\n```\n\n## General hints\n* Don't change the working directory during the workflow.\n* Do not use wildcards or variables (in file-paths), otherwise the files\n  in the command string cannot be correctly replaced by {input} or {output}.\n* Stick to basic posix shell syntax\n  \n\n## Installation\n\n### PyPi\nInstall from PyPi by executing the following command in a terminal:\n```\npip install shournal-to-snakemake\n```\n\n### From Source\nCreate a wheel directly from source by executing\n```\npython3 setup.py sdist bdist_wheel\n```\nInstall the wheel as usual, e.g. by\n```\npip3 install --user dist/shournal_to_snakemake-VERSION-*.whl\n```\n\n\n## License\n\nCopyright \u0026copy; 2020 Tycho Kirchner (see LICENSE)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnakemake%2Fshournal-to-snakemake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnakemake%2Fshournal-to-snakemake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnakemake%2Fshournal-to-snakemake/lists"}