[BioC] Fwd: Creating One Single Object with Phenotype and Expression Data

Wolfgang Huber whuber at embl.de
Sat Oct 8 15:03:57 CEST 2011


Dear Ben

have a look at the vignette "An introduction to Biobase and 
ExpressionSets" in the Biobase package, 
http://www.bioconductor.org/packages/devel/bioc/html/Biobase.html

For best results with arrayQualityMetrics, please use a recent devel 
version 
http://www.bioconductor.org/packages/devel/bioc/html/arrayQualityMetrics.html

	Best wishes
	Wolfgang

Oct/7/11 5:45 PM, Ben Ganzfried scripsit::
> Hi-- apologies if this is a duplicate email.  I just joined the list today
> and I didn't know how long the email I just sent before I joined would be
> under moderator approval.
>
> As a brief introduction, I'm a research assistant in a cancer lab.  I
> graduated from college in 2009 and didn't see myself getting involved in
> medical research at all until I served as a bone marrow donor for my brother
> a year ago.  I'm currently finishing up classes to go to medical school and
> I work in a bioinformatics lab where I'm really enjoying learning how to use
> R through fun projects.
>
> My current project requires me to make a single object that will link our
> expression data with its associated phenotype data, and I'm a little
> confused about the best approach to do this.  I want to use the pdata()
> function and I have all the phenotype data available as csv files, and I
> would greatly appreciate any specific advice you may have about how to
> implement this.  Here is the script so far that generates expression values,
> and I want to add the single object to this ideally:
>
> library(affy)
> library(arrayQualityMetrics)
>
> inputargs<- commandArgs(TRUE)
> print(inputargs)
> sessionInfo()
>
> strInputAccession<- inputargs[1]
> strBaseDir<- inputargs[2]
>
> processedDir<-
> paste(strBaseDir,strInputAccession,"PROCESSED/DEFAULT",sep="/")
> qcDir<- paste(strBaseDir,strInputAccession,"QC",sep="/")
> sampleFile<-
> paste(processedDir,"/",strInputAccession,"_RAWfilenames.txt",sep="")
> defaultExprs<-
> paste(processedDir,"/",strInputAccession,"_default_exprs.csv",sep="")
>
> if(file.exists(sampleFile)){
>    affyobj<- try(ReadAffy(filenames=read.table(sampleFile,as.is
> =T,header=FALSE)[,1]))
>    if(class(affyobj)=="try-error"){
>      rm(affyobj)
>    }else{
>      sampleNames(affyobj)<- sub("\\..*","",sampleNames(affyobj))  #get rid
> of .CEL etc extension, just keep GSM
>    }
> }
>
> if(!exists("affyobj")){
>    mdExprs<- as.matrix(read.csv(defaultExprs,row.names=1))
>    if( min( mdExprs, na.rm = TRUE )>= 0&  max( mdExprs, na.rm = TRUE )>= 50
> ) {
>      mdExprs<- log(mdExprs, base = 2) }
>    affyobj<- new("ExpressionSet",exprs=mdExprs)
> }
>
> #I'd like to make one single object with phenotype and expression data here
>
>
> x<- arrayQualityMetrics(expressionset = affyobj,
>                           outdir=qcDir,
>                           force = TRUE,
>                           spatial=FALSE)
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor


-- 


Wolfgang Huber
EMBL
http://www.embl.de/research/units/genome_biology/huber



More information about the Bioconductor mailing list