Creates a Manhattan-style genome-wide scatter plot of DMR scores. DMRs are colored by their dominant genomic region class inferred from DMR annotations.
Usage
plotDMRsManhattan(
dmrs,
region = NULL,
genome = "hg38",
promoter_col = "in_promoter_of",
gene_body_col = "in_gene_body_of",
point_size = 1.1,
point_alpha = 0.75,
block_col = "block_id",
show_blocks = TRUE,
block_alpha = 0.12,
block_linewidth = 0.25,
output_file = NULL,
width = 12,
height = 6
)Arguments
- dmrs
GRanges object or data frame. DMR results from buildDMRs.
- region
Optional plotting scope. Can be NULL for full-chromosome plotting, a GRanges, a string in the form
"chr:start-end", or a data.frame/list withchr,start, andend.- genome
Character. Genome version passed to
.convertToGRanges(default:"hg38").- promoter_col
Character. Metadata column indicating promoter overlap (default:
"in_promoter_of").- gene_body_col
Character. Metadata column indicating gene-body overlap (default:
"in_gene_body_of").- point_size
Numeric. Point size (default:
1.1).- point_alpha
Numeric. Point alpha in
[0, 1](default:0.75).- block_col
Character. Metadata column containing block IDs (default:
"block_id").- show_blocks
Logical. If TRUE, draw translucent rectangles for identified blocks (default:
TRUE).- block_alpha
Numeric. Alpha for block rectangles in
[0, 1](default:0.12).- block_linewidth
Numeric. Line width for block rectangle borders (default:
0.25).- output_file
Character or NULL. If non-NULL, path to save the plot as a PDF (default:
NULL).- width
Numeric. Width of the output PDF in inches (default:
12).- height
Numeric. Height of the output PDF in inches (default:
6).
Examples
dmrs <- data.frame(
chr = c("chr1", "chr1", "chr2"),
start = c(100, 200, 100),
end = c(150, 250, 150),
score = c(0.6, 0.8, 0.7)
)
p <- plotDMRsManhattan(dmrs)