From 12984a176ed73bb476f3e0d3d8b5cc28b103e14d Mon Sep 17 00:00:00 2001 From: Glenn032787 <79811082+Glenn032787@users.noreply.github.com> Date: Fri, 20 Jan 2023 17:44:52 -0500 Subject: [PATCH] Install snakemake and singularity in github action Follow instructions from https://github.com/snakemake/snakemake-github-action/issues/9 --- .github/workflows/run_snakemake.yaml | 32 ++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/.github/workflows/run_snakemake.yaml b/.github/workflows/run_snakemake.yaml index fd22ae0..880978f 100644 --- a/.github/workflows/run_snakemake.yaml +++ b/.github/workflows/run_snakemake.yaml @@ -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 @@ -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/