Description Usage Arguments Value Author(s) Examples
Plots an individual DMR (in context of possibly other DMRs) as found by dmrcate
.
Heatmaps are shown as well as proximal coding regions, smoothed group means and chromosome ideogram.
1 2 3 |
ranges |
A GRanges object (ostensibly created by |
dmr |
Index of |
CpGs |
Either: - A matrix of beta values for plotting, with unique Illumina probe IDs as rownames. - A GenomicRatioSet, annotated with the appropriate array and data types - A BSseq object containing per-CpG methylation and coverage counts for the samples to be plotted |
what |
Does |
arraytype |
Is |
phen.col |
Vector of colors denoting phenotypes of all samples described in
|
genome |
Reference genome for annotating DMRs. Can be one of |
... |
Extra arguments passed to |
A plot to the current device.
Aaron Statham <a.statham@garvan.org.au>, Tim J. Peters <t.peters@garvan.org.au>
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 | library(ExperimentHub)
library(limma)
eh <- ExperimentHub()
FlowSorted.Blood.EPIC <- eh[["EH1136"]]
tcell <- FlowSorted.Blood.EPIC[,colData(FlowSorted.Blood.EPIC)$CD4T==100 |
colData(FlowSorted.Blood.EPIC)$CD8T==100]
detP <- detectionP(tcell)
remove <- apply(detP, 1, function (x) any(x > 0.01))
tcell <- tcell[!remove,]
tcell <- preprocessFunnorm(tcell)
#Subset to chr2 only
tcell <- tcell[seqnames(tcell) == "chr2",]
tcellms <- getM(tcell)
tcellms.noSNPs <- rmSNPandCH(tcellms, dist=2, mafcut=0.05)
tcell$Replicate[tcell$Replicate==""] <- tcell$Sample_Name[tcell$Replicate==""]
tcellms.noSNPs <- avearrays(tcellms.noSNPs, tcell$Replicate)
tcell <- tcell[,!duplicated(tcell$Replicate)]
tcell <- tcell[rownames(tcellms.noSNPs),]
colnames(tcellms.noSNPs) <- colnames(tcell)
assays(tcell)[["M"]] <- tcellms.noSNPs
assays(tcell)[["Beta"]] <- ilogit2(tcellms.noSNPs)
type <- factor(tcell$CellType)
design <- model.matrix(~type)
myannotation <- cpg.annotate("array", tcell, arraytype = "EPIC",
analysis.type="differential", design=design, coef=2)
dmrcoutput <- dmrcate(myannotation, lambda=1000, C=2)
results.ranges <- extractRanges(dmrcoutput, genome = "hg19")
groups <- c(CD8T="magenta", CD4T="forestgreen")
cols <- groups[as.character(type)]
DMR.plot(ranges=results.ranges, dmr=1, CpGs=getBeta(tcell), what="Beta",
arraytype = "EPIC", phen.col=cols, genome="hg19")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.