Description Usage Arguments Value Author(s) References See Also Examples
View source: R/TargetExperiment-pileupCounts.R
pileupCounts waits for a TargetExperiment object containing the bed file
information in order to obtain pileup counts only for the specified genomic
regions. The resulting object is a data.frame instance, in which each row 
represents one position of the specified features across the bed file. The 
first three columns called 'pos', 'seqnames' and 'which_label,' represent the
position in the seqnames (e.g. pos=10183795 and seqnames=chr3) and the 
associated feature. According to the 'pileupP' parameters set before, the 
number of next columns could change. If 'distinguish_nucleotide' was set to
TRUE, then one column per ntd will appear containing the counts obtained for
each of them. Same will occur when 'distinguish_strands' is set to TRUE. The
last column, called 'counts', contains the total counts obtained for the
corresponding position.
1 2  | pileupCounts(bed, bamFile, fastaFile, scanBamP = NULL, pileupP = NULL,
    BPPARAM = bpparam())
 | 
bed | 
 a Granges object containing the bed file information.  | 
bamFile | 
 Character indicating the alignment and index bam files full path.  | 
fastaFile | 
 Character indicating the full path to the genome reference and index files.  | 
scanBamP | 
 ScanBamParam indicating the parameters the BAM file read.  | 
pileupP | 
 PileupParam indicating the parameters for the pileup build.  | 
BPPARAM | 
 An optional BiocParallelParam instance defining the parallel back-end to be used during evaluation.  | 
data.frame object.
Gabriela A. Merino gmerino@bdmg.com.ar, Cristobal Fresno cfresno@bdmg.com.ar, Yanina Murua ymurua@leloir.org.ar, Andrea S. Llera allera@leloir.org.ar and Elmer A. Fernandez efernandez@bdmg.com.ar
Morgan M, Pages H, Obenchain V and Hayden N. Rsamtools: Binary alignment (BAM), FASTA, variant call (BCF), and tabix file import. R package version 1.20.1
1 2 3 4 5 6 7 8 9 10  | ##Obtain the pileup matrix for the first amplicon
data(ampliPanel, package="TarSeqQC")
bed<-getBedFile(ampliPanel)[1]
## Defining bam file and fasta file names and paths
bamFile<-system.file("extdata", "mybam.bam", package="TarSeqQC", mustWork=TRUE)
fastaFile<-system.file("extdata", "myfasta.fa", package="TarSeqQC",
    mustWork=TRUE)
## extracting the pileup matrix
myCounts<-pileupCounts(bed, bamFile, fastaFile)
head(myCounts)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.