This function calls on [pgs_get] to read in wanted PGS at specified significance levels, and adds that data to the MOAS-type data provided.

pgs_add(
  MOAS,
  pgs = NULL,
  s_levels = c("S1", "S7", "S11"),
  pgs_path = NULL,
  genetic_match_file = NULL,
  include_cnt = FALSE,
  include_genetic_debug = FALSE
)

Arguments

MOAS

data.frame of the full MOAS or MOAS sub-set

pgs

character vector of the PGS wanted

s_levels

character vector of the significance levels wanted

pgs_path

path to the directory where the PGS's are stored

genetic_match_file

path to the file containing the MOAS-genetics matching and debugging information

include_cnt

logical, whether to keep SNP count information

include_genetic_debug

logical, whether to keep all columns in the genetic_match_file in the final output

Value

a tibble / data.frame

See also

Examples

if (FALSE) { pgs_add(pgs = c("AD", "EduYears_2016"), s_levels = c("S1", "S7", "S11"), pgs_path = "path/to/PGS_wAPOE/", genetic_match_file = "path/to/gID_MOAS_match.tsv", ) }