| read_pheno | R Documentation |
Read pheno (sample annotation) data from CLS file or tab-delimited file (sample information file).
read_pheno(file)
read_pheno_factor(file)
file |
A CLS file or tab-delimited file |
read_pheno returns a data.frame.
read_pheno_factor returns a factor, indicating sample groups. If the
input file is a tab-delimited file, it filters out columns which are
identical for all samples and columns which are unique for each sample.
Consequently the remaining covariates are concatenated by the underscore
character to form a factor. See examples below
read_pheno returns a data.frame containing sample
annotations. In case of CLS input file, the data.frame
contains two columns: Array (indices of arrays) and Class
(classes indexed in the GCT file). In case of tab-delimited file, the file
will be parsed into the data.frame, assuming the file having column
names but no row names.
Jitao David Zhang <jitao_david.zhang@roche.com>
For CLS and sample information file formats, see the GenePattern file formats documentation at https://software.broadinstitute.org/cancer/software/genepattern/file-formats-guide.
read_cls and read.csv.
testClsFile <- system.file("extdata/test.cls", package="ribiosIO")
testPhenoFile <- system.file("extdata/testSampleInfo.txt",
package="ribiosIO")
(clsPheno <- read_pheno(testClsFile))
(txtPheno <- read_pheno(testPhenoFile))
## read_pheno_factor
(clsPhenoClass <- read_pheno_factor(testClsFile))
(txtPhenoClass <- read_pheno_factor(testPhenoFile))
testPhenoFileCov <- system.file("extdata/testSampleInfo-cov.txt",package="ribiosIO")
read_pheno_factor(testPhenoFileCov)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.