[BioC] Biobase - Error: ExpressionSet

Laurent Gatto lg390 at cam.ac.uk
Wed Oct 16 22:44:56 CEST 2013


Dear Lisa,

> I'm using the Biobase package to build an ExpressionSet from scratch using
> data from a custom 8x15k Agilent microarray. I'm getting this error and
> can't quite figure it out. Does anyone know how *phenoData* can extend the *
> annotation*? I would like to connect *phenoData* to *exprs* with the Chip
> and Block numbers, somehow, but I don't know how to do this. Any help would
> be greatly appreciated!
>
>> sponge_ExpressionSet<-new("ExpressionSet",exprs=sponge_data,phenoData=samples_matrix,experimentData=experimentData,annotation=annotation_matrix)Error: ExpressionSet 'phenoData' is class 'matrix' but should be or extend 'AnnotatedDataFrame'

The message tells you that the content of the phenoData slot must be an
'AnnotateDataFrame'. Once you have it as a data.frame, you can do the
following

pd <- new("AnnotatedDataFrame", data = pddataframe)

and then pass phenoData = pd in the constructor. 

This also holds for the featureData slot. 

The expression data, on the other hand must be a matrix (not a
data.frame). 

Hope this helps.

Best wishes,

Laurent

>
> Details:
>
> These are the instructions that I am following:
> http://www.bioconductor.org/help/course-materials/2006/biocintro_oct/labs/ExpressionSet/ExpressionSetIntro-lab.pdf
> http://www.bioconductor.org/packages/2.13/bioc/vignettes/Biobase/inst/doc/ExpressionSetIntroduction.pdf
>
> 1. *exprs* data (sponge_data) were extracted from GenePix *.gpr files and
> are in a 15744 x 72 double matrix with RefNumber as rownames:
>
>> head(sponge_data)
>
>       Block 1 Chip 1 Block 2 Chip 1 Block 3 Chip 1 Block 4 Chip 1 Block 5 Chip 1
> 15744              2             23              6              9              3
> 15580              9             16             11             11              6
> 15416              1              0              0              0              1
> 15252              1              0              0             -1              0
> 15088              3              2              0              1              0
> 14924              0             -1              0              0              1
>
>
> 2. *phenoData* (samples_matrix) is a 72 x 8 character matrix with
> experimental design variables for each chip and block:
>
>> head(samples_matrix)     Chip Number File Name                     Hyb Date   Tank Treatment Colony Raceway
> [1,] "1"         "253295110067_2012-08-01.txt" "8/1/2012" "C3" "UC"
>   "P"    "B"
> [2,] "1"         "253295110067_2012-08-01.txt" "8/1/2012" "B2" "UD"
>   "P"    "A"
> [3,] "1"         "253295110067_2012-08-01.txt" "8/1/2012" "B2" "UD"
>   "O"    "A"
> [4,] "1"         "253295110067_2012-08-01.txt" "8/1/2012" "D3" "OD"
>   "BL"   "A"
> [5,] "1"         "253295110067_2012-08-01.txt" "8/1/2012" "D1" "OD"
>   "O"    "B"
> [6,] "1"         "253295110067_2012-08-01.txt" "8/1/2012" "C3" "UC"
>   "O"    "B"
>
>> all(rownames(samples_matrix)==colnames(sponge_data))[1] TRUE
>
>
> 3. *annotation* is (annotation_matrix) is a 15744 x 23 character matrix
> with microarray annotation info, including RefNumber:
>
>> head(annotation_matrix)     Column Row   RefNumber Name Append            Name
> [1,] "96"   "164" "    1"   "GE_BrightCorner"      "GE_BrightCorner"
> [2,] "96"   "162" "    2"   "DarkCorner"           "DarkCorner"
> [3,] "96"   "160" "    3"   "DarkCorner"           "DarkCorner"
> [4,] "96"   "158" "    4"   "222803147_EZ031535.1"
> "222803147_EZ031535.1_16-465"
> [5,] "96"   "156" "    5"   "222546129_EZ002319.1"
> "222546129_EZ002319.1_1845-2030"
> [6,] "96"   "154" "    6"   "222801996_EZ030384.1"
> "222801996_EZ030384.1_31-2558"
>
>> all(rownames(annotation_matrix)==rownames(sponge_data))[1] TRUE
>
>
> 4. experimentData (experimentData): metadata info
>
> But, when I go to finally assemble the ExpressionSet, the error below
> occurs. I think the problem is in connecting *phenoData* to *annotation*,
> but I'm not sure how to do this. I would like to connect the *exprs* to *
> annotation*, to connect Chip and Block numbers, but I don't see how to do
> this. Any help would be greatly appreciated!
>
>> sponge_ExpressionSet<-new("ExpressionSet",exprs=sponge_data,phenoData=samples_matrix,experimentData=experimentData,annotation=annotation_matrix)Error: ExpressionSet 'phenoData' is class 'matrix' but should be or extend 'AnnotatedDataFrame'
>
>
>
> Thank you!
> Lisa
>
> 	[[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



More information about the Bioconductor mailing list