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.
Arguments
bs a BSseq object resulting from bsseq::read.bismark or constructed manually by the user.
min_count an integer giving the minimum coverage required at a locus.
max_count an integer giving the maximum coverage allowed at a locus.
Values
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.
Tests
Test for correct placement of 0s in samples/loci having coverage < min_count or coverage > max_count.
Function call
filter_loci_by_coverage(bs, min_count = 5, max_count = 1000)
Description
Used after
bsseq::read.bismark
to mark loci in samples belowmin_count
or abovemax_count
to 0. These loci will then be removed prior to differential analysis byfilter_loci_by_group_coverage()
if there are not a sufficient number of samples with appropriate coverage.Arguments
bs
aBSseq
object resulting frombsseq::read.bismark
or constructed manually by the user.min_count
aninteger
giving the minimum coverage required at a locus.max_count
aninteger
giving the maximum coverage allowed at a locus.Values
A
BSseq
object with samples/loci in the coverage and methylation matrix set to 0 where the coverage was less thanmin_count
or greater thanmax_count
. The number of samples and loci are conserved.Tests
Test for correct placement of 0s in samples/loci having coverage <
min_count
or coverage >max_count
.