Skip to content

Commit

Permalink
copy install to pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmeaton committed Oct 12, 2020
1 parent da79e2c commit 0a44932
Show file tree
Hide file tree
Showing 3 changed files with 155 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
shell: bash -l {0}
run: |
conda activate plague-phylogeography;
snakemake --profile profiles/gh-actions --use-conda --conda_prefix ${CONDA_PREFIX} help;
snakemake --profile profiles/gh-actions --use-conda --conda-prefix ${CONDA_PREFIX} help;
#----------------------------------------------------------------------------#
install_singularity:
name: Install with Singularity
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,11 @@ on:
#------------------------------------------------------------------------------#
jobs:
#----------------------------------------------------------------------------#
# Install dependencies
pipeline :
pipeline_conda:
name: Pipeline with Conda
runs-on: ubuntu-latest
strategy:
matrix:
container: ["conda", "singularity"]
fail-fast: false
timeout-minutes: 120
steps:
#------------------------------------------------------------------------#
# Checkout Repository
Expand All @@ -70,3 +67,10 @@ jobs:
- name: create conda env
run: mamba env create -f workflow/envs/main/main.yaml
#------------------------------------------------------------------------#
# run help
- name: run help
shell: bash -l {0}
run: |
conda activate plague-phylogeography;
snakemake --profile profiles/gh-actions --use-conda --conda-prefix ${CONDA_PREFIX} help;
#----------------------------------------------------------------------------#
145 changes: 145 additions & 0 deletions .github/workflows/pipeline.yaml.bak
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/

0 comments on commit 0a44932

Please sign in to comment.