From 3b1225e4633695800007b4c1d87210d1bd58ac89 Mon Sep 17 00:00:00 2001 From: Ollie Date: Wed, 24 Jun 2026 13:55:29 +0100 Subject: [PATCH 1/5] fix(dependencies): rename PRScs csa ref dir to match rule output (#169) --- pipeline/rules/dependencies.smk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pipeline/rules/dependencies.smk b/pipeline/rules/dependencies.smk index 8913566..76623ae 100644 --- a/pipeline/rules/dependencies.smk +++ b/pipeline/rules/dependencies.smk @@ -728,6 +728,10 @@ rule download_prscs_ref_ukb: rm -r -f {resdir}/data/prscs_ref/ukbb/ldblk_ukbb_{wildcards.population}; \ wget --no-check-certificate -O {resdir}/data/prscs_ref/ukbb/ldblk_ukbb_{wildcards.population}.tar.gz {params.url}; \ tar -zxvf {resdir}/data/prscs_ref/ukbb/ldblk_ukbb_{wildcards.population}.tar.gz -C {resdir}/data/prscs_ref/ukbb/; \ + extracted_dir=$(tar -tzf {resdir}/data/prscs_ref/ukbb/ldblk_ukbb_{wildcards.population}.tar.gz | head -1 | cut -d/ -f1); \ + if [ "$extracted_dir" != "ldblk_ukbb_{wildcards.population}" ]; then \ + mv {resdir}/data/prscs_ref/ukbb/"$extracted_dir" {resdir}/data/prscs_ref/ukbb/ldblk_ukbb_{wildcards.population}; \ + fi; \ rm {resdir}/data/prscs_ref/ukbb/ldblk_ukbb_{wildcards.population}.tar.gz }} > {log} 2>&1 """ @@ -761,6 +765,10 @@ rule download_prscs_ref_1kg: rm -r -f {resdir}/data/prscs_ref/1kg/ldblk_1kg_{wildcards.population}; \ wget --no-check-certificate -O {resdir}/data/prscs_ref/1kg/ldblk_1kg_{wildcards.population}.tar.gz {params.url}; \ tar -zxvf {resdir}/data/prscs_ref/1kg/ldblk_1kg_{wildcards.population}.tar.gz -C {resdir}/data/prscs_ref/1kg/; \ + extracted_dir=$(tar -tzf {resdir}/data/prscs_ref/1kg/ldblk_1kg_{wildcards.population}.tar.gz | head -1 | cut -d/ -f1); \ + if [ "$extracted_dir" != "ldblk_1kg_{wildcards.population}" ]; then \ + mv {resdir}/data/prscs_ref/1kg/"$extracted_dir" {resdir}/data/prscs_ref/1kg/ldblk_1kg_{wildcards.population}; \ + fi; \ rm {resdir}/data/prscs_ref/1kg/ldblk_1kg_{wildcards.population}.tar.gz }} > {log} 2>&1 """ From 72b4d1f94a3b60e83ecd7b10e5c633e83dffaad1 Mon Sep 17 00:00:00 2001 From: Ollie Date: Wed, 24 Jun 2026 14:17:54 +0100 Subject: [PATCH 2/5] ci: install libuv1-dev and fail-fast on missing R deps in quick tests --- .github/workflows/run_quick_tests.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run_quick_tests.yaml b/.github/workflows/run_quick_tests.yaml index 9e6a06c..591d9d0 100644 --- a/.github/workflows/run_quick_tests.yaml +++ b/.github/workflows/run_quick_tests.yaml @@ -35,12 +35,20 @@ jobs: echo "BRANCH_NAME=${{ github.ref_name }}" >> $GITHUB_ENV fi + - name: Install system dependencies + run: | + apt-get update + # libuv1-dev: required to compile 'fs' (>= 2.x), a transitive dep of testthat. + # zlib1g-dev: enables data.table fwrite compression (otherwise NOZLIB). + apt-get install -y libuv1-dev zlib1g-dev + - name: Install R dependencies run: | - Rscript -e 'install.packages("testthat", repos="https://cran.rstudio.com/")' - Rscript -e 'install.packages("data.table", repos="https://cran.rstudio.com/")' - Rscript -e 'install.packages("R.utils", repos="https://cran.rstudio.com/")' - + Rscript -e 'pkgs <- c("testthat", "data.table", "R.utils"); \ + install.packages(pkgs, repos = "https://cran.rstudio.com/"); \ + missing <- pkgs[!pkgs %in% rownames(installed.packages())]; \ + if (length(missing)) stop("Failed to install: ", paste(missing, collapse = ", "))' + - name: Run tests run: | Rscript -e "testthat::test_dir('pipeline/tests/testthat')" From 1642371d17801fe03d7bed4a7bbd1d96d1a67f63 Mon Sep 17 00:00:00 2001 From: Ollie Date: Wed, 24 Jun 2026 14:28:35 +0100 Subject: [PATCH 3/5] fix backslash error in r code for action --- .github/workflows/run_quick_tests.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run_quick_tests.yaml b/.github/workflows/run_quick_tests.yaml index 591d9d0..6c8a722 100644 --- a/.github/workflows/run_quick_tests.yaml +++ b/.github/workflows/run_quick_tests.yaml @@ -44,11 +44,13 @@ jobs: - name: Install R dependencies run: | - Rscript -e 'pkgs <- c("testthat", "data.table", "R.utils"); \ - install.packages(pkgs, repos = "https://cran.rstudio.com/"); \ - missing <- pkgs[!pkgs %in% rownames(installed.packages())]; \ - if (length(missing)) stop("Failed to install: ", paste(missing, collapse = ", "))' - + Rscript -e ' + pkgs <- c("testthat", "data.table", "R.utils") + install.packages(pkgs, repos = "https://cran.rstudio.com/") + missing <- pkgs[!pkgs %in% rownames(installed.packages())] + if (length(missing)) stop("Failed to install: ", paste(missing, collapse = ", ")) + ' + - name: Run tests run: | Rscript -e "testthat::test_dir('pipeline/tests/testthat')" From aa19d4ca912492f335692c5d3383d94128d3acbb Mon Sep 17 00:00:00 2001 From: Ollie Date: Wed, 24 Jun 2026 14:34:32 +0100 Subject: [PATCH 4/5] fix whitespace error in r code for action --- .github/workflows/run_quick_tests.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_quick_tests.yaml b/.github/workflows/run_quick_tests.yaml index 6c8a722..a12652e 100644 --- a/.github/workflows/run_quick_tests.yaml +++ b/.github/workflows/run_quick_tests.yaml @@ -34,14 +34,14 @@ jobs: else echo "BRANCH_NAME=${{ github.ref_name }}" >> $GITHUB_ENV fi - + - name: Install system dependencies run: | apt-get update # libuv1-dev: required to compile 'fs' (>= 2.x), a transitive dep of testthat. # zlib1g-dev: enables data.table fwrite compression (otherwise NOZLIB). apt-get install -y libuv1-dev zlib1g-dev - + - name: Install R dependencies run: | Rscript -e ' From 8960f868abac45ecb94de1c38e9d1ed79ef90e64 Mon Sep 17 00:00:00 2001 From: Ollie Date: Wed, 24 Jun 2026 14:42:03 +0100 Subject: [PATCH 5/5] fix indentation error in r code for action --- .github/workflows/run_quick_tests.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/run_quick_tests.yaml b/.github/workflows/run_quick_tests.yaml index a12652e..91b3f15 100644 --- a/.github/workflows/run_quick_tests.yaml +++ b/.github/workflows/run_quick_tests.yaml @@ -44,12 +44,7 @@ jobs: - name: Install R dependencies run: | - Rscript -e ' - pkgs <- c("testthat", "data.table", "R.utils") - install.packages(pkgs, repos = "https://cran.rstudio.com/") - missing <- pkgs[!pkgs %in% rownames(installed.packages())] - if (length(missing)) stop("Failed to install: ", paste(missing, collapse = ", ")) - ' + Rscript -e 'pkgs <- c("testthat", "data.table", "R.utils"); install.packages(pkgs, repos = "https://cran.rstudio.com/"); missing <- pkgs[!pkgs %in% rownames(installed.packages())]; if (length(missing)) stop("Failed to install: ", paste(missing, collapse = ", "))' - name: Run tests run: |