Introduction
Polygenic scores (PGSs) are annotated with information about the
phenotype that it predicts, i.e. the reported trait (as reported in the
original publication). This can be found as the column
reported_trait
in slot scores
of
scores
objects:
pgs_01 <- get_scores('PGS000001')
#> Warning: Automatic coercion from integer to character was deprecated in purrr 1.0.0.
#> ℹ Please use an explicit call to `as.character()` within `map_chr()` instead.
#> ℹ The deprecated feature was likely used in the tidyjson package.
#> Please report the issue at <https://github.com/colearendt/tidyjson/issues>.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.
pgs_01@scores
#> # A tibble: 1 × 12
#> pgs_id pgs_name scoring_file matches_publication reported_trait
#> <chr> <chr> <chr> <lgl> <chr>
#> 1 PGS000001 PRS77_BC https://ftp.ebi.ac.uk/p… TRUE Breast Cancer
#> # ℹ 7 more variables: trait_additional_description <chr>,
#> # pgs_method_name <chr>, pgs_method_params <chr>, n_variants <int>,
#> # n_variants_interactions <int>, assembly <chr>, license <chr>
The predicted phenotype is also mapped to Experimental Factor
Ontology (EFO) terms (a controlled vocabulary for the unambiguous
identification of traits and diseases, and their relationships), namely,
the EFO trait. The EFO traits associated with a polygenic score can also
be found in scores
objects in the slot traits
,
column trait
:
pgs_01@traits
#> # A tibble: 1 × 5
#> pgs_id efo_id trait description url
#> <chr> <chr> <chr> <chr> <chr>
#> 1 PGS000001 EFO_0000305 breast carcinoma A carcinoma that arises from epi… http…
Many PGSs have been developed and demonstrated to be predictive of common complex traits, e.g. body mass index (BMI)1, blood lipids2 and educational attainment3.
Similarly, PGSs for various diseases have been shown to be predictive of disease incidence, defining marked increases in risk over the life course or at earlier ages for people with high PGSs, e.g. coronary artery disease4,5, breast cancer6 and schizophrenia7.
Getting catalogued traits from PGS Catalog
If you are interested in retrieving polygenic scores from the
Catalog, you might want to search them by the trait they predict.
get_scores()
is the function that searches for
PGSs
, however, this function only allows to search by
pgs_id
, efo_id
or pubmed_id
. So
in order to search by a trait term, we need to first find the associated
EFO identifiers (efo_id
).
To search for traits (or diseases), you use the function
get_traits()
. With this function you can search by:
- The EFO trait identifier:
efo_id
; - or by the trait term: a term to be matched in the EFO identifier
(
efo_id
), label, description synonyms, trait categories, or external mapped terms.
The most useful search criteria is the trait term, and that is typically want you will want to use. Unless you already know the EFO trait you are interested in, and are looking for extra details about it, you won’t search directly with the EFO identifier.
Basic example
Let’s say you are interested in PGSs related to medical condition,
stroke. Then you can search for "stroke"
with
get_traits()
:
get_traits(trait_term = 'stroke')
#> An object of class "traits"
#> Slot "traits":
#> # A tibble: 1 × 6
#> efo_id parent_efo_id is_child trait description url
#> <chr> <chr> <lgl> <chr> <chr> <chr>
#> 1 EFO_0000712 NA FALSE stroke A sudden loss of neurological… http…
#>
#> Slot "pgs_ids":
#> # A tibble: 10 × 4
#> efo_id parent_efo_id is_child pgs_id
#> <chr> <chr> <lgl> <chr>
#> 1 EFO_0000712 NA FALSE PGS000038
#> 2 EFO_0000712 NA FALSE PGS000039
#> 3 EFO_0000712 NA FALSE PGS000665
#> 4 EFO_0000712 NA FALSE PGS000911
#> 5 EFO_0000712 NA FALSE PGS001793
#> 6 EFO_0000712 NA FALSE PGS001798
#> 7 EFO_0000712 NA FALSE PGS002259
#> 8 EFO_0000712 NA FALSE PGS002724
#> 9 EFO_0000712 NA FALSE PGS002725
#> 10 EFO_0000712 NA FALSE PGS002770
#>
#> Slot "child_pgs_ids":
#> # A tibble: 0 × 4
#> # ℹ 4 variables: efo_id <chr>, parent_efo_id <chr>, is_child <lgl>,
#> # child_pgs_id <chr>
#>
#> Slot "trait_categories":
#> # A tibble: 2 × 4
#> efo_id parent_efo_id is_child trait_categories
#> <chr> <chr> <lgl> <chr>
#> 1 EFO_0000712 NA FALSE Cardiovascular disease
#> 2 EFO_0000712 NA FALSE Neurological disorder
#>
#> Slot "trait_synonyms":
#> # A tibble: 53 × 4
#> efo_id parent_efo_id is_child trait_synonyms
#> <chr> <chr> <lgl> <chr>
#> 1 EFO_0000712 NA FALSE Acute Cerebrovascular Accident
#> 2 EFO_0000712 NA FALSE Acute Cerebrovascular Accidents
#> 3 EFO_0000712 NA FALSE Acute Stroke
#> 4 EFO_0000712 NA FALSE Acute Strokes
#> 5 EFO_0000712 NA FALSE Apoplexy
#> 6 EFO_0000712 NA FALSE Apoplexy, Cerebrovascular
#> 7 EFO_0000712 NA FALSE Brain Vascular Accident
#> 8 EFO_0000712 NA FALSE Brain Vascular Accidents
#> 9 EFO_0000712 NA FALSE CEREBROVASCULAR ACCIDENT, (CVA)
#> 10 EFO_0000712 NA FALSE CVA
#> # ℹ 43 more rows
#>
#> Slot "trait_mapped_terms":
#> # A tibble: 13 × 4
#> efo_id parent_efo_id is_child trait_mapped_terms
#> <chr> <chr> <lgl> <chr>
#> 1 EFO_0000712 NA FALSE HP:0001297
#> 2 EFO_0000712 NA FALSE ICD10:I64
#> 3 EFO_0000712 NA FALSE MESH:D020521
#> 4 EFO_0000712 NA FALSE MONDO:0005098
#> 5 EFO_0000712 NA FALSE MeSH:D020521
#> 6 EFO_0000712 NA FALSE MedDRA:10042244
#> 7 EFO_0000712 NA FALSE NCIT:C3390
#> 8 EFO_0000712 NA FALSE NCIt:C3390
#> 9 EFO_0000712 NA FALSE NIFSTD:birnlex_12783
#> 10 EFO_0000712 NA FALSE OMIM:601367
#> 11 EFO_0000712 NA FALSE SCTID:230690007
#> 12 EFO_0000712 NA FALSE SNOMEDCT:230690007
#> 13 EFO_0000712 NA FALSE SNOMEDCT:422504002
As can be seen from the returned traits
object, we get a
set of six tables (slots) that include several details about stroke.
In the first table traits
we got only one row,
indicating that this query returned only one trait in the Catalog. This
trait is named "stroke"
(column trait
), and is
unambiguously identified by the EFO identifier EFO_0000712.
Exact matching
By default, the trait term is matched exactly. If you want to relax
the matching, then indicate with the parameter exact_term
set to FALSE
. This way you will get, potentially, more
results, in this example case, ischemic stroke (HP_0002140) is now also
returned:
get_traits(trait_term = 'stroke', exact_term = FALSE)
#> An object of class "traits"
#> Slot "traits":
#> # A tibble: 4 × 6
#> efo_id parent_efo_id is_child trait description url
#> <chr> <chr> <lgl> <chr> <chr> <chr>
#> 1 EFO_0005669 NA FALSE intracerebral hemorrhage Bleeding i… http…
#> 2 HP_0002140 NA FALSE Ischemic stroke Acute isch… http…
#> 3 EFO_0010555 NA FALSE left ventricular stroke … Quantifica… http…
#> 4 EFO_0000712 NA FALSE stroke A sudden l… http…
#>
#> Slot "pgs_ids":
#> # A tibble: 17 × 4
#> efo_id parent_efo_id is_child pgs_id
#> <chr> <chr> <lgl> <chr>
#> 1 EFO_0005669 NA FALSE PGS003457
#> 2 HP_0002140 NA FALSE PGS000039
#> 3 HP_0002140 NA FALSE PGS000665
#> 4 HP_0002140 NA FALSE PGS000911
#> 5 HP_0002140 NA FALSE PGS002724
#> 6 HP_0002140 NA FALSE PGS002725
#> 7 EFO_0010555 NA FALSE PGS001413
#> 8 EFO_0000712 NA FALSE PGS000038
#> 9 EFO_0000712 NA FALSE PGS000039
#> 10 EFO_0000712 NA FALSE PGS000665
#> 11 EFO_0000712 NA FALSE PGS000911
#> 12 EFO_0000712 NA FALSE PGS001793
#> 13 EFO_0000712 NA FALSE PGS001798
#> 14 EFO_0000712 NA FALSE PGS002259
#> 15 EFO_0000712 NA FALSE PGS002724
#> 16 EFO_0000712 NA FALSE PGS002725
#> 17 EFO_0000712 NA FALSE PGS002770
#>
#> Slot "child_pgs_ids":
#> # A tibble: 0 × 4
#> # ℹ 4 variables: efo_id <chr>, parent_efo_id <chr>, is_child <lgl>,
#> # child_pgs_id <chr>
#>
#> Slot "trait_categories":
#> # A tibble: 6 × 4
#> efo_id parent_efo_id is_child trait_categories
#> <chr> <chr> <lgl> <chr>
#> 1 EFO_0005669 NA FALSE Cardiovascular disease
#> 2 EFO_0005669 NA FALSE Neurological disorder
#> 3 HP_0002140 NA FALSE Other trait
#> 4 EFO_0010555 NA FALSE Cardiovascular measurement
#> 5 EFO_0000712 NA FALSE Cardiovascular disease
#> 6 EFO_0000712 NA FALSE Neurological disorder
#>
#> Slot "trait_synonyms":
#> # A tibble: 56 × 4
#> efo_id parent_efo_id is_child trait_synonyms
#> <chr> <chr> <lgl> <chr>
#> 1 EFO_0005669 NA FALSE intracerebral hemorrhage
#> 2 EFO_0005669 NA FALSE stroke, hemorrhagic
#> 3 HP_0002140 NA FALSE Ischaemic stroke
#> 4 EFO_0000712 NA FALSE Acute Cerebrovascular Accident
#> 5 EFO_0000712 NA FALSE Acute Cerebrovascular Accidents
#> 6 EFO_0000712 NA FALSE Acute Stroke
#> 7 EFO_0000712 NA FALSE Acute Strokes
#> 8 EFO_0000712 NA FALSE Apoplexy
#> 9 EFO_0000712 NA FALSE Apoplexy, Cerebrovascular
#> 10 EFO_0000712 NA FALSE Brain Vascular Accident
#> # ℹ 46 more rows
#>
#> Slot "trait_mapped_terms":
#> # A tibble: 23 × 4
#> efo_id parent_efo_id is_child trait_mapped_terms
#> <chr> <chr> <lgl> <chr>
#> 1 EFO_0005669 NA FALSE ICD10:I61
#> 2 EFO_0005669 NA FALSE ICD9:431
#> 3 EFO_0005669 NA FALSE MESH:D002543
#> 4 EFO_0005669 NA FALSE MONDO:0013792
#> 5 EFO_0005669 NA FALSE MedDRA:10022754
#> 6 EFO_0005669 NA FALSE OMIM:614519
#> 7 EFO_0005669 NA FALSE SCTID:274100004
#> 8 HP_0002140 NA FALSE SNOMEDCT_US:422504002
#> 9 HP_0002140 NA FALSE UMLS:C0948008
#> 10 EFO_0010555 NA FALSE PMID:31554410
#> # ℹ 13 more rows
Subtraits (child traits)
By default, subtraits (child traits), are not retrieved by
get_traits()
. If you want to get all matching traits and
those that are child traits thereof, then indicate with the parameter
include_children
set to TRUE
. Here is an
example with "breast cancer"
:
get_traits(trait_term = 'breast cancer', include_children = TRUE)
#> An object of class "traits"
#> Slot "traits":
#> # A tibble: 9 × 6
#> efo_id parent_efo_id is_child trait description url
#> <chr> <chr> <lgl> <chr> <chr> <chr>
#> 1 MONDO_0007254 NA FALSE breast cancer A primary … http…
#> 2 MONDO_0021115 MONDO_0007254 TRUE luminal B breast carci… A biologic… http…
#> 3 MONDO_0021116 MONDO_0007254 TRUE luminal A breast carci… A biologic… http…
#> 4 EFO_1000649 MONDO_0007254 TRUE estrogen-receptor posi… A subtype … http…
#> 5 EFO_1000650 MONDO_0007254 TRUE estrogen-receptor nega… A subtype … http…
#> 6 EFO_1000294 MONDO_0007254 TRUE HER2 Positive Breast C… A biologic… http…
#> 7 EFO_0005537 MONDO_0007254 TRUE triple-negative breast… An invasiv… http…
#> 8 EFO_0000305 MONDO_0007254 TRUE breast carcinoma A carcinom… http…
#> 9 EFO_0009780 MONDO_0007254 TRUE HER2 negative breast c… A biologic… http…
#>
#> Slot "pgs_ids":
#> # A tibble: 118 × 4
#> efo_id parent_efo_id is_child pgs_id
#> <chr> <chr> <lgl> <chr>
#> 1 MONDO_0021115 MONDO_0007254 TRUE PGS000214
#> 2 MONDO_0021116 MONDO_0007254 TRUE PGS000212
#> 3 EFO_1000649 MONDO_0007254 TRUE PGS000002
#> 4 EFO_1000649 MONDO_0007254 TRUE PGS000005
#> 5 EFO_1000649 MONDO_0007254 TRUE PGS000008
#> 6 EFO_1000649 MONDO_0007254 TRUE PGS000046
#> 7 EFO_1000649 MONDO_0007254 TRUE PGS000347
#> 8 EFO_1000649 MONDO_0007254 TRUE PGS000774
#> 9 EFO_1000650 MONDO_0007254 TRUE PGS000003
#> 10 EFO_1000650 MONDO_0007254 TRUE PGS000006
#> # ℹ 108 more rows
#>
#> Slot "child_pgs_ids":
#> # A tibble: 137 × 4
#> efo_id parent_efo_id is_child child_pgs_id
#> <chr> <chr> <lgl> <chr>
#> 1 MONDO_0007254 NA FALSE PGS000001
#> 2 MONDO_0007254 NA FALSE PGS000002
#> 3 MONDO_0007254 NA FALSE PGS000003
#> 4 MONDO_0007254 NA FALSE PGS000004
#> 5 MONDO_0007254 NA FALSE PGS000005
#> 6 MONDO_0007254 NA FALSE PGS000006
#> 7 MONDO_0007254 NA FALSE PGS000007
#> 8 MONDO_0007254 NA FALSE PGS000008
#> 9 MONDO_0007254 NA FALSE PGS000009
#> 10 MONDO_0007254 NA FALSE PGS000015
#> # ℹ 127 more rows
#>
#> Slot "trait_categories":
#> # A tibble: 9 × 4
#> efo_id parent_efo_id is_child trait_categories
#> <chr> <chr> <lgl> <chr>
#> 1 MONDO_0007254 NA FALSE Cancer
#> 2 MONDO_0021115 MONDO_0007254 TRUE Cancer
#> 3 MONDO_0021116 MONDO_0007254 TRUE Cancer
#> 4 EFO_1000649 MONDO_0007254 TRUE Cancer
#> 5 EFO_1000650 MONDO_0007254 TRUE Cancer
#> 6 EFO_1000294 MONDO_0007254 TRUE Cancer
#> 7 EFO_0005537 MONDO_0007254 TRUE Cancer
#> 8 EFO_0000305 MONDO_0007254 TRUE Cancer
#> 9 EFO_0009780 MONDO_0007254 TRUE Cancer
#>
#> Slot "trait_synonyms":
#> # A tibble: 40 × 4
#> efo_id parent_efo_id is_child trait_synonyms
#> <chr> <chr> <lgl> <chr>
#> 1 MONDO_0007254 NA FALSE BC
#> 2 MONDO_0007254 NA FALSE breast cancer
#> 3 MONDO_0007254 NA FALSE cancer of breast
#> 4 MONDO_0007254 NA FALSE malignant breast neoplasm
#> 5 MONDO_0007254 NA FALSE malignant breast tumor
#> 6 MONDO_0007254 NA FALSE malignant neoplasm of breast
#> 7 MONDO_0007254 NA FALSE malignant neoplasm of the breast
#> 8 MONDO_0007254 NA FALSE malignant tumor of breast
#> 9 MONDO_0007254 NA FALSE malignant tumor of the breast
#> 10 MONDO_0007254 NA FALSE mammary cancer
#> # ℹ 30 more rows
#>
#> Slot "trait_mapped_terms":
#> # A tibble: 44 × 4
#> efo_id parent_efo_id is_child trait_mapped_terms
#> <chr> <chr> <lgl> <chr>
#> 1 MONDO_0007254 NA FALSE DOID:1612
#> 2 MONDO_0007254 NA FALSE ICD10CM:C50
#> 3 MONDO_0007254 NA FALSE ICD9:174.8
#> 4 MONDO_0007254 NA FALSE NCIT:C9335
#> 5 MONDO_0007254 NA FALSE OMIM:600048
#> 6 MONDO_0007254 NA FALSE OMIM:605365
#> 7 MONDO_0007254 NA FALSE SCTID:254837009
#> 8 MONDO_0021115 MONDO_0007254 TRUE NCIT:C53555
#> 9 MONDO_0021115 MONDO_0007254 TRUE UMLS:C3642346
#> 10 MONDO_0021116 MONDO_0007254 TRUE NCIT:C53554
#> # ℹ 34 more rows
The column is_child
indicates whether that trait is
being retrieved because it is a direct result of the query or not.
is_child
is TRUE
when the trait is returned
because it is a child trait of a matching trait, and FALSE
if a direct result of the query.
In the case of child traits, the column parent_efo_id
indicates the EFO trait identifier of the parent trait, i.e. the direct
matching trait, or NA
otherwise.
Getting all traits
To retrieve all traits simply leave the parameters
efo_id
and trait_term
as NULL
(default):