geom_gene | R Documentation |
Add Gene Annotation to Coverage Plot.
geom_gene( gtf.gr, overlap.gene.gap = 0.1, gene.size = 1, utr.size = 2, exon.size = 4, arrow.size = 1, color.by = "strand", fill.color = c(`-` = "darkblue", `+` = "darkgreen"), show.utr = TRUE, arrow.gap = NULL, arrow.num = 50, arrow.length = 0.06, label.size = 3, label.vjust = 2, plot.space = 0.1, plot.height = 0.2 )
gtf.gr |
Granges object of GTF, created with |
overlap.gene.gap |
The gap between gene groups. Default: 0.1. |
gene.size |
The line size of gene. Default: 1. |
utr.size |
The line size of UTR. Default: 2. |
exon.size |
The line size of exon. Default: 4. |
arrow.size |
The line size of arrow. Default: 1. |
color.by |
Color the line by. Default: strand. |
fill.color |
Color used for |
show.utr |
Logical value, whether to show UTR. Default: TRUE. |
arrow.gap |
The gap distance between arrow. Default: NULL. |
arrow.num |
Total arrow num of whole region. Default: 50. |
arrow.length |
The length of arrow. Default: 0.06. |
label.size |
The size of gene label. Default: 3. |
label.vjust |
The vjust of gene label. Default: 2. |
plot.space |
Top and bottom margin. Default: 0.1. |
plot.height |
The relative height of gene annotation to coverage plot. Default: 0.2. |
Plot.
library(ggcoverage) library(utils) library(rtracklayer) meta.file <- system.file("extdata", "RNA-seq", "meta_info.csv", package = "ggcoverage") sample.meta <- utils::read.csv(meta.file) # track folder track.folder <- system.file("extdata", "RNA-seq", package = "ggcoverage") # load bigwig file track.df <- LoadTrackFile( track.folder = track.folder, format = "bw", meta.info = sample.meta ) gtf.file <- system.file("extdata", "used_hg19.gtf", package = "ggcoverage") gtf.gr <- rtracklayer::import.gff(con = gtf.file, format = "gtf") basic.coverage <- ggcoverage(data = track.df, color = "auto", range.position = "out") basic.coverage + geom_gene(gtf.gr = gtf.gr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.