Description Usage Arguments Details Value See Also Examples
View source: R/outlier-detection.R
This function wraps mirmodels::compute_pcas()
and hence uses
rrcov::PcaGrid()
to do robust PCA analysis and detect outliers.
1 | get_cohort_outliers(cohort)
|
cohort |
A two-character string, e.g. |
Prior to PCA calculation (and outlier detection), a call to
mirmodels::linear_correct()
is made to regress away the effect of the
total number of counts on gene expression levels, with care taken to not
regress away the effect of gestational age.
There's an Easter egg. You can pass a data frame directly as the cohort
argument and then the function will use that rather than having to call
get_*_data()
to get the data. I advise get_*_data(log2 = TRUE, tot_counts = TRUE, gene_pred = ~median(.) > 0)
.
An object of class mirvie_cohort_outliers
. This is a data frame
with 5 principal components named PC1
, PC2
, . . ., PC5
. It also has
columns meta_collectionga
, mirvie_id
and outlier
which is a boolean
column where TRUE
indicates an outlier. This object has attributes
var_exp
and loadings
. Read the documentation of
mirmodels::compute_pcas()
for more on those.
autoplot.mirvie_cohort_outliers()
1 2 3 4 | if (require("mirmodels")) {
ga_outliers <- get_cohort_outliers("ga")
autoplot(ga_outliers)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.