Extract phenotype data from an object that carries it. For a
QtlDataset, the user can optionally select specific contexts,
traits, or a region (see method documentation for the per-class selection
arguments).
Arguments
- x
The object to extract from.
- ...
Class-specific selection arguments (e.g.,
contexts,traitId,region).- contexts
Character vector. Context(s) whose data to extract.
- traitId
Character or
NULL. Molecular trait / feature identifier to select;NULLmatches all traits in the dataset.- region
Character (length 1,
"chr:start-end") orNULL. Restrict variants to this region;NULLuses the full cis window / all regions.- naAction
Character. How to handle missing phenotype values: one of
"keep","drop", or"impute".- outlierAction
Character. How to handle phenotype outliers: one of
"keep"or"drop".- outlierPvalThreshold
Numeric. Two-sided p-value threshold for flagging phenotype outliers. Default
1e-3.
Examples
data(qtlDatasetExample)
getPhenotypes(qtlDatasetExample, contexts = "brain")
#> class: RangedSummarizedExperiment
#> dim: 1 165
#> metadata(0):
#> assays(1): expression
#> rownames(1): ENSG_example
#> rowData names(0):
#> colnames(165): NA06989 NA11891 ... NA10854 NA12865
#> colData names(2): sex age