Plotting DMRs (Differentially Methylated Regions) using Gviz package in R

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Plotting DMRs (Differentially Methylated Regions) using Gviz package in R

pooja sinha
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]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Plotting DMRs (Differentially Methylated Regions) using Gviz package in R

Martin Morgan-4
Probably have more success asking on https://support.bioconductor.org.

Martin Morgan

On 2/7/20, 12:57 PM, "R-help on behalf of pooja sinha" <[hidden email] on behalf of [hidden email]> wrote:

    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]]
   
    ______________________________________________
    [hidden email] mailing list -- To UNSUBSCRIBE and more, see
    https://stat.ethz.ch/mailman/listinfo/r-help
    PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
    and provide commented, minimal, self-contained, reproducible code.
   
______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Plotting DMRs (Differentially Methylated Regions) using Gviz package in R

pooja sinha
Thanks, I'll check it out.

On Fri, Feb 7, 2020 at 1:08 PM Martin Morgan <[hidden email]>
wrote:

> Probably have more success asking on https://support.bioconductor.org.
>
> Martin Morgan
>
> On 2/7/20, 12:57 PM, "R-help on behalf of pooja sinha" <
> [hidden email] on behalf of [hidden email]> wrote:
>
>     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]]
>
>     ______________________________________________
>     [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>     https://stat.ethz.ch/mailman/listinfo/r-help
>     PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
>     and provide commented, minimal, self-contained, reproducible code.
>
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.