my-snaketool
Cookiecutter profile for making a Snakemake-based bioinformatics tool, but without the fluff
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 6 DOI reference(s) in README -
○Academic publication links
-
✓Committers with academic emails
1 of 4 committers (25.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.4%) to scientific vocabulary
Repository
Cookiecutter profile for making a Snakemake-based bioinformatics tool, but without the fluff
Basic Info
- Host: GitHub
- Owner: beardymcjohnface
- License: mit
- Language: Python
- Default Branch: main
- Size: 74.2 KB
Statistics
- Stars: 49
- Watchers: 1
- Forks: 3
- Open Issues: 0
- Releases: 1
Metadata Files
README.md
Snaketool
Cookiecutter profile for making a Snakemake-based bioinformatics tool.
See Nektool for a NextFlow-based template
Motivation
Writing reliable command line tools requires a lot of boilerplate to ensure input and generated files are valid, catch errors with subprocesses, log stderr messages etc. It's very time-consuming and annoying. Snakemake does a lot of heavy lifting in this regard and is an obvious alternative to a command line tool.
While Snakemake pipelines are excellent, cloning a pipeline repo every time you want to run an analysis is also annoying. So too is manually punching in the full path to a Snakefile somewhere on your system, as well as copying and manually updating the config file for your analysis.
Building a Snakemake pipeline with a convenience launcher offers the best of both worlds: - Developing command line applications is quicker and easier - Installing, running, and rerunning is easier and more convenient - You can have subcommands for utility scripts and Snakefiles - You can trick NextFlow users into running Snakemake - Your pipelines have help messages!
Who is this for?
People who are already familiar with Snakemake and want to create either a Snakemake-powered commandline tool or make their pipelines fancier and more user-friendly.
Citation
This template is published in Plos Computational Biology:
https://doi.org/10.1371/journal.pcbi.1010705
Usage
Install Cookiecutter if you don't already have it.
shell
conda create -n cookiecutter -c conda-forge cookiecutter
conda activate cookiecutter
Download the template with Cookiecutter and follow the prompts
shell
cookiecutter https://github.com/beardymcjohnface/Snaketool.git
And here's what you get:
```text mysnaketool/ ├── MANIFEST.in ├── mysnaketool │ ├── config │ │ ├── config.yaml │ │ └── systemconfig.yaml │ ├── _init.py │ ├── __main.py │ ├── mysnaketool.CITATION │ ├── mysnaketool.LICENSE │ ├── my_snaketool.VERSION │ └── workflow │ ├── envs │ │ └── example.yaml │ ├── rules │ │ ├── example.smk │ │ └── preflight.smk │ ├── scripts │ │ └── example.py │ └── Snakefile ├── README.md └── setup.py
```
The file __main__.py is the entry point.
Once installed with pip it will be accessible on command line, in this example as my_snaketool.
Customise this file to add your own commandline options, help message etc.
If you only have one Snakefile you wish to run then this file will need very little customisation.
If you're happy only using --input and --output you don't have to do anything!
The directories config/ and workflow/ contain an example Snakemake pipeline that will work with the example launcher.
How the launcher works
The launcher first copies the default config file to the working directory which will allow the user to cusomise their
config if they wish. The launcher reads in this config file and combines it with command-line arguments.
In this example it only has two config-related options to pass: --input and --output.
The Launcher updates the config file with these options before passing it to Snakemake.
Most of the other command line arguments are boilerplate for running Snakemake and do not require much if any customisation.
Customising your tool
Check out the wiki page for a detailed example on customising your Snaketool.
Installing and testing your tool
For development, cd to your Snaketool directory and install with pip:
shell
cd snaketool/
pip install -e .
my_snaketool --help
my_snaketool run --help
Test run the template:
shell
my_snaketool run --input yeet
Publishing your tool
Check out the wiki page for a detailed look at publishing your tool to PyPI and Conda
Owner
- Name: Michael Roach
- Login: beardymcjohnface
- Kind: user
- Company: Flinders University
- Website: bioinf.cc
- Twitter: beardymcface
- Repositories: 6
- Profile: https://github.com/beardymcjohnface
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Roach"
given-names: "Michael J"
orcid: "https://orcid.org/0000-0003-1488-5148"
- family-names: "Pierce-Ward"
given-names: "N Tessa"
orcid: "https://orcid.org/0000-0002-2942-5331"
- family-names: "Suchecki"
given-names: "Radoslaw"
orcid: "https://orcid.org/0000-0003-4992-9497"
- family-names: "Mallawaarachchi"
given-names: "Vijini"
orcid: "https://orcid.org/0000-0002-2651-8719"
- family-names: "Papudeshi"
given-names: "Bhavya"
orcid: "https://orcid.org/0000-0001-5359-3100"
- family-names: "Handley"
given-names: "Scott A"
orcid: "https://orcid.org/0000-0002-2143-6570"
- family-names: "Brown"
given-names: "C Titus"
orcid: "https://orcid.org/0000-0001-6001-2677"
- family-names: "Watson-Haigh"
given-names: "Nathan S"
orcid: "https://orcid.org/0000-0002-7935-6151"
- family-names: "Edwards"
given-names: "Robert A"
orcid: "https://orcid.org/0000-0001-8383-8949"
- family-names: "Bouras"
given-names: "George"
orcid: "https://orcid.org/0000-0002-5885-4186"
- family-names: "Kieser"
given-names: "Silas"
orcid: "https://orcid.org/0000-0002-5935-9734"
title: "Snaketool: a Cookiecutter profile for making a Snakemake-based bioinformatics tool."
version: 1.0.0
doi:
date-released: 2022
url: "https://github.com/beardymcjohnface/Snaketool"
preferred-citation:
type: article
authors:
- family-names: "Roach"
given-names: "Michael J"
orcid: "https://orcid.org/0000-0003-1488-5148"
- family-names: "Pierce-Ward"
given-names: "N Tessa"
orcid: "https://orcid.org/0000-0002-2942-5331"
- family-names: "Suchecki"
given-names: "Radoslaw"
orcid: "https://orcid.org/0000-0003-4992-9497"
- family-names: "Mallawaarachchi"
given-names: "Vijini"
orcid: "https://orcid.org/0000-0002-2651-8719"
- family-names: "Papudeshi"
given-names: "Bhavya"
orcid: "https://orcid.org/0000-0001-5359-3100"
- family-names: "Handley"
given-names: "Scott A"
orcid: "https://orcid.org/0000-0002-2143-6570"
- family-names: "Brown"
given-names: "C Titus"
orcid: "https://orcid.org/0000-0001-6001-2677"
- family-names: "Watson-Haigh"
given-names: "Nathan S"
orcid: "https://orcid.org/0000-0002-7935-6151"
- family-names: "Edwards"
given-names: "Robert A"
orcid: "https://orcid.org/0000-0001-8383-8949"
doi: "10.1371/journal.pcbi.1010705"
journal: "PLOS Computational Biology"
start: e1010705
title: "Ten simple rules and a template for creating workflows-as-applications"
issue: 12
volume: 18
year: 2022
GitHub Events
Total
- Watch event: 6
Last Year
- Watch event: 6
Committers
Last synced: about 3 years ago
All Time
- Total Commits: 91
- Total Committers: 4
- Avg Commits per committer: 22.75
- Development Distribution Score (DDS): 0.099
Top Committers
| Name | Commits | |
|---|---|---|
| Michael Roach | b****e@g****m | 82 |
| Vijini Mallawaarachchi | v****i@g****m | 6 |
| gbouras13 | g****s@a****u | 2 |
| Silas Kieser | S****K@u****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 3
- Total pull requests: 5
- Average time to close issues: 5 months
- Average time to close pull requests: 22 days
- Total issue authors: 3
- Total pull request authors: 4
- Average comments per issue: 1.0
- Average comments per pull request: 0.8
- Merged pull requests: 5
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- beardymcjohnface (1)
- gbouras13 (1)
- MelinaKlostermann (1)
Pull Request Authors
- beardymcjohnface (2)
- Vini2 (1)
- gbouras13 (1)
- SilasK (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 8
pypi.org: my-snaketool
Snakemake-powered commandline tool to do a thing.
- Homepage: https://github.com/beardymcjohnface/Snaketool
- Documentation: https://my-snaketool.readthedocs.io/
- License: mit
-
Latest release: 0.1.1.7
published over 3 years ago
Rankings
Dependencies
- Click >=7
- pyyaml *
- snakemake >=6.10.0
- actions/checkout v3 composite
- codecov/codecov-action v3 composite
- conda-incubator/setup-miniconda v2 composite
- actions/checkout v3 composite
- codecov/codecov-action v3 composite
- conda-incubator/setup-miniconda v2 composite
- click >=8.1.3
- cookiecutter >=2.1.1
- jinja2 >=3.0.2
- pyyaml >=6.0
- snakemake >=7.20.0