Skip to content

ApplyPolygenicScore

Utilities for the Application of a Polygenic Score to a VCF

v4.0.2 · Feb 26, 2026 · GPL-2

Description

Simple and transparent parsing of genotype/dosage data from an input Variant Call Format (VCF) file, matching of genotype coordinates to the component Single Nucleotide Polymorphisms (SNPs) of an existing polygenic score (PGS), and application of SNP weights to dosages for the calculation of a polygenic score for each individual in accordance with the additive weighted sum of dosages model. Methods are designed in reference to best practices described by Collister, Liu, and Clifton (2022) <doi:10.3389/fgene.2022.818574>.

Downloads

409

Last 30 days

8286th

723

Last 90 days

723

Last year

Trend: +30.3% (30d vs prior 30d)

CRAN Check Status

1 ERROR
13 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc ERROR
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (14 non-OK)
OK r-devel-linux-x86_64-debian-clang

*


            
ERROR r-devel-linux-x86_64-debian-gcc

tests

  Running ‘testthat.R’ [121s/154s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat);
  > library(ApplyPolygenicScore);
  > 
  > test_check('ApplyPolygenicScore');
  Input data passed validation
  Input data passed validation
  Saving _problems/test-pgs-statistics-371.R
  Skipping test for >12 PGS columns as 'scales' package is available and will be used.
  Saving _problems/test-pgs-statistics-559.R
  Saving _problems/test-plotting-136.R
  Saving _problems/test-plotting-431.R
  Saving _problems/test-plotting-741.R
  [1] "springgreen3"
  [1] "darkturquoise"
  [1] "springgreen3"
  [1] "darkturquoise"
  Saving _problems/test-plotting-995.R
  [ FAIL 6 | WARN 87 | SKIP 0 | PASS 625 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-pgs-statistics.R:363:9'): analyze.pgs.binary.predictiveness validates binary phenotype columns ──
  Error in `basename(x)`: a character vector argument expected
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(...) at test-pgs-statistics.R:363:9
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. └─ApplyPolygenicScore::analyze.pgs.binary.predictiveness(...)
    8.   └─BoutrosLab.plotting.general::create.multipanelplot(...)
    9.     └─BoutrosLab.plotting.general:::get.legend.height(...)
   10.       └─tools::file_ext(filename)
   11.         ├─base::ifelse(...)
   12.         ├─base::grepl("^(.*[^.]+.*)[.]([[:alnum:]]+)$", basename(x))
   13.         │ └─base::is.factor(x)
   14.         └─base::basename(x)
  ── Error ('test-pgs-statistics.R:552:9'): analyze.pgs.binary.predictiveness correctly formats outputs ──
  Error in `basename(x)`: a character vector argument expected
  Backtrace:
      ▆
   1. └─ApplyPolygenicScore::analyze.pgs.binary.predictiveness(...) at test-pgs-statistics.R:552:9
   2.   └─BoutrosLab.plotting.general::create.multipanelplot(...)
   3.     └─BoutrosLab.plotting.general:::get.legend.height(...)
   4.       └─tools::file_ext(filename)
   5.         ├─base::ifelse(...)
   6.         ├─base::grepl("^(.*[^.]+.*)[.]([[:alnum:]]+)$", basename(x))
   7.         │ └─base::is.factor(x)
   8.         └─base::basename(x)
  ── Error ('test-plotting.R:132:9'): create.pgs.density.plot runs with no error with basic inputs ──
  Error in `basename(x)`: a character vector argument expected
  Backtrace:
      ▆
   1. └─ApplyPolygenicScore::create.pgs.density.plot(...) at test-plotting.R:132:9
   2.   └─BoutrosLab.plotting.general::create.multipanelplot(...)
   3.     └─BoutrosLab.plotting.general:::get.legend.height(...)
   4.       └─tools::file_ext(filename)
   5.         ├─base::ifelse(...)
   6.         ├─base::grepl("^(.*[^.]+.*)[.]([[:alnum:]]+)$", basename(x))
   7.         │ └─base::is.factor(x)
   8.         └─base::basename(x)
  ── Error ('test-plotting.R:426:9'): create.pgs.with.continuous.phenotype.plot runs with no error with basic inputs ──
  Error in `basename(x)`: a character vector argument expected
  Backtrace:
      ▆
   1. └─ApplyPolygenicScore::create.pgs.with.continuous.phenotype.plot(...) at test-plotting.R:426:9
   2.   └─BoutrosLab.plotting.general::create.multipanelplot(...)
   3.     └─BoutrosLab.plotting.general:::get.legend.height(...)
   4.       └─tools::file_ext(filename)
   5.         ├─base::ifelse(...)
   6.         ├─base::grepl("^(.*[^.]+.*)[.]([[:alnum:]]+)$", basename(x))
   7.         │ └─base::is.factor(x)
   8.         └─base::basename(x)
  ── Error ('test-plotting.R:737:9'): create.pgs.rank.plot runs with no error with basic inputs ──
  Error in `basename(x)`: a character vector argument expected
  Backtrace:
      ▆
   1. └─ApplyPolygenicScore::create.pgs.rank.plot(...) at test-plotting.R:737:9
   2.   └─BoutrosLab.plotting.general::create.multipanelplot(...)
   3.     └─BoutrosLab.plotting.general:::get.legend.height(...)
   4.       └─tools::file_ext(filename)
   5.         ├─base::ifelse(...)
   6.         ├─base::grepl("^(.*[^.]+.*)[.]([[:alnum:]]+)$", basename(x))
   7.         │ └─base::is.factor(x)
   8.         └─base::basename(x)
  ── Error ('test-plotting.R:991:9'): create.pgs.boxplot runs with no error with basic inputs ──
  Error in `basename(x)`: a character vector argument expected
  Backtrace:
      ▆
   1. └─ApplyPolygenicScore::create.pgs.boxplot(...) at test-plotting.R:991:9
   2.   └─BoutrosLab.plotting.general::create.multipanelplot(...)
   3.     └─BoutrosLab.plotting.general:::get.legend.height(...)
   4.       └─tools::file_ext(filename)
   5.         ├─base::ifelse(...)
   6.         ├─base::grepl("^(.*[^.]+.*)[.]([[:alnum:]]+)$", basename(x))
   7.         │ └─base::is.factor(x)
   8.         └─base::basename(x)
  
  [ FAIL 6 | WARN 87 | SKIP 0 | PASS 625 ]
  Error:
  ! Test failures.
  Execution halted
OK r-devel-linux-x86_64-fedora-clang

*


            
OK r-devel-linux-x86_64-fedora-gcc

*


            
OK r-devel-macos-arm64

*


            
OK r-devel-windows-x86_64

*


            
OK r-oldrel-macos-arm64

*


            
OK r-oldrel-macos-x86_64

*


            
OK r-oldrel-windows-x86_64

*


            
OK r-patched-linux-x86_64

*


            
OK r-release-linux-x86_64

*


            
OK r-release-macos-arm64

*


            
OK r-release-macos-x86_64

*


            
OK r-release-windows-x86_64

*


            

Check History

ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 9, 2026
ERROR r-devel-linux-x86_64-debian-gcc

tests

  Running ‘testthat.R’ [121s/154s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat);
  > library(ApplyPolygenicScore);
  > 
  > test_check('ApplyPolygenicScore');
  Input data passed validation
  Input data passed validation
  Saving _problems/test-pgs-statistics-371.R
  Skipping test for >12 PGS columns as 'scales' package is available and will be used.
  Saving _problems/test-pgs-statistics-559.R
  Saving _problems/test-plotting-136.R
  Saving _problems/te

Dependency Network

Dependencies Reverse dependencies vcfR pROC data.table BoutrosLab.plotting.general lattice ApplyPolygenicScore

Version History

new 4.0.2 Mar 9, 2026