make_ExpressionSet: A call to expressionSet class

View source: R/es.R

make_ExpressionSetR Documentation

A call to expressionSet class

Description

This is really a direct call to the Bioconductor/Biobase class.

Usage

make_ExpressionSet(
  assayData,
  phenoData = Biobase::annotatedDataFrameFrom(assayData, byrow = FALSE),
  featureData = Biobase::annotatedDataFrameFrom(assayData, byrow = TRUE),
  experimentData = Biobase::MIAME(),
  annotation = character(),
  protocolData = Biobase::annotatedDataFrameFrom(assayData, byrow = FALSE),
  ...
)

Arguments

assayData

Expression data.

phenoData

Phenotype.

featureData

featureData.

experimentData

Information on data source.

annotation

Annotation information.

protocolData

protocol information.

...

Other options.

Details

The explicit call make it easier to handle proteomic data for other downstream analyses.

Value

An ExpressionSet object.

Note

Adapted from Bioconductor/Biobase following a number of proteomic pilot studies.

Examples

dataDirectory <- system.file("extdata", package="Biobase")
exprsFile <- file.path(dataDirectory, "exprsData.txt")
exprs <- as.matrix(read.table(exprsFile, header=TRUE, sep="\t", row.names=1, as.is=TRUE))
pDataFile <- file.path(dataDirectory, "pData.txt")
pData <- read.table(pDataFile, row.names=1, header=TRUE, sep="\t")
all(rownames(pData)==colnames(exprs))
metadata <- data.frame(labelDescription=
                       c("Patient gender",
                         "Case/control status",
                         "Tumor progress on XYZ scale"),
                       row.names=c("gender", "type", "score"))
suppressMessages(library(Biobase))
phenoData <- Biobase::AnnotatedDataFrame(data=pData, varMetadata=metadata)
experimentData <- Biobase::MIAME(
    name="Pierre Fermat",
    lab="Francis Galton Lab",
    contact="pfermat@lab.not.exist",
    title="Smoking-Cancer Experiment",
    abstract="An example ExpressionSet",
    url="www.lab.not.exist",
    other=list(notes="Created from text files"))
exampleSet <- pQTLtools::make_ExpressionSet(exprs,phenoData,
                                 experimentData=experimentData,
                                 annotation="hgu95av2")
data(sample.ExpressionSet, package="Biobase")
identical(exampleSet,sample.ExpressionSet)
invisible(Biobase::esApply(exampleSet,2,hist))
lm(score~gender+X31739_at,data=exampleSet)


jinghuazhao/pQTLtools documentation built on Dec. 16, 2024, 3:44 p.m.