heatmapGene {ELMER} | R Documentation

## Heatmap for correlation between probes DNA methylation and a single gene expression.

### Description

This heatmap will sort samples by their gene expression and show the DNA methylation levels of the paired probes to that gene. If no pairs are given, nearest probes will be selected. To use this function you MAE object (input data) will need all probes and not only the distal ones. This plot can be used to evaluate promoter, and intro, exons regions and closer distal probes of a gene to verify if their DNA methylation level is affecting the gene expression

### Usage

    heatmapGene(data, group.col, group1, group2, pairs, GeneSymbol,
      scatter.plot = FALSE, annotation.col = NULL, met.metadata = NULL,
      exp.metadata = NULL, dir.out = ".", width = 10, height = 7,
      filename = NULL)

### Arguments

`data` | A MultiAssayExperiment with a DNA methylation SummarizedExperiment (all probes) and a gene Expression SummarizedExperiment.
`group.col` | A column from the sample matrix from the MultiAssayExperiment object. Accessed with colData(mae)
`group1` | A group from group.col. ELMER will run group1 vs group2. That means, if direction is hyper, get probes hypermethylated in group 1 compared to group 2.
`group2` | A group from group.col. ELMER will run group1 vs group2. That means, if direction is hyper, get probes hypermethylated in group 1 compared to group 2.
`pairs` | List of probe and pair genes
`GeneSymbol` | Gene Symbol
`scatter.plot` | Plot scatter plots
`annotation.col` | A vector of columns from the sample matrix from the MultiAssayExperiment object. Accessed with colData(mae) to be added as annotation to the heatmap
`met.metadata` | A vector of metdatada columns available in the DNA methylation GRanges to should be added to the heatmap.
`exp.metadata` | A vector of metdatada columns available in the Gene expression GRanges to should be added to the heatmap.
`dir.out` | Where to save the plots
`width` | Figure width
`height` | Figure height
`filename` | File names (.pdf) to save the file (i.e. "plot.pdf"). If NULL return plot.

### Value

A heatmap

### Author(s)

Tiago Chedraoui Silva (tiagochst at gmail.com)

### Examples

    ## Not run:
      data <- ELMER:::getdata("elmer.data.example")
      group.col <- "subtype_Expression.Subtype"
      group1 <- "classical"
      group2 <- "secretory"
      pairs <- data.frame(Probe = c("cg15924102","cg19403323", "cg22396959"),
                          GeneID = c("ENSG00000196878", "ENSG00000009790", "ENSG00000009790" ),
                          Symbol = c("TRAF3IP3","LAMB3","LAMB3"),
                          Distance = c(6017,168499,0),
                          Raw.p = c(0.001,0.00001,0.001),
                          Pe = c(0.001,0.00001,0.001))
     heatmapGene(data = data,
                 group.col = group.col,
                 group1 = group1,
                 group2 = group2,
                 pairs = pairs,
                 GeneSymbol = "LAMB3",
                 annotation.col = c("ethnicity","vital_status"),
                 filename = "heatmap.pdf")
     \dontrun{
         heatmapGene(data = data,
                     group.col = group.col,
                     group1 = group1,
                     group2 = group2,
                     GeneSymbol = "LAMB3",
                     annotation.col = c("ethnicity","vital_status"),
                     filename = "heatmap_closer_probes.pdf")
     }

    ## End(Not run)

[Package ELMER version 2.4.4 Index]