peaksToBed

Share:

Description

A convenient way to explore output of the predictions made on the ChIP peaks is to visualize them in the UCSC genome browser. The peaksToBed function returns a file in BED format, which can be uploaded directly to the genome browser. To improve the visual perception, peaks are color-coded by the predicted strand.

Usage

1
2
3
4
5
6
peaksToBed(object, file, strand.pred.color = c("blue", "red", "green4",
  "black"), gene.associated.peaks = TRUE)

## S4 method for signature 'ChipDataSet'
peaksToBed(object, file, strand.pred.color = c("blue",
  "red", "green4", "black"), gene.associated.peaks = TRUE)

Arguments

object

A ChipDataSet object.

file

Character. A file name.

strand.pred.color

Character. A vector of length four, specifying colors of the predicted peak strand. The order of colors corresponds to 1) plus strand, 2) minus strand, 3) bideractional, 4) strand not determined. Default: c("blue", "red", "green4", "black").

gene.associated.peaks

Logical. Whether to return gene associated peaks (based on the prediction) only. Default: TRUE

Value

A file in the BED format.

Author(s)

Armen R. Karapetyan

See Also

constructCDS predictTssOverlap predictStrand UCSC genome browser BED

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
### Load ChipDataSet object
data(cds)

### Load TranscriptionDataSet object
data(tds)

### Classify peaks on gene associated and background
predictTssOverlap(object = cds, feature = "pileup", p = 0.75)

### Predict peak 'strandedness'
predictStrand(cdsObj = cds, tdsObj = tds, coverage.cutoff = 5,
quant.cutoff = 0.1, win.size = 2500)

# peaksToBed(object = cds, file = "peaks.bed", gene.associated.peaks = TRUE)