nrows <- 200; ncols <- 21
counts <- matrix(runif(nrows * ncols, 0, 1), nrows)
rowRanges <- GenomicRanges::GRanges(rep(c("chr1", "chr2"), c(50, 150)),
IRanges::IRanges(floor(runif(200, 1e5, 1e6)), width=100),
strand=sample(c("+", "-"), 200, TRUE),
feature_id=sprintf("ID%03d", 1:200))
colData <- S4Vectors::DataFrame(Treatment=rep(c("ChIP", "Input","Other"), 7),
row.names=LETTERS[1:21],
group=rep(c("group1","group2","group3"),c(7,7,7)),
subgroup=rep(c("subgroup1","subgroup2","subgroup3"),7))
data <- SummarizedExperiment::SummarizedExperiment(
assays=S4Vectors::SimpleList(counts=counts),
rowRanges=rowRanges,
colData=colData)
TCGAvisualize_meanMethylation(data,groupCol = "group")
# change lower/upper y-axis limit
TCGAvisualize_meanMethylation(data,groupCol = "group", y.limits = c(0,1))
# change lower y-axis limit
TCGAvisualize_meanMethylation(data,groupCol = "group", y.limits = 0)
TCGAvisualize_meanMethylation(data,groupCol = "group", subgroupCol="subgroup")
TCGAvisualize_meanMethylation(data,groupCol = "group")
TCGAvisualize_meanMethylation(data,groupCol = "group",sort="mean.desc",filename="meandesc.pdf")
TCGAvisualize_meanMethylation(data,groupCol = "group",sort="mean.asc",filename="meanasc.pdf")
TCGAvisualize_meanMethylation(data,groupCol = "group",sort="median.asc",filename="medianasc.pdf")
TCGAvisualize_meanMethylation(data,groupCol = "group",sort="median.desc",filename="mediandesc.pdf")
if (!(is.null(dev.list()["RStudioGD"]))){dev.off()}
Run the code above in your browser using DataLab