sartorlab / methylSig

R package for DNA methylation analysis
17 stars 5 forks source link

Filter function to mark loci in samples outside of [min_count, max_count] #29

Closed rcavalcante closed 4 years ago

rcavalcante commented 4 years ago

Function call

filter_loci_by_coverage(bs, min_count = 5, max_count = 1000)

Description

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

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.