[BioC] Biobase - Error: ExpressionSet

Laurent Gatto lg390 at cam.ac.uk
Thu Oct 17 22:09:18 CEST 2013


lisa.johnson.cohen at gmail.com writes:

> Hi Laurent, Thank you for your message. It helped tremendously. I converted
> my data to a matrix and also had to fiddle around a bit get the row and
> column names to match up. But, I successfully made the ExpressionSet! Thank
> you so much.

Great!

> sponge_ExpressionSet<-new("ExpressionSet",exprs=sponge_data,phenoData=pd,experimentData=experimentData,featureData=an)
>
> Do you by any chance work with custom microarrays? We use custom Agilent
> microarrays. Do you have any suggetions for quality assessment?

The best place to look for microarray quality is probably the
arrayQualityMetrics package [1]. I have never tried it with an
ExpressionSet built from a custom Agilent array though.

Best wishes,

Laurent


[1] http://www.bioconductor.org/packages/release/bioc/html/arrayQualityMetrics.html

> Thank you again!
> Lisa
>
> ---
> Lisa Cohen, M.Sc.
> Marine Ecosystem Health,
> Harbor Branch Oceanographic Institute
> at Florida Atlantic University
> 5600 N. US Hwy 1
> Fort Pierce, FL 34946
> Phone: (772) 242-2396
> Fax: (772) 468-0757
> Email:lcohen49 at hboi.fau.edu
> Alt. Email: lisa.johnson.cohen at gmail.com
>
> <lcohen49 at hboi.fau.edu>
>
>
>
>
>
> On Wed, Oct 16, 2013 at 4:44 PM, Laurent Gatto <lg390 at cam.ac.uk> wrote:
>
>>
>> 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