## For brevity, only exemplary filenames are given in the following.
## Note that in reality, absolute paths should be provided.
## First some examples using specific files rather than files that
## match a pattern in a particular directory
## Load SNPhoodData library
library(SNPhoodData)
files.df = collectFiles(patternFiles = paste0(system.file("extdata", package = "SNPhoodData"),"/*.bam"))
## If you already have BAM files in objects of class \code{\linkS4class{BamFile}} or \code{\linkS4class{BamFileList}},
## you may use the following code snippet:
files = list.files(pattern = "*.bam$",system.file("extdata", package = "SNPhoodData"),full.names = TRUE)
BamFile.o = BamFile(files[1])
BamFiles.o = BamFileList(files)
files.df = collectFiles(patternFiles = path(BamFile.o))
files.df = collectFiles(patternFiles = path(BamFiles.o))
Run the code above in your browser using DataLab