importPGSCatalogPRSs
Import PRS models from the PGS Catalog
Description
importPGSCatalogPRSs() is a high-level adapter that imports one or more polygenic score (PGS) models from the PGS Catalog using the suggested package quincunx, and converts them into a PolyGeniusModelSet.
Usage
importPGSCatalogPRSs(
ids,
id.type = c("auto", "pgs", "publication", "trait"),
name = NULL
)
Arguments
ids
|
Character vector of identifiers. Interpretation depends on
|
id.type
|
Character scalar specifying how to interpret |
name
|
Optional name character for the returned |
Details
Resolution happens in two steps:
-
Resolve PGS IDs:
-
id.type = “pgs”/“auto”:^PGS\d+$used directly. -
id.type = “publication”:^PGP\d+$mapped viaquincunx::pgp_to_pgs()(PGP → PGS), numeric strings treated as PubMed IDs and mapped viaquincunx::get_scores(pubmed_id = …)and(scores?)$pgs_id. -
id.type = “trait”:^EFO_\d+mapped viaquincunx::get_scores(efo_id = …); other strings treated as trait terms, mapped to EFO IDs viaquincunx::get_traits(trait_term = …)and then to PGS IDs viaquincunx::get_scores(efo_id = …).
-
-
Import scoring files:
-
For each PGS ID,
quincunx::read_scoring_file()is used to download the scoring file. -
Each scoring table is converted into a
PolyGeniusModelwith columnschr,position,ea,nea,beta,pvaland withbuildtaken from the PGS Cataloggenome_build. -
The full scoring metadata is stored under
model$gwaswith an additionalsource = “PGS Catalog”entry.
-
Value
A PolyGeniusModelSet containing one PolyGeniusModel per resolved PGS score.
Examples
## Not run:
# Import two PGS models by PGS ID
PGSs <- importPGSCatalogPRSs(c("PGS002280", "PGS001828"), id.type = "pgs")
PGSs[[1]]
# Let the function auto-detect identifier types
PGSs <- importPGSCatalogPRSs(
ids = c("PGS002280", "PGP000001", "30554720", "EFO_0007992", "Alzheimer's disease"),
id.type = "auto"
)
# Explicitly resolve by publication (PGP IDs or PubMed IDs)
PGSs <- importPGSCatalogPRSs("PGP000001", id.type = "publication")
# Explicitly resolve by trait (EFO IDs or trait terms)
PGSs <- importPGSCatalogPRSs("EFO_0007992", id.type = "trait")
## End(Not run)
Footnotes
0-9↩︎