getSampleDepths: getSampleDepths

Description Usage Arguments Value See Also Examples

View source: R/get_inputs.R

Description

makes vector of read depths in bam files or RG groups within bam files

Usage

1
2
getSampleDepths(alignment_files, paired = TRUE, by_rg = FALSE,
  format = c("bam", "bed"))

Arguments

alignment_files

filenames for bam or bed file(s) with aligned reads

paired

paired end data?

by_rg

use RG tags to separate groups?

format

bam or bed format? default is bam

Value

numeric vector

See Also

getCounts, filterSamples

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# 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 <- getSampleDepths(test_rg,  by_rg = TRUE, 
                          paired = TRUE)
                          

# 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 <- getSampleDepths(c(test_bam1, test_bam2,test_bam3), 
                           by_rg = FALSE, 
                           paired = TRUE) 
                           

GreenleafLab/chromVAR documentation built on Aug. 20, 2019, 11:39 a.m.