Description Usage Arguments Value Author(s) References Examples
View source: R/getAllPeakSequence.R
Obtain genomic sequences around the peaks leveraging the BSgenome and biomaRt package
1 2 3 4 5 6 7 | getAllPeakSequence(
myPeakList,
upstream = 200L,
downstream = upstream,
genome,
AnnotationData
)
|
myPeakList |
An object of GRanges: 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 |
GRanges object with annotation information. |
GRanges 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 seqnames holding the chromosome 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 |
Lihua Julie Zhu, Jianhong Ou
Durinck S. et al. (2005) BioMart and Bioconductor: a powerful link between biological biomarts and microarray data analysis. Bioinformatics, 21, 3439-3440.
1 2 3 4 5 6 7 | #### use Annotation data from BSgenome
peaks <- GRanges(seqnames=c("NC_008253", "NC_010468"),
IRanges(start=c(100, 500), end=c(300, 600),
names=c("peak1", "peak2")))
library(BSgenome.Ecoli.NCBI.20080805)
seq <- getAllPeakSequence(peaks, upstream=20, downstream=20, genome=Ecoli)
write2FASTA(seq, file="test.fa")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.