Description Usage Arguments Value Examples
View source: R/ConsensusPeaks.R
ConsensusPeaks: A wrapper for peak merging functions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ConsensusPeaks(
GENES = "all",
PEAKS,
RNA.OR.DNA = c("rna", "dna"),
METHOD = c("dpc", "hmm"),
GTF = NULL,
DP.RESOLUTION = 50,
DP.ITERATIONS = 1000,
DP.WEIGHT.THRESHOLD = 0.2,
DP.N.SD = 1,
DP.ALPHA.PRIORS = c(1, 2),
DP.SEED = 123,
PLOT.MERGED.PEAKS = F,
OUTPUT.TAG = "",
OUTPUTDIR = ".",
WRITE.OUTPUT = T,
DIAGNOSTIC = F,
FIT.MIXTURE = T,
ANNOTATION = NULL
)
|
GENES |
A character vector of genes to be tested |
PEAKS |
A data frame containing the following columns, and potentially extras, usually found in a BED12 file, base 0 system
|
RNA.OR.DNA |
One of 'rna' or 'dna' indicating whether peaks are identified on the transcriptome or genome |
METHOD |
One 'dpc', 'union', 'corces'
|
GTF |
The path to a GTF file, character string. |
DP.RESOLUTION |
If the METHOD is 'dpc', specify the resolution of the provided PEAKS data.frame. This usually corresponds to the bin width chosen when the peaks are called, a positive integer. |
DP.ITERATIONS |
If the METHOD is 'dpc', specify the number of iterations used to fit the GMM, a positive integer. |
DP.WEIGHT.THRESHOLD |
If the METHOD is 'dpc', specify the minimum weight used to threshold the Gaussians. This value is required to be numeric and between 0 and 1. |
DP.N.SD |
If the METHOD is 'dpc', specify the standard deviation of the Gaussians required to identify peak boundaries, numeric value, above 0. |
DP.ALPHA.PRIORS |
If the METHOD is 'dpc', specify the priors (alpha, beta) for the Gamma distribution from which the weight concentration prior is drawn, numeric vector of length 2 |
DP.SEED |
A seed for reproducibility, integer above 0. |
PLOT.MERGED.PEAKS |
Either a logical value (TRUE or FALSE) indicating all or none of the merged peaks should be plotted. Otherwise, a character vector of genes whose merged peaks should be plotted. |
OUTPUT.TAG |
A character string added to the names of any output files. |
OUTPUTDIR |
Output directory. If the directory does not exist, ConsensusPeaks will attempt to create the directory. |
WRITE.OUTPUT |
A logical value indicating whether the output table should be written. |
ANNOTATION |
A data frame with the same columns as 'PEAKS' indicating the coordinates of the merged peaks in genomic coordinates. If the method is 'dpc', additional columns with the sample names of the samples will indicate the merged p-value using Fisher's Method.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | data.path = system.file("extdata", package = "ConsensusPeaks")
gtf = paste0(data.path, "/test.gtf")
peaks.file = paste0(data.path, "/peaks.bed")
peaks = read.table(peaks.file, header = F, sep = '\t', stringsAsFactors = F)
colnames(peaks) = c("chr", "start", "end", "name", "score", "strand", "thickStart", "thickEnd", "itemRGB", "blockCount", "blockSizes", "blockStarts", "sample")
results = ConsensusPeaks(
GENES = c("ENSGXX", "ENSGYY"),
PEAKS = peaks,
RNA.OR.DNA = "rna",
METHOD = "dpc",
GTF = gtf,
DP.RESOLUTION = 10,
DP.ITERATIONS = 1000,
DP.WEIGHT.THRESHOLD = 0.1,
DP.N.SD = 1.5,
DP.ALPHA.PRIORS = c(0.5,5),
DP.SEED = 123,
PLOT.MERGED.PEAKS = F,
OUTPUT.TAG = "TEST",
OUTPUTDIR = ".",
WRITE.OUTPUT = F)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.