Indentify highly variable genes
filt_gex_byhvg.Rd
Identifies highly variable features from a log-normalized count matrix or filters matrices by a list of genes provided by the user.
Arguments
- pb_dat_list
List of SummarizedExperiment generated from
MOFAcellulaR::filt_profiles()
- prior_hvg
NULL by default. Alternatively, a named list with a character vector containing features to select.
- var.threshold
Numeric. Inherited from
scran::getTopHVGs()
. Minimum threshold on the metric of variation
Value
A named list of SummarizedExperiments per cell type provided with filtered normalized log transformed data in their logcounts
assay
Details
This function estimates highly variable genes per cell type using scran::getTopHVGs
. Alternatively, this function
allows the user to provide the features to be used in each cell type. If prior genes are used, for cell types
where this information is missing, highly variable genes will be calculated
Examples
inputs_dir <- base::system.file("extdata", package = "MOFAcellulaR")
load(file.path(inputs_dir, "testpbcounts.rda"))
load(file.path(inputs_dir, "testcoldata.rda"))
pb_obj <- create_init_exp(counts = testpbcounts,
coldata = testcoldata)
ct_list <- filt_profiles(pb_dat = pb_obj,
cts = c("Fib","CM"),
ncells = 5,
counts_col = "cell_counts",
ct_col = "cell_type")
ct_list <- filt_gex_byexpr(pb_dat_list = ct_list,
min.count = 5,
min.prop = 0.25)
#> Warning: All samples appear to belong to the same group.
#> Warning: All samples appear to belong to the same group.
ct_list <- tmm_trns(pb_dat_list = ct_list,
scale_factor = 1000000)
ct_list <- filt_gex_byhvg(pb_dat_list = ct_list,
prior_hvg = NULL,
var.threshold = 0)