Hi,

I am new to Bioconductor and am studying both biobase and biostatistics for
a small project.
My client wants to know wether he should use ExpressionSet for part of its
assay R&D process.
For a experiment, I understand there is a lot of common metadata like
compound, dose level, replicate,...
I have seen phylo and feature dataframe class AnnotatedDataFrame and already
said to the client he could use that.
Fact is that those metadata (if I have weell understand) also could be used
for gene expression (so addayData).
What is the standard BioConductor way to handle those metadata? : there is
no metadata argument associated to assayData.
Should I use an AnnotatedDataFrame for feature repeting gene expression with
such metadata?

btw, are there people here who really use ExpressionSet in their processes?

Thanks for any insight.


Eric


PS: as I looked at AnnotatedDataFrame class, I missed a helper function to
exploit metadata.
Here is such a little function and a sample use, where one requests for
variables in AnnotatedDataFrame with conditions on metadata (arbitrary ones,
handled by dots ...)




selectVariables <- function(x,logic=all,drop=FALSE,...){
  listCriteria <- list(...)
  metadata <- varMetadata(x)
  retainedCriteria <- list()
  sapply(names(listCriteria), function(critname) {
    if(!critname %in% colnames(metadata)){
      cat("\n Dropped criteria:",critname, "not in AnnotatedDataFrame\n")
    }else{
      if(is.null(listCriteria[critname])) listCriteria[[critname]]<-
unique(metadata[,critname])
       retainedCriteria[[critname]] <<-  metadata[,critname] %in%
        listCriteria[critname]
    }
    })
   criteriaValues <- do.call("cbind",retainedCriteria)
   selectedColumns <<- apply(criteriaValues,1,logic)
   cat('\n',sum(selectedColumns),' columns selected.\n',sep='')
   return(selectedColumns)
}




library(Biobase)
# prepating metadata
treatment=c("D","192","233","192","233")
control=c(1,0,0,0,0)
dose=c(NA,30,10,10,0.3)
replicate=rep(1,5)
metadata <- data.frame
(cbind(treatment=treatment,control=control,dose=dose,replicate=replicate,
  labelDescription=paste("treatment: ",treatment, ifelse(control==1, "
[control]","")," dose:",dose,"(",replicate,")",sep='')))

  data1=data.frame(cbind(v1=1:2,v2=2:3,v3=3:4,v4=4:5,v5=5:6))
anData1 = new("AnnotatedDataFrame",data=data1,varMetadata=metadata)


# use little function to create an subset data.frame

anData1[,selectVariables(anData1,dose=10, dummy=0)]





-- 
Eric Lecoutre
Consultant - Business & Decision
Business Intelligence & Customer Intelligence

	[[alternative HTML version deleted]]

