{"id":35121984,"url":"https://github.com/bialimed/snake-basket","last_synced_at":"2026-05-18T20:07:58.910Z","repository":{"id":143717913,"uuid":"373788653","full_name":"bialimed/snake-basket","owner":"bialimed","description":"Customisable rules for snakemake.","archived":false,"fork":false,"pushed_at":"2025-05-30T11:52:53.000Z","size":217,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-30T16:05:47.254Z","etag":null,"topics":["snakemake"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bialimed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-06-04T09:23:50.000Z","updated_at":"2025-05-30T11:52:57.000Z","dependencies_parsed_at":"2025-05-30T12:59:53.741Z","dependency_job_id":"cf90eb9f-5699-4b70-8dae-698620bab194","html_url":"https://github.com/bialimed/snake-basket","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bialimed/snake-basket","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bialimed%2Fsnake-basket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bialimed%2Fsnake-basket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bialimed%2Fsnake-basket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bialimed%2Fsnake-basket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bialimed","download_url":"https://codeload.github.com/bialimed/snake-basket/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bialimed%2Fsnake-basket/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33189294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["snakemake"],"created_at":"2025-12-28T00:08:38.431Z","updated_at":"2026-05-18T20:07:58.898Z","avatar_url":"https://github.com/bialimed.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# snake-basket\n\n![license](https://img.shields.io/badge/license-GPLv3-blue)\n\n## Description\nThis project provides multiples customizable rules for the workflow manager\n[Snakemake](https://snakemake.readthedocs.io/en/stable/#). These rules have\nbuilt as python function and can be imported (with snakemake include) and\nparametrized (with argument of the function).\n\n## Usage\nIn this paragraph we will add a rule **markDuplicates** in your workflow.\n\n### 1. Import the rule\n\n  * Copy the rule in your workflow `rules` folder\n\n         workflow_folder/\n            rules/\n                markDuplicates.smk          \n            Snakemake\n\n  * Add the rule in the list of imports `rules/all.smk`\n\n    Add all.smk in rules (once by workflow)\n\n         workflow_folder/\n            rules/\n                all.smk\n                markDuplicates.smk\n            Snakemake\n\n    Add the rule in all.smk (it contains all the rules to import)\n\n         ...\n         include: \"markDuplicates.smk\"\n         ...\n\n  * Import all the wrapper functions in your `Snakefile`\n\n         ...\n         include: \"rules/all.smk\"\n         ...\n\n  The function `markDuplicates()` is now accessibe in your workflow.\n\n### 2. Call rule in your workflow\n\n  Add the function call and parameters in your code:\n\n        ...\n        markDuplicates(\n            params_stringency=\"STRICT\"\n            params_keep_outputs=True\n        )\n        ...\n\n  All accessible parameters and their default values are presented in function\n  declaration of the rule in `markDuplicates.smk`. The main categories of these\n  parameters are:\n    * *input_*,\n    * *output_*,\n    * *param_*,\n    * *snake_*: for parameters related to the Snakemake element like wildcards\n    restrictions.\n  Keep in mind that input and ouput must be consistent in terms of wildcards\n  like with a standard rule.\n\n### 3. Set execution environment for the rule\n\nYou can provide software of the rule by one of this three ways:\n\n  * The software folder is in `$PATH`.\n\n  * The path of the software is in workflow configuration file:\n\n          ...\n          software_paths:\n              picard: /home/user/bin/picard\n          ...\n\n    *The name of the parameter is in bin_path argument of the `params` section\n    of the rule in the `markDuplicates.smk`.*\n\n  * You use conda environment with Snakemake (see option `--use-conda`) and\n  the environment of your rule is in `envs` folder:\n\n          workflow_folder/\n              envs/\n                  picard.yml\n              rules/\n                  all.smk\n                  markDuplicates.smk\n              Snakemake\n\n     *The name of the environment file can be found in `conda` section of the\n     rule in the `markDuplicates.smk`.*\n\n### 4. *Configure the computing requirements [optional]*\n\nOptional in local and required with cluster submission.\n  \nDefault value are stored in rule in `resources` section:\n\n    resources:\n        extra = \"\",            # options added to cluster submission (example: \"--qos=project_A\")\n        mem = \"8G\",            # maximum memory required\n        partition = \"normal\"   # partition/queue name for job\n    threads: 1                 # threads per job\n\nDeclare parameter usage in snakemake command line:\n\n    snakemake \\\n      ...\n      --cluster 'sbatch {resources.extra} --mem={resources.mem} --partition={resources.partition} --cpus-per-task={threads}'\n\n##### Change default value by command line [recommended]\n\nValues can be changed by `--set-threads` and `--set-resources` in snakemake\ncommand line.\n\n    snakemake \\\n      ...\n      --cluster 'sbatch {resources.extra} --mem={resources.mem} --partition={resources.partition} --cpus-per-task={threads}' \\\n      --set-threads $RULE=$NUM \\\n      --set-resources $RULE:$KEY=$VAL $RULE:$KEY=$VAL \\\n\n##### Change default value by profile\n\nYou can change default values in profile configuration file.\n\n    $PROFILE/config.yaml\n        cluster: sbatch\n        cluster: \"sbatch {resources.extra} --mem={resources.mem} --partition={resources.partition} --cpus-per-task={threads}\"\n        set-resources:\n            - $RULE:$KEY=$VAL\n\n## Copyright\n2019 Laboratoire d'Anatomo-Cytopathologie du CHU Toulouse\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbialimed%2Fsnake-basket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbialimed%2Fsnake-basket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbialimed%2Fsnake-basket/lists"}