Masks too high or too low coverage

mask_methrix(m, low_count = NULL, high_quantile = 0.99, n_cores = 1)

Arguments

m

methrix object

low_count

The minimal coverage allowed. Everything below, will get masked. Default = NULL, nothing gets masked.

high_quantile

The quantile limit of coverage. Quantiles are calculated for each sample and everything that belongs to a higher quantile than the defined will be masked. Default = 0.99.

n_cores

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

Value

An object of class methrix

Details

Takes methrix object and masks sites with too high or too low coverage by putting NA for coverage and beta value. The sites will remain in the object.

Examples

data('methrix_data') mask_methrix(m = methrix_data, low_count = 5, high_quantile = 0.99 )
#> -Masking coverage lower than 5
#> -Masked 371 CpGs due to too low coverage in sample C1.
#> -Masked 335 CpGs due to too low coverage in sample C2.
#> -Masked 349 CpGs due to too low coverage in sample N1.
#> -Masked 324 CpGs due to too low coverage in sample N2.
#> #> #> -Masking coverage higher than 99 percentile
#> -Masked 1 CpGs due to too low coverage in sample C1.
#> -Masked 2 CpGs due to too low coverage in sample C2.
#> -Masked 2 CpGs due to too low coverage in sample N1.
#> -Masked 2 CpGs due to too low coverage in sample N2.
#> -Finished in: 0.051s elapsed (0.050s cpu)
#> An object of class methrix #> n_CpGs: 743 #> n_samples: 4 #> is_h5: FALSE #> Reference: hg19