View source: R/filter_mapped.R
filter_outliers | R Documentation |
After mapping counts data to segments, this function can be used to determine quantiles of mapped data, and identify outliers in each segment and modality.
An outlier is an entry for a cell/segment pair; with this function we compute how often a certain cell is marked as an outlier. Then the function removes cells that are flagged as containing outliers more then a certain input cutoff. This helps picking up which cells are often showing counts that seem deviating from the main signal in the data. In case of multiome data, cells flagged as outliers in one modality are also removed from the other modality.
The function requires and returns an (R)CONGAS+ object.
filter_outliers(
x,
frequency_cutoff = 0.2 * stat(x)$nsegments,
lower_quantile = 0.03,
upper_quantile = 0.97
)
x |
An |
frequency_cutoff |
The cutoff to determine if a cell should be removed or not from the data because it has too many outliers. By default, this cut is 20% of the input number of segments. |
lower_quantile |
The lower quantile, default 3%. |
upper_quantile |
The upper quantile, default 97%. |
The object x
where outlier cells have been identified and
removed.
data('example_object')
# Default
print(example_object)
example_object %>%
filter_outliers() %>%
print()
example_object %>%
filter_outliers(, action = 'remove') %>%
print()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.