Skip to contents

Filter complete views based on their number of profiled samples

Usage

filt_views_bysamples(pb_dat_list, nsamples)

Arguments

pb_dat_list

List of SummarizedExperiment generated from MOFAcellulaR::filt_profiles()

nsamples

Numeric, minimum number of samples per view.

Value

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

Details

This function allows the user to control the number of minimum samples per view

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_views_bysamples(pb_dat_list = ct_list,
                              nsamples = 2)