Description Usage Arguments Value Author(s) Examples
Given a GRanges object and the path of a .bam
file, it creates the corresponding pileup, containing the
read counts on each nucleotide of the peaks
of the GRanges object. Reads can be extended to a length d
, which is an estimate of the length of the sequencing fragment. See the function compute_fragments_length for details. For each peak this method creates a
vector containing these counts, i.e. the coverage function for the extended reads along the whole peak.
1 2 | ## S4 method for signature 'GRanges'
pileup_peak(object, bamf = NULL, d = NULL)
|
object |
GRanges object containing the genomic coordinates of the peaks. |
bamf |
Path to the .bam file used to compute the coverage function. The associated .bam.bai index file must also be present. |
d |
integer. Total length of the fragments. Positive and negative reads are extended in their 3' direction. Default is NULL; this value can be estimated by compute_fragments_length. |
the GRanges object
with the new metadata column counts
containing the coverage functions of the peaks.
Alice Parodi, Marco J. Morelli, Laura M. Sangalli, Piercesare Secchi, Simone Vantini
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # load the data
# GRanges object
data(GR)
# import the .bam file
bamf <- system.file("extdata", "test.bam", package="FunChIP",
mustWork=TRUE)
# extract the first 10 peaks of the GRange
# and compute the corresponding read counts
# with fragment length 160.
peaks <- pileup_peak(GR[1:10], bamf, d = 160)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.