These functions present quick way to create ExpressionSet objects.

as.ExpressionSet(x, ...)

# S4 method for data.frame
as.ExpressionSet(x, annotation_cols = !sapply(x,
  is.double))

read.ExpressionSet(file, header = TRUE, ...)

Arguments

x

data.frame to convert to an ExpressionSet.

...

Additional parameters to read.table

annotation_cols

The data.frame columns used as annotations. All others are used as expressions. (Logical, character or numerical index array)

file

File path to read ASCII data from

header

Specifies if the file has a header row.

Value

an ExpressionSet object

Details

They work by using all continuous (double) columns as expression data, and all others as observation annotations.

See also

read.table on which read.ExpressionSet is based, and ExpressionSet.

Examples

library(Biobase)
#> Lade nötiges Paket: BiocGenerics
#> Lade nötiges Paket: parallel
#> #> Attache Paket: ‘BiocGenerics’
#> The following objects are masked from ‘package:parallel’: #> #> clusterApply, clusterApplyLB, clusterCall, clusterEvalQ, #> clusterExport, clusterMap, parApply, parCapply, parLapply, #> parLapplyLB, parRapply, parSapply, parSapplyLB
#> The following objects are masked from ‘package:stats’: #> #> IQR, mad, sd, var, xtabs
#> The following objects are masked from ‘package:base’: #> #> anyDuplicated, append, as.data.frame, basename, cbind, colnames, #> dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep, #> grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget, #> order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank, #> rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply, #> union, unique, unsplit, which, which.max, which.min
#> Welcome to Bioconductor #> #> Vignettes contain introductory material; view with #> 'browseVignettes()'. To cite Bioconductor, see #> 'citation("Biobase")', and for packages 'citation("pkgname")'.
df <- data.frame(Time = seq_len(3), #integer column Actb = c(0.05, 0.3, 0.8), Gapdh = c(0.2, 0.03, 0.1)) set <- as.ExpressionSet(df) rownames(exprs(set)) == c('Actb', 'Gapdh')
#> [1] TRUE TRUE
phenoData(set)$Time == 1:3
#> [1] TRUE TRUE TRUE