View source: R/Get_and_Filter_Regions.R
plotRegionStats | R Documentation |
plotRegionStats()
takes a set of regions from getRegions()
,
generates histograms of region characteristics, and saves it as a pdf.
Region-level statistics include width, number of CpGs, minimum coverage, mean
coverage, mean methylation, and methylation standard deviation.
plotRegionStats(
regions,
maxQuantile = 1,
bins = 30,
histCol = "#132B43",
lineCol = "red",
nBreaks = 4,
save = TRUE,
file = "Region_Plots.pdf",
width = 11,
height = 8.5,
verbose = TRUE
)
regions |
A |
maxQuantile |
A |
bins |
A |
histCol |
A |
lineCol |
A |
nBreaks |
A |
save |
A |
file |
A |
width |
A |
height |
A |
verbose |
A |
It's recommended to examine region characteristics before and after filtering.
The vertical line on each histogram indicates the median value for that
feature. A ggplot
object is produced and can be edited outside of this
function if desired.
A ggplot
object.
getRegions()
to generate the set of regions.
plotSDstats()
, getRegionTotals()
, and plotRegionTotals()
for more help visualizing region characteristics and setting
cutoffs for filtering.
filterRegions()
for filtering regions by minimum coverage and
methylation standard deviation.
## Not run:
# Call Regions
regions <- getRegions(bs, file = "Unfiltered_Regions.txt")
plotRegionStats(regions, maxQuantile = 0.99,
file = "Unfiltered_Region_Plots.pdf")
plotSDstats(regions, maxQuantile = 0.99,
file = "Unfiltered_SD_Plots.pdf")
# Examine Region Totals at Different Cutoffs
regionTotals <- getRegionTotals(regions, file = "Region_Totals.txt")
plotRegionTotals(regionTotals, file = "Region_Totals.pdf")
# Filter Regions
regions <- filterRegions(regions, covMin = 10, methSD = 0.05,
file = "Filtered_Regions.txt")
plotRegionStats(regions, maxQuantile = 0.99,
file = "Filtered_Region_Plots.pdf")
plotSDstats(regions, maxQuantile = 0.99,
file = "Filtered_SD_Plots.pdf")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.