readDGE {edgeR} | R Documentation |
Reads and merges a set of text files containing digital gene expression data.
readDGE(files, path=NULL, columns=c(1,2), group=NULL, labels=NULL, ...)
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 |
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 |
labels |
character vector giving short names to associate with the libraries. Defaults to the file names. |
... |
other are passed to |
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.
DGEList object
Mark Robinson and Gordon Smyth
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.
# Read all .txt files from current working directory ## Not run: files <- dir(pattern="*\\.txt$") RG <- readDGE(files) ## End(Not run)