Description Usage Arguments Value See Also Examples
makes matrix of fragment counts in peaks using one or multiple bam or bed files
1 2 |
alignment_files |
filenames for bam or bed files with aligned reads |
peaks |
GRanges object with peaks |
paired |
paired end data? |
by_rg |
use RG tags in bam to separate groups? |
format |
bam or bed? default is bam |
colData |
sample annotation DataFrame |
RangedSummarizedExperiment-class
object
getSampleDepths
, getPeaks
,
filterSamples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # First we'll read in some peaks
peaks_file <- system.file("extdata", "test_bed.txt", package = "chromVAR")
test_peaks <- getPeaks(peaks_file, sort = TRUE)
# With single bam with RG tags (can also give multiple bams with RG)
test_rg <- system.file("extdata", "test_RG.bam", package = "chromVAR")
test_counts <- getCounts(test_rg, peaks = test_peaks, by_rg = TRUE,
paired = TRUE,
colData = S4Vectors::DataFrame(condition ="A"))
# Multiple bams without RG tags
test_bam1 <- system.file("extdata", "test_single1.bam", package = "chromVAR")
test_bam2 <- system.file("extdata", "test_single2.bam", package = "chromVAR")
test_bam3 <- system.file("extdata", "test_single3.bam", package = "chromVAR")
test_counts2 <- getCounts(c(test_bam1, test_bam2,test_bam3),
peaks = test_peaks, by_rg = FALSE,
paired = TRUE,
colData = S4Vectors::DataFrame(celltype =
c("A","B","C")))
# Bed file with reads (can give multiple bed files, here we will just read 1)
test_bed <- system.file("extdata", "test_reads.bed", package = "chromVAR")
test_counts3 <- getCounts(test_bed, test_peaks, by_rg = FALSE,
paired = FALSE,
format = "bed")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.