writeQubicInputFile: Write an ExpressionSet object into the file format required...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/rqubic_to_c_funcs.R

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

1
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.

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.

Value

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

Author(s)

Jitao David Zhang <jitao_david.zhang@roche.com>

See Also

eSetDimName, write.table

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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))

Example output

o	A	B	C
AFFX-MurIL2_at	192.742	85.7533	176.757
AFFX-MurIL10_at	97.137	126.196	77.9216
AFFX-MurIL4_at	45.8192	8.83135	33.0632
[1] "o\tA\tB\tC"                               
[2] "AFFX-MurIL2_at\t192.742\t85.7533\t176.757"
[3] "AFFX-MurIL10_at\t97.137\t126.196\t77.9216"
[4] "AFFX-MurIL4_at\t45.8192\t8.83135\t33.0632"
o	Female	Male	Male
AFFX-MurIL2_at	192.742	85.7533	176.757
AFFX-MurIL10_at	97.137	126.196	77.9216
AFFX-MurIL4_at	45.8192	8.83135	33.0632
o	Sample 1	Sample 2	Sample 3
AFFX-MurIL2_at	192.742	85.7533	176.757
AFFX-MurIL10_at	97.137	126.196	77.9216
AFFX-MurIL4_at	45.8192	8.83135	33.0632

rqubic documentation built on Nov. 8, 2020, 8:20 p.m.