Description Usage Arguments Value Author(s) See Also Examples
This function plots the low resolution profiles for the bisulfite sequencing data.
1 2 3 |
methylationProfiles |
a |
autoscale |
a |
labels |
a |
title |
the plot title. |
col |
a |
pch |
the R symbols used to plot the data. |
lty |
the line types used to plot the data. |
Invisibly returns NULL
Nicolae Radu Zabet
plotMethylationProfileFromData
,
computeMethylationProfile
and methylationDataList
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | # load the methylation data
data(methylationDataList)
# the region where to compute the profile
region <- GRanges(seqnames = Rle("Chr3"), ranges = IRanges(1,1E6))
# compute low resolution profile in 20 Kb windows
lowResProfileWTCG <- computeMethylationProfile(methylationDataList[["WT"]],
region, windowSize = 20000, context = "CG")
lowResProfilsCG <- GRangesList("WT" = lowResProfileWTCG)
#plot the low resolution profile
par(mar=c(4, 4, 3, 1)+0.1)
par(mfrow=c(1,1))
plotMethylationProfile(lowResProfilsCG, autoscale = FALSE,
title="CG methylation on Chromosome 3",
col=c("#D55E00","#E69F00"), pch = c(1,0),
lty = c(4,1))
## Not run:
# compute low resolution profile in 10 Kb windows in CG context
lowResProfileWTCG <- computeMethylationProfile(methylationDataList[["WT"]],
region, windowSize = 10000, context = "CG")
lowResProfileMet13CG <- computeMethylationProfile(
methylationDataList[["met1-3"]], region,
windowSize = 10000, context = "CG")
lowResProfileCG <- GRangesList("WT" = lowResProfileWTCG,
"met1-3" = lowResProfileMet13CG)
# compute low resolution profile in 10 Kb windows in CHG context
lowResProfileWTCHG <- computeMethylationProfile(methylationDataList[["WT"]],
region, windowSize = 10000, context = "CHG")
lowResProfileMet13CHG <- computeMethylationProfile(
methylationDataList[["met1-3"]], region,
windowSize = 10000, context = "CHG")
lowResProfileCHG <- GRangesList("WT" = lowResProfileWTCHG,
"met1-3" = lowResProfileMet13CHG)
# plot the low resolution profile
par(mar=c(4, 4, 3, 1)+0.1)
par(mfrow=c(2,1))
plotMethylationProfile(lowResProfileCG, autoscale = FALSE,
labels = LETTERS[1],
title="CG methylation on Chromosome 3",
col=c("#D55E00","#E69F00"), pch = c(1,0),
lty = c(4,1))
plotMethylationProfile(lowResProfileCHG, autoscale = FALSE,
labels = LETTERS[2],
title="CHG methylation on Chromosome 3",
col=c("#0072B2", "#56B4E9"), pch = c(16,2),
lty = c(3,2))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.