expFromFiles: Construct an Experiment from file names

View source: R/methods.R

expFromFilesR Documentation

Construct an Experiment from file names

Description

This methods constructs an Experiment object from file names in a given directory.

Usage

expFromFiles(maindir = ".", pattern = ".fastq", samples = NULL,
  run = NULL, output = NULL, recursive = F)

Arguments

maindir

Character, the path to the main directory

pattern

Character or Character vector of length two. If a single character, a single-end experiment will be created otherwise the first element will be used to detected forward sequence files and the second element will be used to detect reverse sequence files.

samples

either NULL, a Character vector, or a function. If NULL, samples will have the same name as the input files. If a vector, it will be used as vector name for samples. If a function, input files will be converted to sample names using the function provided.

run

either NULL, a Character vector, or a function. In the first case samples will hove no run assigned, whereas in the other two the behaviour will be the same of the sample option.

output

either NULL, a Character vector, or a function. Same behaviour as the run parameter.

recursive

logical, should the listing recurse into directories?

Value

an Experiment object

See Also

formatSample(), formatOutptut(), and runFromHeader() or runFromBasedir() for sample, output, and run formatting.


GiBacci/expR documentation built on Oct. 15, 2022, 12:15 a.m.