forked from snakemake-workflows/snakemake-workflow-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite of workflow template with most recent best practices.
- Loading branch information
1 parent
e4ccf7c
commit d160a6d
Showing
13 changed files
with
165 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: PR | ||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- reopened | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
title-format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
validateSingleCommit: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
|
||
jobs: | ||
Formatting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Formatting | ||
uses: github/super-linter@v4 | ||
env: | ||
VALIDATE_ALL_CODEBASE: false | ||
DEFAULT_BRANCH: master | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
VALIDATE_SNAKEMAKE_SNAKEFMT: true | ||
|
||
Linting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Lint workflow | ||
uses: snakemake/[email protected] | ||
with: | ||
directory: . | ||
snakefile: workflow/Snakefile | ||
args: "--lint" | ||
|
||
Testing: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- Linting | ||
- Formatting | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Test workflow | ||
uses: snakemake/[email protected] | ||
with: | ||
directory: .test | ||
snakefile: workflow/Snakefile | ||
args: "--use-conda --show-failed-logs --cores 3 --conda-cleanup-pkgs cache --all-temp" | ||
|
||
- name: Test report | ||
uses: snakemake/[email protected] | ||
with: | ||
directory: .test | ||
snakefile: workflow/Snakefile | ||
args: "--report report.zip" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
name: release-please | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: GoogleCloudPlatform/release-please-action@v2 | ||
id: release | ||
with: | ||
release-type: python | ||
package-name: snakemake | ||
|
||
- uses: actions/checkout@v2 | ||
if: ${{ steps.release.outputs.release_created }} | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
if: ${{ steps.release.outputs.release_created }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Build package | ||
if: ${{ steps.release.outputs.release_created }} | ||
run: | | ||
python -m pip install --upgrade pip | ||
python setup.py sdist | ||
- name: Publish to PyPI | ||
if: ${{ steps.release.outputs.release_created }} | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
|
||
- name: Publish to Registry | ||
if: ${{ steps.release.outputs.release_created }} | ||
uses: elgohr/[email protected] | ||
with: | ||
name: snakemake/snakemake | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
tags: "v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }},stable" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
results/** | ||
resources/** | ||
.snakemake | ||
.snakemake/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
usage: | ||
software-stack-deployment: | ||
conda: true | ||
report: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019, Felix Mölder, Johannes Köster | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,15 @@ | ||
# A best practice template for Snakemake workflows | ||
# Snakemake workflow: dna-seq-varlociraptor | ||
|
||
To generate a new structure using this template, run | ||
[](https://snakemake.github.io) | ||
[](https://github.com/snakemake-workflows/dna-seq-varlociraptor/actions?query=branch%3Amain+workflow%3ATests) | ||
[](https://doi.org/10.5281/zenodo.4675661) | ||
|
||
copier gh:snakemake-workflows/snakemake-workflow-template <path> | ||
|
||
with path pointing to the desired output directory. | ||
A Snakemake workflow for calling small and structural variants under any kind of scenario (tumor/normal, tumor/normal/relapse, germline, pedigree, populations) via the unified statistical model of [Varlociraptor](https://varlociraptor.github.io). | ||
|
||
You will get the following structure: | ||
|
||
├── copier.yml | ||
├── README.md | ||
├── .template | ||
│ ├── config | ||
│ │ └── config.yaml.tmpl | ||
│ └── workflow | ||
│ └── Snakefile.tmpl | ||
└── workflow | ||
├── rules | ||
│ └── common.smk | ||
└── Snakefile | ||
## Usage | ||
|
||
The `workflow` folder contains the structure to put the actual workflow in. | ||
Make sure to follow the [best practices](https://snakemake.readthedocs.io/en/stable/snakefiles/deployment.html#distribution-and-reproducibility). | ||
The usage of this workflow is described in the [Snakemake Workflow Catalog](https://snakemake.github.io/snakemake-workflow-catalog/?usage=snakemake-workflows%2Fdna-seq-varlociraptor). | ||
|
||
The `.template` folder contains an automatically generated template for deploying the workflow using Snakemake's [module system](https://snakemake.readthedocs.io/en/stable/snakefiles/modularization.html#snakefiles-modules). | ||
Here, you should edit the `config.yaml.tmpl` to contain the config settings you would like to initialize in the deployment of the user. | ||
It is possible to add further files needed for the configuration to the `.template` folder, e.g. sample sheets. | ||
If you use this workflow in a paper, don't forget to give credits to the authors by citing the URL of this (original) repository and its DOI (see above). |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Describe how to configure the workflow (using config.yaml and maybe additional files). | ||
All of them need to be present with example entries inside of the config folder. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,4 @@ | ||
# The main entry point of your workflow. | ||
# After configuring, running snakemake -n in a clone of this repository should successfully execute a dry-run of the workflow. | ||
|
||
|
||
rule all: | ||
input: | ||
# The first rule should define the default target files | ||
# Subsequent target rules can be specified below. They should start with all_*. | ||
|
||
|
||
# use includes for common helper functions and sets of rules that serve a common theme | ||
include: "rules/common.smk" | ||
# Main entrypoint of the workflow. | ||
# Please follow the best practices: | ||
# https://snakemake.readthedocs.io/en/stable/snakefiles/best_practices.html, | ||
# in particular regarding the standardized folder structure mentioned there. |
Empty file.