mask_by_sample: Masks CpGs by cell count

Description Usage Arguments Details Value Examples

View source: R/scmethrix_operations.R

Description

Masks CpGs by cell count

Usage

1
2
3
4
5
6
7
8
mask_by_sample(
  scm = NULL,
  assay = "score",
  low_threshold = NULL,
  prop_threshold = NULL,
  n_threads = 1,
  verbose = TRUE
)

Arguments

scm

scMethrix; the single cell methylation experiment

assay

string; name of an existing assay. Default = "score"

low_threshold

numeric; The minimal cell count allowed. Everything below will get masked.

prop_threshold

numeric; The minimal proportion of covered cells.

n_threads

integer; Number of parallel instances. Can only be used if scMethrix is in HDF5 format. Default = 1.

verbose

boolean; Flag for outputting function status messages. Default = TRUE

Details

Takes scMethrix object and masks sites with too high or too low coverage by putting NA for assay values. The sites will remain in the object and all assays will be affected.

low_threshold is used to mask sites with low overall cell counts. A site represented by a single sample is typically not useful. prop_threshold is used to mask sites with a low proportional count

Value

An object of class scMethrix

Examples

1
2
3
data('scMethrix_data')
mask_by_sample(scMethrix_data,low_threshold=2)
mask_by_sample(scMethrix_data,prop_threshold=0.5) 

CompEpigen/scMethrix documentation built on Nov. 6, 2021, 3:09 p.m.