mergePlusMinusPeaks: Merge peaks from plus strand and minus strand

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/mergePlusMinusPeaks.R

Description

Merge peaks from plus strand and minus strand within certain distance apart, and output merged peaks as bed format.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
mergePlusMinusPeaks(
  peaks.file,
  columns = c("name", "chromosome", "start", "end", "strand", "count", "count",
    "count", "count"),
  sep = "\t",
  header = TRUE,
  distance.threshold = 100,
  plus.strand.start.gt.minus.strand.end = TRUE,
  output.bedfile
)

Arguments

peaks.file

Specify the peak file. The peak file should contain peaks from both plus and minus strand

columns

Specify the column names in the peak file

sep

Specify column delimiter, default tab-delimited

header

Specify whether the file has a header row, default TRUE

distance.threshold

Specify the maximum gap allowed between the plus stranded and the nagative stranded peak

plus.strand.start.gt.minus.strand.end

Specify whether plus strand peak start greater than the paired negative strand peak end. Default to TRUE

output.bedfile

Specify the bed output file name

Value

output the merged peaks in bed file and a data frame of the bed format

Author(s)

Lihua Julie Zhu

References

Zhu L.J. et al. (2010) ChIPpeakAnno: a Bioconductor package to annotate ChIP-seq and ChIP-chip data. BMC Bioinformatics 2010, 11:237doi:10.1186/1471-2105-11-237

See Also

annotatePeakInBatch, findOverlappingPeaks, makeVennDiagram

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
if (interactive())
{
    data(myPeakList)
    data(TSS.human.NCBI36)
    library(matrixStats)
        peaks <- system.file("extdata", "guide-seq-peaks.txt", 
                              package = "ChIPpeakAnno")
        merged.bed <- mergePlusMinusPeaks(peaks.file = peaks, 
                                          columns=c("name", "chromosome", 
                                                    "start", "end", "strand", 
                                                    "count", "count"), 
                                          sep = "\t", header = TRUE,  
                                          distance.threshold = 100,  
                                plus.strand.start.gt.minus.strand.end = TRUE, 
                                          output.bedfile = "T2test100bp.bed")
}

ChIPpeakAnno documentation built on April 1, 2021, 6:01 p.m.