Learn R Programming

easyRNASeq (version 2.8.2)

getBamFileList: Get a BamFileList from a list of filenames

Description

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

Usage

## S3 method for class 'character':
getBamFileList(filenames = character(0))

Arguments

filenames
a character vector containing fully defined filenames

Value

  • a linkS4class{BamFileList-class}{BamFileList}

See Also

linkS4class{BamFileList-class}{BamFileList} dir

Examples

Run this code
library("RnaSeqTutorial")

	## creating a BamFileList using a directory and pattern
	bfl <- getBamFileList(
                        dir(path=system.file("extdata",
					                  package="RnaSeqTutorial"),
					              pattern="[A,C,T,G]{6}\\.bam$",
  				              full.names=TRUE))

  ## using filenames
  filenames <- dir(path=
  	    			      system.file("extdata",
					          package="RnaSeqTutorial"),
					     pattern="[A,C,T,G]{6}\\.bam$",
  				     full.names=TRUE)
  bfl <- getBamFileList(filenames)
  
  ## get them recursively
  filenames <- dir(path=
        			      system.file("extdata",
					          package="RnaSeqTutorial"),
					     pattern="[A,C,T,G]{6}\\.bam$",
  				     full.names=TRUE,recursive=TRUE)
  bfl <- getBamFileList(filenames)

Run the code above in your browser using DataLab