Learn R Programming

ChIPpeakAnno (version 2.16.4)

getAllPeakSequence: Obtain genomic sequences around the peaks

Description

Obtain genomic sequences around the peaks leveraging BSgenome and biomaRt package

Usage

getAllPeakSequence(myPeakList, upstream = 200, downstream = 200, genome, AnnotationData)

Arguments

myPeakList
RangedData: See example below
upstream
upstream offset from the peak start, e.g., 200
downstream
downstream offset from the peak end, e.g., 200
genome
BSgenome object or mart object. Please refer to available.genomes in BSgenome package and useMart in bioMaRt package for details
AnnotationData
RangedData used if mart object is parsed in which can be obtained from getAnnotation with featureType="TSS". For example, data(TSS.human.NCBI36), data(TSS.mouse.NCBIM37), data(GO.rat.RGSC3.4) and data(TSS.zebrafish.Zv8). If not supplied, then annotation will be obtained from biomaRt automatically using the mart object

Value

RangedData with slot start holding the start position of the peak, slot end holding the end position of the peak, slot rownames holding the id of the peak and slot space holding the chromosome location where the peak is located. In addition, the following variables are included.
upstream
upstream offset from the peak start
downstream
downstream offset from the peak end
sequence
the sequence obtained

Details

References

Durinck S. et al. (2005) BioMart and Bioconductor: a powerful link between biological biomarts and microarray data analysis. Bioinformatics, 21, 3439-3440.

See Also

Examples

Run this code
	#### use Annotation data from BSgenome
	peaks = RangedData(IRanges(start=c(100, 500), end=c(300, 600), names=c("peak1", "peak2")), space=c("NC_008253", "NC_010468"))
	library(BSgenome.Ecoli.NCBI.20080805)
 	seq = getAllPeakSequence(peaks, upstream = 20,	downstream = 20, genome = Ecoli)
	write2FASTA(seq, file="test.fa")

Run the code above in your browser using DataLab