| filterBySharedRegions {BiSeq} | R Documentation |
BSraw or BSrel object to regions (or single CpGs) shared by
a fraction of samplesThis method determines the regions which are covered in a
given fraction of samples and reduces the BSraw or BSrel object to these regions.
filterBySharedRegions(object, groups, perc.samples, no.samples, minCov)
object |
A |
groups |
OPTIONAL. A factor specifying two or more groups within the given object. See Details. |
perc.samples |
A numeric vector with elements between 0 and 1 of length 1 or of the same length as levels in group. Default is 1. |
no.samples |
Alternative to |
minCov |
A numeric: If |
If argument group is given perc.samples or
no.samples are applied for all group levels.
An object of the same class as object storing methylation information
solely for regions or single CpGs covered in at least round(perc.samples*ncol(object))
samples, if perc.samples is given. Alternatively, the number of
samples can be given directly by using no.samples.
Katja Hebestreit
data(rrbs)
rrbs.reduced <- filterBySharedRegions(object = rrbs, perc.samples = 1)
# Or filter CpG sites where at least 50% of cancer and 50% of normal samples have coverage:
rrbs.reduced <- filterBySharedRegions(object=rrbs, groups = colData(rrbs)$group,
perc.samples = 0.5)