plot.gene.peaks: A plot of the peaks found for a particular gene

Description Usage Arguments Value Examples

View source: R/plot.gene.peaks.R

Description

A plot of the peaks found for a particular gene

Usage

1
2
## S3 method for class 'gene.peaks'
plot(GENE, PEAKS, GTF = NULL, OUTPUTDIR = ".", OUTPUT.TAG = "", PLOT = F)

Arguments

GENE

A 'character' gene id corresponding to the gene_id's found in the GTF files and the 'name' column in the peak files

PEAKS

A data frame containing the following columns, and potentially extras, usually found in a BED12 file, base 0 system

chr

chromosomes, character, same format as those identified in GTF file

start

starting position of the peak, integer. base 0

end

end position of the peak, integer, base 0

name

gene id, character

score

p-value associated with the peak

strand

strand of the gene, only +, -, * are accepted

blockCount

number of segments in the peak, integer

blockSizes

size of segments in the peak, BED12 notation, comma-separated

blockStarts

starting positions of segments, BED12 notation, comma-separated

sample

sample_id of samples, character

GTF

The GTF file used to generate the peaks. This is used to determine the genomic coordinates of the gene.

OUTPUTDIR

Output directory

OUTPUT.TAG

A character string indicating a tag to track the generated files

PLOT

Binary T or F indicating whether to save plot or just return plot

Value

A ggplot object of the plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data.path = system.file("extdata", package = "ConsensusPeaks")
gtf = paste0(data.path, "/test.gtf")
peaks.file = paste0(data.path, "/peaks.bed")
peaks = read.delim(peaks.file, stringsAsFactors = F)
p = plot.gene.peaks(
GENE = "ENSGXX",
PEAKS = peaks,
GTF = gtf,
OUTPUTDIR = ".",
OUTPUT.TAG = "",
PLOT = F
)

helen-zhu/ConsensusPeaks documentation built on Dec. 25, 2021, 9:39 a.m.