-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
155 additions
and
6 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
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
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,145 @@ | ||
#------------------------------------------------------------------------------# | ||
name: Pipeline | ||
#------------------------------------------------------------------------------# | ||
# Global workflow environment variables | ||
env: | ||
CONDA_ENVS_PATH: "/home/runner/miniconda/envs:/usr/share/miniconda/envs" | ||
CONDA_PKGS_DIRS: "/home/runner/miniconda/pkgs" | ||
CONDA_PREFIX: "/home/runner/work/plague-phylogeography/plague-phylogeography/.snakemake/conda" | ||
SINGULARITY_PREFIX: "/home/runner/work/plague-phylogeography/plague-phylogeography/.snakemake/singularity/" | ||
TEST_DOWNLOAD: "test_download_reference test_download_assembly test_download_sra test_download_gff test_download_gbff" | ||
TEST_EAGER: "test_eager_local test_eager_sra" | ||
TEST_SNIPPY: "test_snippy_pairwise_assembly test_snippy_pairwise_sra test_snippy_pairwise_local" | ||
TEST_SNIPPY_MULTI: "test_snippy_multi test_snippy_multi_filter" | ||
TEST_PHYLOGENY: "test_iqtree" | ||
TEST_QC: "test_multiqc" | ||
|
||
#------------------------------------------------------------------------------# | ||
# Workflow conditions | ||
on: | ||
push: | ||
branches: | ||
- '*' | ||
paths: | ||
- '.github/workflows/pipeline.yaml' | ||
- 'workflow/Snakefile' | ||
- 'workflow/rules/*.smk' | ||
- 'workflow/envs/*/*.yaml' | ||
- 'workflow/envs/*/Dockerfile' | ||
- 'workflow/scripts/*' | ||
- 'results/sqlite_db/*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
release: | ||
types: [published] | ||
#------------------------------------------------------------------------------# | ||
jobs: | ||
#----------------------------------------------------------------------------# | ||
# Install dependencies | ||
pipeline : | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
container: ["conda", "singularity"] | ||
fail-fast: false | ||
timeout-minutes: 120 | ||
steps: | ||
#------------------------------------------------------------------------# | ||
# Checkout Repository | ||
- name: checkout repo | ||
uses: actions/checkout@v2 | ||
# Setup python | ||
- name: setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.7' | ||
# Setup snakemake | ||
- name: setup snakemake | ||
run: pip install snakemake==5.26.0 ftputil==4.0.0 | ||
#------------------------------------------------------------------------# | ||
# Setup conda with mamba | ||
- name: setup conda | ||
uses: goanpeca/setup-miniconda@v1 | ||
with: | ||
auto-update-conda: true | ||
mamba-version: "*" | ||
channels: conda-forge | ||
# Install conda environment | ||
- name: create conda env | ||
run: mamba env create -f workflow/envs/main/main.yaml; | ||
#------------------------------------------------------------------------# | ||
# Setup singularity | ||
- name: setup singularity | ||
uses: eWaterCycle/setup-singularity@v3 | ||
with: | ||
singularity-version: 3.6.3 | ||
# install pipeline container | ||
- name: install container | ||
run: singularity pull docker://docker.io/ktmeaton/plague-phylogeography; | ||
#------------------------------------------------------------------------# | ||
# Test Data Download | ||
- name: test download | ||
shell: bash -l {0} | ||
run: | | ||
if [[ "${{ matrix.container }}" == "conda" ]] ; then | ||
conda activate plague-phylogeography; | ||
snakemake --profile profiles/gh-actions --use-conda --conda-prefix ${CONDA_PREFIX} ${TEST_DOWNLOAD}; | ||
else | ||
singularity exec plague-phylogeography_latest.sif snakemake --profile profiles/gh-actions --use-singularity --singularity-prefix ${SINGULARITY_PREFIX} ${TEST_DOWNLOAD}; | ||
fi; | ||
|
||
# Test Eager | ||
- name: test eager | ||
shell: bash -l {0} | ||
run: | ||
snakemake --profile profiles/gh-actions ${{ matrix.container }} ${TEST_EAGER}; | ||
# Test snippy | ||
- name: test snippy pairwise | ||
shell: bash -l {0} | ||
run: | ||
snakemake --profile profiles/gh-actions ${{ matrix.container }} ${TEST_SNIPPY}; | ||
# Test snippy | ||
- name: test merge snp density | ||
shell: bash -l {0} | ||
run: | ||
snakemake --profile profiles/gh-actions ${{ matrix.container }} merge_snp_density; | ||
# Test snippy multi | ||
- name: test snippy multi | ||
shell: bash -l {0} | ||
run: | ||
snakemake --profile profiles/gh-actions ${{ matrix.container }} ${TEST_SNIPPY_MULTI}; | ||
# Test IQTREE | ||
- name: test iqtree | ||
shell: bash -l {0} | ||
run: | ||
snakemake --profile profiles/gh-actions ${{ matrix.container }} ${TEST_PHYLOGENY}; | ||
# Test IQTREE | ||
- name: test multiqc | ||
shell: bash -l {0} | ||
run: | ||
snakemake --profile profiles/gh-actions ${{ matrix.container }} ${TEST_QC}; | ||
# Test wrapup with all | ||
- name: test all | ||
shell: bash -l {0} | ||
run: | ||
snakemake --profile profiles/gh-actions ${{ matrix.container }} all; | ||
# Test Report Generation | ||
- name: test report | ||
shell: bash -l {0} | ||
run: | ||
snakemake --profile profiles/gh-actions ${{ matrix.container }} --report workflow/report/report.html all; | ||
#------------------------------------------------------------------------# | ||
# Artifact Upload Report | ||
- name: artifact report | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: report | ||
path: workflow/report/report.html | ||
# Artifact Upload logs | ||
- name: artifact logs | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: logs | ||
path: workflow/logs/ |