{"id":28530611,"url":"https://github.com/jjjermiah/snakemake-pixi-template","last_synced_at":"2025-07-02T01:31:40.822Z","repository":{"id":231734186,"uuid":"782209100","full_name":"jjjermiah/snakemake-pixi-template","owner":"jjjermiah","description":"A basic template to get started with Snakemake using Pixi","archived":false,"fork":false,"pushed_at":"2024-04-11T19:46:14.000Z","size":162,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-09T14:53:51.700Z","etag":null,"topics":["pixi","snakemake"],"latest_commit_sha":null,"homepage":"","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/jjjermiah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-04T21:04:52.000Z","updated_at":"2025-04-02T14:37:40.000Z","dependencies_parsed_at":"2024-04-11T20:45:20.788Z","dependency_job_id":"bd3a9799-9ae7-4a0c-901a-79cc39abe7f8","html_url":"https://github.com/jjjermiah/snakemake-pixi-template","commit_stats":null,"previous_names":["jjjermiah/snakemake-pixi-template"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jjjermiah/snakemake-pixi-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjjermiah%2Fsnakemake-pixi-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjjermiah%2Fsnakemake-pixi-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjjermiah%2Fsnakemake-pixi-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjjermiah%2Fsnakemake-pixi-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jjjermiah","download_url":"https://codeload.github.com/jjjermiah/snakemake-pixi-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjjermiah%2Fsnakemake-pixi-template/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263059721,"owners_count":23407399,"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":["pixi","snakemake"],"created_at":"2025-06-09T14:37:14.308Z","updated_at":"2025-07-02T01:31:40.811Z","avatar_url":"https://github.com/jjjermiah.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# snakemake-pixi-template\n\nThis is a template repository for snakemake workflow with pixi as a package manager.\nIt is based on the [pixi](https://prefix.dev/blog/pixi_a_fast_conda_alternative).\n\n## Idea\n\nTraditionally, I would use Conda to create my environments and manage my packages.\nHowever the added step of making sure my environment.yml file is up to date is a bit of a hassle.\n\n```bash\nconda env create -f environment.yml -n snakemake\nconda activate snakemake\n```\n\nInstead, I can use pixi to manage my packages and create a `pixi.lock` file that will be used to create the environment.\n\n```bash\npixi install\n```\n\nThis makes sure that the lock is synchronized and version controlled. \n\n## Usage\n\nTo add packages to the `default` environment:\n\n```bash\npixi add pandas\n```\n\n### To run a command in the environment\n\n```bash\npixi run snakemake --dryrun\n```\n\n### Enter into the environment\n\n```bash\npixi shell\n\n# Exit the environment using \"exit\"\n```\n\n### Pixi Tasks\nPixi also allows defining tasks for common tasks. This is done in the [pyproject.toml](pyproject.toml) file.\n\n```toml\n[tool.pixi.tasks]\ndryrun = \"snakemake --dry-run\"\nsnake = \"snakemake --cores 1\"\n```\n\nThis allows me to run `pixi run dryrun` to see what snakemake would do and `pixi run snake` to run snakemake.\n\nA common task I like to do is creating the dags regularly and including them in my README.\nThis can then be automated with the task.\n\n```toml\ndag = \"snakemake -F --dag | dot -Tsvg \u003e resources/dag.svg\"\nrulegraph = \"snakemake -F --rulegraph | dot -Tsvg \u003e resources/rulegraph.svg\"\nfilegraph = \"snakemake -F --filegraph | dot -Tsvg \u003e resources/filegraph.svg\"\ngraphs = { depends_on = [\"dag\", \"rulegraph\", \"filegraph\"] }\n```\n\nRunning `pixi run graphs` will create the three graphs and save them in the resources folder.\nThis way, they are automatically updated below in this README. \n\n#### DAG \n\n![DAG](resources/dag.svg)\n\n#### Rulegraph\n\n![Rulegraph](resources/rulegraph.svg)\n\n#### Filegraph\n\n![Filegraph](resources/filegraph.svg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjjermiah%2Fsnakemake-pixi-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjjjermiah%2Fsnakemake-pixi-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjjermiah%2Fsnakemake-pixi-template/lists"}