Construct full paths to a group of raw input files
For a group of samples this function creates the list of paths to the raw
input files which can then be used in loadCoverage. The raw input
files are either BAM files or BigWig files.
rawFiles(datadir = NULL, sampledirs = NULL, samplepatt = NULL,
fileterm = "accepted_hits.bam")
The main directory where each of the
sampledirs is a
A character vector with the names of the sample
NULL it is then assumed that
sampledirs specifies the full path to each sample.
If specified and
sampledirs is set to
then the directories matching this pattern in
datadir (set to
. if it's set to
NULL) are used as the sample directories.
Name of the BAM or BigWig file used in each sample. By
default it is set to
accepted_hits.bam since that is the automatic
name generated when aligning with TopHat. If
NULL it is then ignored
when reading the rawfiles. This can be useful if all the raw files are
stored in a single directory.
This function can also be used to identify a set of BigWig files.
A vector with the full paths to the raw files and sample names
stored as the vector names.
## Get list of BAM files included in derfinder
datadir <- system.file('extdata', 'genomeData', package='derfinder')
files <- rawFiles(datadir=datadir, samplepatt='*accepted_hits.bam$',