readGct | R Documentation |
As complementary functions to writeGctCls
, readGctCls
reads a
pair of gct and cls files (with same base names) into an
ExpressionSet
object.
readGct(gct.file)
readGctCls(file.base, gct.file, cls.file, add.fData.file, add.pData.file)
gct.file |
The name of the gct file (only valid when file.base is missing). |
file.base |
The full file name of gct/cls files without suffixe, if not
in the current diretory, must contain the path (dirname) as well . For
instance if it is set as |
cls.file |
The name of the cls file (only valid when file.base is missing). |
add.fData.file |
Optional, file of additional feature data, see details. |
add.pData.file |
Optional, file of additional phenotype (sample) data, see details. |
The readGctCls
function calls internally the readGct
and
read_cls
functions to read in two formats respeectively.
readGct
returns a barely annotated ExpressionSet
object, and
read_cls
returns a vector of levels encoding sample groups.
Since gct/cls contains only one property of features and samples each
(Description in the gct file as well as sample groups/levels in the cls
file), readGctCls
allows users to provide additional fData/pData
files. They should be tab-delimited files, with first column machting
exactly the names of features or samples. They must be within the path
specified by the path
option, namely in the same directory of gls/cls
files.sample
See example below.
A ExpressionSet
object
An ExpressionSet
object. The Description
column in the
gct file is encoded in the desc
column in the featureData of the
resulting object. The sample groups in the cls file is encoded in the
cls
column in the phenoData.
readGct()
: readGct uses the C implementation of reading in a gct file
The readGct
function is a wrapper of the
read_gct_matrix function in the ribiosIO
package,
which makes up the GCT matrix into an ExpressionSet
object.
Jitao David Zhang <jitao_david.zhang@roche.com>
writeGctCls
. See
read_gct_matrix
for underlying C code to import GCT
files.
idir <- system.file("extdata", package="ribiosExpression")
sample.eset <- readGctCls(file.base=file.path(idir, "test"))
ext.eset <- readGctCls(file.base=file.path(idir, "test"),
add.fData.file=file.path(idir, "test.add.fData.txt"),
add.pData.file=file.path(idir, "test.add.pData.txt"))
stopifnot(identical(exprs(sample.eset), exprs(ext.eset)))
## try to compare pData(sample.eset) with pData(ext.eset), and similarly
## fData(sample.eset) with fData(ext.eset)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.