diff --git a/.github/workflows/run_quick_tests.yaml b/.github/workflows/run_quick_tests.yaml index 190c359..849024f 100644 --- a/.github/workflows/run_quick_tests.yaml +++ b/.github/workflows/run_quick_tests.yaml @@ -2,25 +2,25 @@ name: Run quick tests of pipeline on: pull_request: - types: [closed] branches: - master workflow_dispatch: jobs: run-tests: - if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest + container: + image: rocker/r-ver:4.1.0 + options: --privileged steps: - name: Checkout repository uses: actions/checkout@v3 - - name: Set up R - uses: r-lib/actions/setup-r@v2 - - - name: Setup singularity + - name: Setup Singularity uses: eWaterCycle/setup-singularity@v7 + with: + singularity-version: 3.8.3 - name: Download Singularity container run: | @@ -29,28 +29,25 @@ jobs: - name: Set environment variables run: | echo "SIF_FILE=$GITHUB_WORKSPACE/genopred_pipeline_latest.sif" >> $GITHUB_ENV - echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV - + if [ "${{ github.event_name }}" = "pull_request" ]; then + echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV + else + echo "BRANCH_NAME=${{ github.ref_name }}" >> $GITHUB_ENV + fi + - 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/")' - name: Run tests run: | - mkdir -p test_results - Rscript -e "testthat::test_dir('pipeline/tests/testthat', reporter = 'junit')" > test_results/results.xml + Rscript -e "testthat::test_dir('pipeline/tests/testthat')" env: SIF_FILE: ${{ env.SIF_FILE }} BRANCH_NAME: ${{ env.BRANCH_NAME }} - - name: Upload test results - if: always() - uses: actions/upload-artifact@v3 - with: - name: test-results - path: test_results/results.xml - - name: Setup tmate session if: ${{ failure() }} uses: mxschmitt/action-tmate@v3 diff --git a/pipeline/misc/dev/test_data/output/example_plink2/ancestry/example_plink2.Ancestry.log b/pipeline/misc/dev/test_data/output/example_plink2/ancestry/example_plink2.Ancestry.log index 2c8eb05..95d943c 100644 --- a/pipeline/misc/dev/test_data/output/example_plink2/ancestry/example_plink2.Ancestry.log +++ b/pipeline/misc/dev/test_data/output/example_plink2/ancestry/example_plink2.Ancestry.log @@ -3,7 +3,7 @@ # For questions contact Oliver Pain (oliver.pain@kcl.ac.uk) ################################################################# # Repository: GenoPred -# Version (tag): v2.2.2-95-g19dbe57 +# Version (tag): v2.2.2-102-g0438efa --------------- Parameter Value target_plink_chr misc/dev/test_data/output/example_plink2/geno/example_plink2.ref.chr @@ -23,7 +23,7 @@ help FALSE out_dir misc/dev/test_data/output/example_plink2/ancestry/ --------------- -Analysis started at 2024-07-25 09:40:29 +Analysis started at 2024-07-25 15:07:05 Lowering prob_thresh parameter to 0.5 for testing. Target sample size is <100 so only checking genotype missingness. 587 variants match between target and reference after QC. @@ -47,5 +47,5 @@ N per group based on model: MID 0 Unassigned 2 ---------- -Analysis finished at 2024-07-25 09:40:44 -Analysis duration was 15.33 secs +Analysis finished at 2024-07-25 15:07:19 +Analysis duration was 14.27 secs diff --git a/pipeline/misc/dev/test_data/output/example_plink2/ancestry/example_plink2.Ancestry.pc_plot.png b/pipeline/misc/dev/test_data/output/example_plink2/ancestry/example_plink2.Ancestry.pc_plot.png index 058590b..ed1cb6c 100644 Binary files a/pipeline/misc/dev/test_data/output/example_plink2/ancestry/example_plink2.Ancestry.pc_plot.png and b/pipeline/misc/dev/test_data/output/example_plink2/ancestry/example_plink2.Ancestry.pc_plot.png differ diff --git a/pipeline/misc/dev/test_data/output/example_plink2/geno/example_plink2.ref.chr22.format_target.log b/pipeline/misc/dev/test_data/output/example_plink2/geno/example_plink2.ref.chr22.format_target.log index b6d8787..1731490 100644 --- a/pipeline/misc/dev/test_data/output/example_plink2/geno/example_plink2.ref.chr22.format_target.log +++ b/pipeline/misc/dev/test_data/output/example_plink2/geno/example_plink2.ref.chr22.format_target.log @@ -3,7 +3,7 @@ # For questions contact Oliver Pain (oliver.pain@kcl.ac.uk) ################################################################# # Repository: GenoPred -# Version (tag): v2.2.2-95-g19dbe57 +# Version (tag): v2.2.2-102-g0438efa --------------- Parameter Value target misc/dev/test_data/target/example.chr22 @@ -15,7 +15,7 @@ help FALSE out_dir misc/dev/test_data/output/example_plink2/geno/ --------------- -Analysis started at 2024-07-25 09:40:19 +Analysis started at 2024-07-25 15:07:00 Reading in reference SNP data. Reference data contains 1000 variants. Reading in target SNP data. @@ -26,5 +26,5 @@ GRCh38 match: 0% Target contains 1000 reference variants. Removing 0 duplicate variants - May have IUPAC NA. Inserting missing reference variants. -Analysis finished at 2024-07-25 09:40:23 -Analysis duration was 4.25 secs +Analysis finished at 2024-07-25 15:07:01 +Analysis duration was 0.7 secs diff --git a/pipeline/misc/dev/test_data/output/example_plink2/geno/example_plink2.ref.chr22.log b/pipeline/misc/dev/test_data/output/example_plink2/geno/example_plink2.ref.chr22.log index 254dc23..be6ffba 100644 --- a/pipeline/misc/dev/test_data/output/example_plink2/geno/example_plink2.ref.chr22.log +++ b/pipeline/misc/dev/test_data/output/example_plink2/geno/example_plink2.ref.chr22.log @@ -1,24 +1,24 @@ -PLINK v2.00a5LM 64-bit Intel (23 Sep 2023) +PLINK v2.00a5.12LM 64-bit Intel (25 Jun 2024) Options in effect: - --bfile /scratch/prj/oliverpainfel/tmp/RtmpClbFKL/ref_targ + --bfile /scratch/prj/oliverpainfel/tmp/RtmpqFvaS6/ref_targ --make-pgen --memory 5000 --out misc/dev/test_data/output/example_plink2/geno/example_plink2.ref.chr22 - --remove /scratch/prj/oliverpainfel/tmp/RtmpClbFKL/REF.psam + --remove /scratch/prj/oliverpainfel/tmp/RtmpqFvaS6/REF.psam --threads 1 Hostname: erc-hpc-comp179 -Working directory: /scratch/prj/oliverpainfel/Software/MyGit/GenoPred/pipeline -Start time: Thu Jul 25 09:40:23 2024 +Working directory: /tools/GenoPred/pipeline +Start time: Thu Jul 25 15:07:01 2024 -Random number seed: 1721896823 -1031702 MiB RAM detected, ~1018874 available; reserving 5000 MiB for main +Random number seed: 1721916421 +1031702 MiB RAM detected, ~1018552 available; reserving 5000 MiB for main workspace. Using 1 compute thread. 3325 samples (1573 females, 1752 males; 3325 founders) loaded from -/scratch/prj/oliverpainfel/tmp/RtmpClbFKL/ref_targ.fam. +/scratch/prj/oliverpainfel/tmp/RtmpqFvaS6/ref_targ.fam. 1000 variants loaded from -/scratch/prj/oliverpainfel/tmp/RtmpClbFKL/ref_targ.bim. +/scratch/prj/oliverpainfel/tmp/RtmpqFvaS6/ref_targ.bim. Note: No phenotype data present. --remove: 12 samples remaining. 12 samples (5 females, 7 males; 12 founders) remaining after main filters. @@ -32,4 +32,4 @@ Writing misc/dev/test_data/output/example_plink2/geno/example_plink2.ref.chr22.pgen ... done. -End time: Thu Jul 25 09:40:23 2024 +End time: Thu Jul 25 15:07:01 2024 diff --git a/pipeline/misc/dev/test_data/output/example_plink2/pcs/projected/AFR/example_plink2-AFR.log b/pipeline/misc/dev/test_data/output/example_plink2/pcs/projected/AFR/example_plink2-AFR.log index 05bc313..001539c 100644 --- a/pipeline/misc/dev/test_data/output/example_plink2/pcs/projected/AFR/example_plink2-AFR.log +++ b/pipeline/misc/dev/test_data/output/example_plink2/pcs/projected/AFR/example_plink2-AFR.log @@ -3,7 +3,7 @@ # For questions contact Oliver Pain (oliver.pain@kcl.ac.uk) ################################################################# # Repository: GenoPred -# Version (tag): v2.2.2-95-g19dbe57 +# Version (tag): v2.2.2-102-g0438efa --------------- Parameter Value target_plink_chr misc/dev/test_data/output/example_plink2/geno/example_plink2.ref.chr @@ -19,9 +19,9 @@ help FALSE output_dir misc/dev/test_data/output/example_plink2/pcs/projected/AFR/ --------------- -Analysis started at 2024-07-25 09:41:24 +Analysis started at 2024-07-25 15:07:20 Calculating polygenic scores in the target sample. Scaling target polygenic scores to the reference. Saved polygenic scores to: misc/dev/test_data/output/example_plink2/pcs/projected/AFR/example_plink2-AFR.profiles. -Analysis finished at 2024-07-25 09:41:25 -Analysis duration was 0.92 secs +Analysis finished at 2024-07-25 15:07:20 +Analysis duration was 0.22 secs diff --git a/pipeline/misc/dev/test_data/output/example_plink2/pcs/projected/CSA/example_plink2-CSA.log b/pipeline/misc/dev/test_data/output/example_plink2/pcs/projected/CSA/example_plink2-CSA.log index a50bbc3..e1b7f83 100644 --- a/pipeline/misc/dev/test_data/output/example_plink2/pcs/projected/CSA/example_plink2-CSA.log +++ b/pipeline/misc/dev/test_data/output/example_plink2/pcs/projected/CSA/example_plink2-CSA.log @@ -3,7 +3,7 @@ # For questions contact Oliver Pain (oliver.pain@kcl.ac.uk) ################################################################# # Repository: GenoPred -# Version (tag): v2.2.2-95-g19dbe57 +# Version (tag): v2.2.2-102-g0438efa --------------- Parameter Value target_plink_chr misc/dev/test_data/output/example_plink2/geno/example_plink2.ref.chr @@ -19,9 +19,9 @@ help FALSE output_dir misc/dev/test_data/output/example_plink2/pcs/projected/CSA/ --------------- -Analysis started at 2024-07-25 09:41:14 +Analysis started at 2024-07-25 15:07:22 Calculating polygenic scores in the target sample. Scaling target polygenic scores to the reference. Saved polygenic scores to: misc/dev/test_data/output/example_plink2/pcs/projected/CSA/example_plink2-CSA.profiles. -Analysis finished at 2024-07-25 09:41:16 -Analysis duration was 1.51 secs +Analysis finished at 2024-07-25 15:07:22 +Analysis duration was 0.22 secs diff --git a/pipeline/misc/dev/test_data/output/example_plink2/pcs/projected/EAS/example_plink2-EAS.log b/pipeline/misc/dev/test_data/output/example_plink2/pcs/projected/EAS/example_plink2-EAS.log index fde6c88..f6d4ee3 100644 --- a/pipeline/misc/dev/test_data/output/example_plink2/pcs/projected/EAS/example_plink2-EAS.log +++ b/pipeline/misc/dev/test_data/output/example_plink2/pcs/projected/EAS/example_plink2-EAS.log @@ -3,7 +3,7 @@ # For questions contact Oliver Pain (oliver.pain@kcl.ac.uk) ################################################################# # Repository: GenoPred -# Version (tag): v2.2.2-95-g19dbe57 +# Version (tag): v2.2.2-102-g0438efa --------------- Parameter Value target_plink_chr misc/dev/test_data/output/example_plink2/geno/example_plink2.ref.chr @@ -19,9 +19,9 @@ help FALSE output_dir misc/dev/test_data/output/example_plink2/pcs/projected/EAS/ --------------- -Analysis started at 2024-07-25 09:41:07 +Analysis started at 2024-07-25 15:07:21 Calculating polygenic scores in the target sample. Scaling target polygenic scores to the reference. Saved polygenic scores to: misc/dev/test_data/output/example_plink2/pcs/projected/EAS/example_plink2-EAS.profiles. -Analysis finished at 2024-07-25 09:41:09 -Analysis duration was 2.18 secs +Analysis finished at 2024-07-25 15:07:22 +Analysis duration was 0.24 secs diff --git a/pipeline/misc/dev/test_data/output/example_plink2/pcs/projected/EUR/example_plink2-EUR.log b/pipeline/misc/dev/test_data/output/example_plink2/pcs/projected/EUR/example_plink2-EUR.log index 77f8e48..36df935 100644 --- a/pipeline/misc/dev/test_data/output/example_plink2/pcs/projected/EUR/example_plink2-EUR.log +++ b/pipeline/misc/dev/test_data/output/example_plink2/pcs/projected/EUR/example_plink2-EUR.log @@ -3,7 +3,7 @@ # For questions contact Oliver Pain (oliver.pain@kcl.ac.uk) ################################################################# # Repository: GenoPred -# Version (tag): v2.2.2-95-g19dbe57 +# Version (tag): v2.2.2-102-g0438efa --------------- Parameter Value target_plink_chr misc/dev/test_data/output/example_plink2/geno/example_plink2.ref.chr @@ -19,9 +19,9 @@ help FALSE output_dir misc/dev/test_data/output/example_plink2/pcs/projected/EUR/ --------------- -Analysis started at 2024-07-25 09:40:59 +Analysis started at 2024-07-25 15:07:21 Calculating polygenic scores in the target sample. Scaling target polygenic scores to the reference. Saved polygenic scores to: misc/dev/test_data/output/example_plink2/pcs/projected/EUR/example_plink2-EUR.profiles. -Analysis finished at 2024-07-25 09:41:01 -Analysis duration was 1.79 secs +Analysis finished at 2024-07-25 15:07:21 +Analysis duration was 0.24 secs diff --git a/pipeline/misc/dev/test_data/output/example_plink2/pgs/AFR.log b/pipeline/misc/dev/test_data/output/example_plink2/pgs/AFR.log index 463159b..e105b26 100644 --- a/pipeline/misc/dev/test_data/output/example_plink2/pgs/AFR.log +++ b/pipeline/misc/dev/test_data/output/example_plink2/pgs/AFR.log @@ -3,7 +3,7 @@ # For questions contact Oliver Pain (oliver.pain@kcl.ac.uk) ################################################################# # Repository: GenoPred -# Version (tag): v2.2.2-95-g19dbe57 +# Version (tag): v2.2.2-102-g0438efa --------------- Parameter Value config misc/dev/test_data/config/config.yaml @@ -16,7 +16,7 @@ help FALSE output_dir misc/dev/test_data/output/example_plink2/pgs/AFR --------------- -Analysis started at 2024-07-25 11:37:16 +Analysis started at 2024-07-25 15:07:25 Processing 3 score files. Aggregating score files in 1 batches. Aggregating batched score files. @@ -24,5 +24,5 @@ Reading in scale files. Calculating polygenic scores in the target sample. Scaling target polygenic scores to the reference. Saved polygenic scores. -Analysis finished at 2024-07-25 11:37:16 -Analysis duration was 0.34 secs +Analysis finished at 2024-07-25 15:07:26 +Analysis duration was 0.35 secs diff --git a/pipeline/misc/dev/test_data/output/example_plink2/pgs/CSA.log b/pipeline/misc/dev/test_data/output/example_plink2/pgs/CSA.log index 6c4f22e..136923a 100644 --- a/pipeline/misc/dev/test_data/output/example_plink2/pgs/CSA.log +++ b/pipeline/misc/dev/test_data/output/example_plink2/pgs/CSA.log @@ -3,7 +3,7 @@ # For questions contact Oliver Pain (oliver.pain@kcl.ac.uk) ################################################################# # Repository: GenoPred -# Version (tag): v2.2.2-95-g19dbe57 +# Version (tag): v2.2.2-102-g0438efa --------------- Parameter Value config misc/dev/test_data/config/config.yaml @@ -16,7 +16,7 @@ help FALSE output_dir misc/dev/test_data/output/example_plink2/pgs/CSA --------------- -Analysis started at 2024-07-25 11:37:17 +Analysis started at 2024-07-25 15:07:26 Processing 3 score files. Aggregating score files in 1 batches. Aggregating batched score files. @@ -24,5 +24,5 @@ Reading in scale files. Calculating polygenic scores in the target sample. Scaling target polygenic scores to the reference. Saved polygenic scores. -Analysis finished at 2024-07-25 11:37:19 -Analysis duration was 1.99 secs +Analysis finished at 2024-07-25 15:07:26 +Analysis duration was 0.34 secs diff --git a/pipeline/misc/dev/test_data/output/example_plink2/pgs/EAS.log b/pipeline/misc/dev/test_data/output/example_plink2/pgs/EAS.log index 517138b..d1a4426 100644 --- a/pipeline/misc/dev/test_data/output/example_plink2/pgs/EAS.log +++ b/pipeline/misc/dev/test_data/output/example_plink2/pgs/EAS.log @@ -3,7 +3,7 @@ # For questions contact Oliver Pain (oliver.pain@kcl.ac.uk) ################################################################# # Repository: GenoPred -# Version (tag): v2.2.2-95-g19dbe57 +# Version (tag): v2.2.2-102-g0438efa --------------- Parameter Value config misc/dev/test_data/config/config.yaml @@ -16,7 +16,7 @@ help FALSE output_dir misc/dev/test_data/output/example_plink2/pgs/EAS --------------- -Analysis started at 2024-07-25 11:37:15 +Analysis started at 2024-07-25 15:07:24 Processing 3 score files. Aggregating score files in 1 batches. Aggregating batched score files. @@ -24,5 +24,5 @@ Reading in scale files. Calculating polygenic scores in the target sample. Scaling target polygenic scores to the reference. Saved polygenic scores. -Analysis finished at 2024-07-25 11:37:15 -Analysis duration was 0.39 secs +Analysis finished at 2024-07-25 15:07:25 +Analysis duration was 0.32 secs diff --git a/pipeline/misc/dev/test_data/output/example_plink2/pgs/EUR.log b/pipeline/misc/dev/test_data/output/example_plink2/pgs/EUR.log index c0116d8..a110897 100644 --- a/pipeline/misc/dev/test_data/output/example_plink2/pgs/EUR.log +++ b/pipeline/misc/dev/test_data/output/example_plink2/pgs/EUR.log @@ -3,7 +3,7 @@ # For questions contact Oliver Pain (oliver.pain@kcl.ac.uk) ################################################################# # Repository: GenoPred -# Version (tag): v2.2.2-95-g19dbe57 +# Version (tag): v2.2.2-102-g0438efa --------------- Parameter Value config misc/dev/test_data/config/config.yaml @@ -16,7 +16,7 @@ help FALSE output_dir misc/dev/test_data/output/example_plink2/pgs/EUR --------------- -Analysis started at 2024-07-25 11:37:14 +Analysis started at 2024-07-25 15:07:24 Processing 3 score files. Aggregating score files in 1 batches. Aggregating batched score files. @@ -24,5 +24,5 @@ Reading in scale files. Calculating polygenic scores in the target sample. Scaling target polygenic scores to the reference. Saved polygenic scores. -Analysis finished at 2024-07-25 11:37:15 -Analysis duration was 0.48 secs +Analysis finished at 2024-07-25 15:07:24 +Analysis duration was 0.35 secs diff --git a/pipeline/misc/dev/test_data/output/example_plink2/reports/example_plink2-report.html b/pipeline/misc/dev/test_data/output/example_plink2/reports/example_plink2-report.html index c4aef3f..4f2ec9f 100644 --- a/pipeline/misc/dev/test_data/output/example_plink2/reports/example_plink2-report.html +++ b/pipeline/misc/dev/test_data/output/example_plink2/reports/example_plink2-report.html @@ -3978,14 +3978,14 @@
Target
+ Target
Principal Component Scores Compared to Reference
Populations. Note. Black circles indicate target sample
@@ -4003,14 +4003,14 @@ Note. The This report was created using GenoPred (v2.2.2-95-g19dbe57). This report was created using GenoPred (v2.2.2-102-g0438efa). Note. The Your PGS Z-score for Body Mass IndexBody Mass Index is 0.994
@@ -4229,7 +4229,7 @@ Your PGS Z-score for Body Mass IndexBody Mass Index is 1.486
@@ -4344,7 +4344,7 @@ This report was created using GenoPred (v2.2.2-95-g19dbe57). This report was created using GenoPred (v2.2.2-102-g0438efa).Polygenic Scores
GWAS summary statistics
-
-
+
+
Score files
-
-
+
+
Pass
column indicates whether
a sufficient number of variants within the score file were present in
the reference data.external
-Polygenic Scores
GWAS summary statistics
-
-
+
+
Score files
-
-
+
+
Pass
column indicates whether
a sufficient number of variants within the score file were present in
the reference data.Method: lassosum
GWAS: Body Mass Index
Method: pT+clump
GWAS: Body Mass Index
Method: External
GWAS: Height Yengo EUR
GWAS: Height Yengo EUR
-