View source: R/Get_and_Filter_Regions.R
plotSDstats | R Documentation |
plotSDstats()
takes a set of regions from getRegions()
, generates
heatmaps of methylation standard deviation against region features, and saves
it as a pdf. Compared features include number of CpGs, minimum coverage, mean
coverage, and mean methylation.
plotSDstats(
regions,
maxQuantile = 1,
bins = 30,
nBreaks = 4,
legend.position = c(1.09, 0.9),
save = TRUE,
file = "SD_Plots.pdf",
width = 8.5,
height = 8.5,
verbose = TRUE
)
regions |
A |
maxQuantile |
A |
bins |
A |
nBreaks |
A |
legend.position |
A |
save |
A |
file |
A |
width |
A |
height |
A |
verbose |
A |
It's recommended examine these plots before and after filtering to ensure
removal of regions with high variability due to insufficient data. Plots are
heatmaps of 2D bin counts, with the color indicating the number of regions in
that bin on the log10 scale. 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.
plotRegionStats()
, 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.