Skip to content

Commit

Permalink
Install snakemake and singularity in github action
Browse files Browse the repository at this point in the history
Follow instructions from snakemake/snakemake-github-action#9
  • Loading branch information
Glenn032787 authored Jan 20, 2023
1 parent e51513f commit 12984a1
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions .github/workflows/run_snakemake.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,21 @@ jobs:
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda install -c conda-forge mamba
- name: Setup snakemake
run: |
mamba install -c conda-forge -c bioconda snakemake singularity
- run: echo "Finish installing snakemake"
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: Downlaod hg38 ref file
Expand All @@ -21,13 +36,16 @@ jobs:
unzip example/ref/snpEff_v5_0_GRCh38.99.zip -d example/ref/
mv example/ref/data example/ref/snpeff
- run: echo "Reference file downloaded to runner"
- name: Testing
uses: snakemake/snakemake-github-action@v1
with:
directory: '.'
snakefile: 'Snakefile'
args: '-c 2 --use-singularity --configfiles example/config/defaults.yaml example/config/parameters.yaml example/config/samples.yaml'
stagein: '' # additional preliminary commands to run (can be multiline)
#- name: Testing
# uses: snakemake/snakemake-github-action@v1
# with:
# directory: '.'
# snakefile: 'Snakefile'
# args: '-c 2 --use-singularity --configfiles example/config/defaults.yaml example/config/parameters.yaml example/config/samples.yaml'
# stagein: '' # additional preliminary commands to run (can be multiline)
- name: Testin
run: |
snakemake -c 2 --use-singularity --configfiles example/config/defaults.yaml example/config/parameters.yaml example/config/samples.yaml
- name: Check output
run: |
ls -lt output/exampleSample/
Expand Down

0 comments on commit 12984a1

Please sign in to comment.