Learn R Programming

rqubic (version 1.18.0)

writeQubicInputFile: Write an ExpressionSet object into the file format required by the QUBIC command line tool

Description

The QUBIC commmand line tool (developed by Ma et al.) requires a tab-limited data matrix as input file, with some special requirements (see details below). This function takes an object of ExpressionSet and outputs the file.

Usage

writeQubicInputFile(x, file = "", featureNames, sampleNames)

Arguments

x
An object inheriting the eSet class, most commonly an ExpressionSet object, representing expression data of features across samples.
file
Filename to output, or a connection to write to (e.g. stdout()).
featureNames
Specifies the feature names. It can be left blank, in which case the result of calling featureNames on x will be used. Alternatively, it can be one character string, specifying which column in the fData should be used. The third possibility, it can be a vector of characters, with the same length as features in the object. In the last option, all other types will be converted to characters.
sampleNames
Specifies the sample names. It can be left blank, in which case the result of calling sampleNames on x will be used. Alternatively, it can be one character string, specifying which column in the pData should be used. The third possibility, it can be a vector of characters, with the same length as features in the object. In the last option, all other types will be converted to characters.

Value

No visible value will be returned, the function is called for its side effect.

Details

The description of the data format can be checked by running the QUBIC tool in the command line mode, with the option -h (for help). A special requirement, which makes it different from the results of the write.table function in R, is that before the sample names (column names), an “o” must be added.

See Also

eSetDimName, write.table

Examples

Run this code
tmpfile <- tempfile()
data(sample.ExpressionSet, package="Biobase")
sub.eset <- sample.ExpressionSet[1:3, 1:3]

## write to standard output
writeQubicInputFile(sub.eset)

## write to a temporary file
writeQubicInputFile(sub.eset, tmpfile)
head(readLines(tmpfile))

## specify names with one column name in fData/pData
writeQubicInputFile(sub.eset, file="", sampleNames="sex")

## alternatively specifiy names manually
writeQubicInputFile(sub.eset, file="",sampleNames=paste("Sample", 1:3))

Run the code above in your browser using DataLab