[R] Plotting DMRs (Differentially Methylated Regions) using Gviz package in R
pooja sinha
pj@|nh@07 @end|ng |rom gm@||@com
Fri Feb 7 18:56:59 CET 2020
Hi All,
I have a file list consisting of Chromosome, Start , End & Methylation
Difference in the following format in excel:
Chrom Start End Meth. Diff
chr1 38565900 38566000 -0.20276818
chr1 38870400 38870500 -0.342342342
chr1 39469400 39469500 -0.250260552
chr1 52013600 52013700 -0.37797619
chr1 52751700 52751800 0.257575758
chr1 75505100 75505200 -0.262847308
I need help in plotting the DMRs using Gviz package in R. I tried a code
below but it doesn't turn out correct.
library(GenomicRanges)
library(grid)
library(Gviz)
library(rtracklayer)
library(BSgenome)
library(readxl)
library(BSgenome.Rnorvegicus.UCSC.rn6)
genome <- getBSgenome("BSgenome.Rnorvegicus.UCSC.rn6")
genome
data1 <- read_excel("DMRs_plots.xlsx")
head(data1)
data1$Chrom = Chrom$chr1
track1 <- DataTrack(data = data1, from = "38565900" , to = "282250000",
chromosome = Chrom$chr1, name = "DMRs")
itrack <- IdeogramTrack(genome = genome, chromosome = chr)
plotTracks(track1, itrack)
If anyone know how to plot and correct my code including how to add
methylation difference values, then that will be of great help.
Thanks,
Puja
[[alternative HTML version deleted]]
More information about the R-help
mailing list