pgs_get_single: Read in and sort a single PGS profile

View source: R/pgs-funcs.R

pgs_get_singleR Documentation

Read in and sort a single PGS profile

Description

Given the path containing PGS profile, this function will read in PGS data for the singe pgs file. In order to correctly only keep rows of data from verified sources, the genetic_match_file is necessary to provide for a check.

Usage

pgs_get_single(
  pgs_file = character(),
  genetic_match_file = character(),
  include_cnt = FALSE,
  include_pheno = FALSE,
  include_genetic_debug = FALSE
)

Arguments

pgs_file

path to PGS.profile

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_pheno

logical, whether to keep PHENO 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

Other pgs-functions: pgs_add_all(), pgs_add_single(), pgs_add(), pgs_get_all(), pgs_get(), pgs_read()

Examples

## Not run: 
pgs_get_single( pgs_path = "path/to//PGS_wAPOE/",
         genetic_match_file =  "path/to/gID_MOAS_match.tsv",
)

# You can also toggle adding the CNT columns from the PGS, by changing
# include_cnt to TRUE
pgs_get_single( pgs_path = "path/to/PGS_wAPOE/",
         genetic_match_file = "path/to/gID_MOAS_match.tsv",
         include_cnt = TRUE
)


## End(Not run)


LCBC-UiO/MOAS documentation built on Aug. 28, 2023, 3:29 a.m.