Skip to contents

Excludes samples from views with a coverage lower than the one stated

Usage

filt_samples_bycov(pb_dat_list, prop_coverage = 0.9)

Arguments

pb_dat_list

List of SummarizedExperiment generated from MOFAcellulaR::filt_profiles()

prop_coverage

Numeric, minimum proportion of coverage of features (different from 0).

Value

A named list of SummarizedExperiments per cell type provided with filtered pseudobulk profiles

Details

This function allows the user to exclude samples that have a limited number of features that could create potential outliers

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 <- filt_views_bygenes(pb_dat_list = ct_list,
                              ngenes = 15)

ct_list <- filt_samples_bycov(pb_dat_list = ct_list,
                              prop_coverage = 0.9)