Either a data frame, a BED file, a .broadPeak file, or a .narrowPeak file. The data frame should have at least 3 columns: chrom, start, and end. Chrom should follow UCSC convention, e.g. "chrX". The file should be tab-delimited.
locusdef
A string denoting the locus definition to be used. A locus definition controls how peaks are assigned to genes. See supported_locusdefs for a list of supported definitions.
genome
A string indicating the genome upon which the peaks file is based. Supported genomes are listed by the supported_genomes function.
use_mappability
If true, each gene's locus length is corrected for by mappability.
read_length
If using mappability (see above), the read length should match the length of reads used in the original experiment.
legend
If true, a legend will be drawn on the plot.
xlim
Set the x-axis limit. NULL means select x-lim automatically.
Details
The x-axis is the log10 of the gene locus length (defined by the locus definition). The y-axis is the proportion of the gene locus covered by a peak. Each plotted black dot is the mean (over both values) of 25 genes (ordered by log10 of the locus length).
library(chipenrich.data)
library(chipenrich)
# Create histogram of distance from peaks to nearest TSS.
data(peaks_E2F4)
plot_gene_coverage(peaks_E2F4)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(chipenrich)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/chipenrich/plot_gene_coverage.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plot_gene_coverage
> ### Title: Plot gene locus length vs. gene coverage by a peak
> ### Aliases: plot_gene_coverage
>
> ### ** Examples
>
> library(chipenrich.data)
> library(chipenrich)
>
> # Create histogram of distance from peaks to nearest TSS.
> data(peaks_E2F4)
> plot_gene_coverage(peaks_E2F4)
>
>
>
>
>
> dev.off()
null device
1
>