easyRNASeq-BamFileList: Get a BamFileList from a list of filenames

Description Usage Arguments Value See Also Examples

Description

A utility function to create a BamFileList-class object from a set of filenames. The filenames need to contain the file path if they are not in the working directory.

Usage

1
2
## S4 method for signature 'character,character'
getBamFileList(filenames = character(0), indexnames = character(0))

Arguments

filenames

a character vector containing fully defined BAM file filenames

indexnames

a character vector containing fully defined BAM index file filenames

Value

a BamFileList-class

See Also

BamFileList-class dir

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# tutorial data - store the data in the BiocCache
tdir <- tutorialData()

  # creating a BamFileList using a directory and pattern
  # using filenames (from the Bioc cache)
  filenames <- dir(tdir,pattern="[A,C,T,G]{6}\\.bam$",full.names=TRUE)
  indexnames <- sapply(paste0(sub(".*_","",basename(filenames)),".bai"),fetchData)
  bfl <- getBamFileList(filenames,indexnames)

  # get them recursively
  filenames <- dir(path=tdir,pattern="[A,C,T,G]{6}\\.bam$",
                   full.names=TRUE,recursive=TRUE)
  indexnames <- sapply(paste0(sub(".*_","",basename(filenames)),".bai"),fetchData)
  bfl <- getBamFileList(filenames,indexnames)

easyRNASeq documentation built on April 30, 2020, 2 a.m.