Learn R Programming

edgeR (version 3.8.6)

readDGE: Read and Merge a Set of Files Containing DGE Data

Description

Reads and merges a set of text files containing digital gene expression data.

Usage

readDGE(files, path=NULL, columns=c(1,2), group=NULL, labels=NULL, ...)

Arguments

files
character vector of filenames, or alternatively a data.frame with a column containing the file names of the files containing the libraries of counts and, optionally, columns containing the group to which each library belongs, descriptions of the other samples and other information.
path
character string giving the directory containing the files. The default is the current working directory.
columns
numeric vector stating which two columns contain the tag names and counts, respectively
group
vector, or preferably a factor, indicating the experimental group to which each library belongs. If group is not NULL, then this argument overrides any group information included in the files argument.
labels
character vector giving short names to associate with the libraries. Defaults to the file names.
...
other are passed to read.delim

Value

Details

Each file is assumed to contained digital gene expression data for one sample (or library), with transcript identifiers in the first column and counts in the second column. Transcript identifiers are assumed to be unique and not repeated in any one file. By default, the files are assumed to be tab-delimited and to contain column headings. The function forms the union of all transcripts and creates one big table with zeros where necessary.

See Also

DGEList provides more information about the DGEList class and the function DGEList, which can also be used to construct a DGEList object, if readDGE is not required to read in and construct a table of counts from separate files.

Examples

Run this code
#  Read all .txt files from current working directory

## Not run: files <- dir(pattern="*\\.txt$")
# RG <- readDGE(files)## End(Not run)

Run the code above in your browser using DataLab