writeDGEList | R Documentation |
Write an DGEList object as plain files for downstream analysis
writeDGEList(
dgeList,
exprs.file,
fData.file,
pData.file,
group.file,
groupLevels.file,
feat.name = NULL,
feat.desc = NULL
)
dgeList |
An DGEList object |
exprs.file |
File name where counts are saved |
fData.file |
File name where feature annotations are saved |
pData.file |
File name where sample annotations are saved |
group.file |
File name where the sample group information is saved |
groupLevels.file |
File where the sample group levels are saved |
feat.name |
Feature names. Can be a column name in |
feat.desc |
Feature descriptions, used in GCT files. If Expression values are saved by default in the gct format, unless the file name ends with tsv in which case a tab-separated value (TSV) file will be saved. Sample group and group level information are derived from the |
In case the input matrix has no feature name, the feature names are set to be the integer array starting from 1.
In case no genes
item is available in the DGEList, a minimal
data.frame containing one column, Feature
, is exported with row names
of the count matrix used as both row names as well as the content of the
Feature
column.
y <- matrix(rnbinom(10000,mu=5,size=2),ncol=4)
d <- DGEList(counts=y, group=rep(1:2,each=2))
exprsFile <- tempfile()
fDataFile <- tempfile()
pDataFile <- tempfile()
groupFile <- tempfile()
groupLevelsFile <- tempfile()
writeDGEList(d, exprs.file=exprsFile, fData.file=fDataFile, pData.file=pDataFile,
group.file=groupFile, groupLevels.file=groupLevelsFile)
head(ribiosIO::read_gct_matrix(exprsFile))
head(ribiosIO::readMatrix(fDataFile))
head(ribiosIO::readMatrix(pDataFile))
head(readLines(groupFile))
head(readLines(groupLevelsFile))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.