Description Usage Arguments Value Examples
View source: R/filter_loci_by_coverage.R
Used after bsseq::read.bismark
to mark loci in samples below min_count
or above max_count
to 0. These loci will then be removed prior to differential analysis by filter_loci_by_group_coverage()
if there are not a sufficient number of samples with appropriate coverage.
1 | filter_loci_by_coverage(bs, min_count = 5, max_count = 500)
|
bs |
a |
min_count |
an |
max_count |
an |
A BSseq
object with samples/loci in the coverage and methylation matrix set to 0 where the coverage was less than min_count
or greater than max_count
. The number of samples and loci are conserved.
1 2 3 4 5 6 7 8 9 | bis_cov_file1 = system.file('extdata', 'bis_cov1.cov', package = 'methylSig')
bis_cov_file2 = system.file('extdata', 'bis_cov2.cov', package = 'methylSig')
test = bsseq::read.bismark(
files = c(bis_cov_file1, bis_cov_file2),
colData = data.frame(row.names = c('test1','test2')),
rmZeroCov = FALSE,
strandCollapse = FALSE
)
test = filter_loci_by_coverage(bs = test, min_count = 10, max_count = 500)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.