| filterCpGs | R Documentation |
filterCpGs() subsets a BSseq object to include
only those CpGs meeting cov and perSample cutoffs and then saves
it as a .rds file.
filterCpGs(
bs,
cov = 2,
perSample = 0.75,
save = TRUE,
file = "Filtered_BSseq.rds",
verbose = TRUE
)
bs |
A BSseq object. |
cov |
A |
perSample |
A |
save |
A |
file |
A |
verbose |
A |
filterCpGs() is designed to be used after cov and
perSample arguments have been optimized by getCpGtotals() and
plotCpGtotals().
A BSseq object.
getCpGs() to generate the BSseq object
from individual Bismark CpG reports.
getCpGtotals() and plotCpGtotals() for help with deciding
coverage cutoffs.
getRegions() to generate a set of regions based on the CpGs.
## Not run:
# Read Bismark CpG Reports
colData <- read.xlsx("sample_info.xlsx", rowNames = TRUE)
bs <- getCpGs(colData, file = "Unfiltered_BSseq.rds")
# Examine CpG Totals at Different Cutoffs
CpGtotals <- getCpGtotals(bs, file = "CpG_Totals.txt")
plotCpGtotals(CpGtotals, file = "CpG_Totals.pdf")
# Filter BSseq Object
bs <- filterCpGs(bs, cov = 2, perSample = 0.75, file = "Filtered_BSseq.rds")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.