[BioC] help with dataset

Martin Morgan mtmorgan at fhcrc.org
Wed May 27 14:29:41 CEST 2009


Hello Alberto --

Alberto Goldoni <alberto.goldoni1975 at gmail.com> writes:

>> Hello to everybody,
>> i have a little problem with my dataset. Actually my data using
>> pData(eset.irq.50) is like this:
>>
>> > eset.irq.50
>> ExpressionSet (storageMode: lockedEnvironment)
>> assayData: 1227 features, 8 samples
>>   element names: exprs
>> phenoData
>>   sampleNames: SHR-PUFA5.CEL, SHR-PUFA6.CEL, ..., WK-st2.CEL  (8 total)
>>   varLabels and varMetadata description:
>>     sample: arbitrary numbering
>> featureData
>>   featureNames: 1367555_at, 1367556_s_at, ..., 1399089_at  (1227 total)
>>   fvarLabels and fvarMetadata description: none
>> experimentData: use 'experimentData(object)'
>> Annotation: rat2302
>>
>>
>> > pData(eset.irq.50)
>>                                        sample
>> SHR-PUFA5.CEL             1
>> SHR-PUFA6.CEL             2
>> SHR-st7.CEL                   3
>> SHR-st8.CEL                   4
>> WK-PUFA3.CEL              5
>> WK-PUFA4.CEL              6
>> WK-st1.CEL                    7
>> WK-st2.CEL                    8
>>
>> i would like to modify these data in order to obtain:
>>
>> > pData(eset.irq.50)
>>                                 ES              TYPE
>> SHR-PUFA5.CEL     PUFA          SHR
>> SHR-PUFA6.CEL     PUFA          SHR
>> SHR-st7.CEL           ST               SHR
>> SHR-st8.CEL           ST               SHR
>> WK-PUFA3.CEL      PUFA           WK
>> WK-PUFA4.CEL      PUFA           WK
>> WK-st1.CEL            ST                WK
>> WK-st2.CEL            ST                WK

do you mean like

> dim(sample.ExpressionSet)
Features  Samples 
     500       26 
> head(pData(sample.ExpressionSet))
     sex    type score
A Female Control  0.75
B   Male    Case  0.40
C   Male Control  0.73
D   Male    Case  0.42
E Female    Case  0.93
F   Male Control  0.22
> sample.ExpressionSet[["ES", labelDescription="What ES is"]] <- 
+     factor(c("PUFA", "ST"))
> sample.ExpressionSet[["TYPE", labelDescription="What TYPE is"]] <- 
+     factor(rep(c("SHR", "WK"), each=13))
> head(pData(sample.ExpressionSet))
     sex    type score   ES TYPE
A Female Control  0.75 PUFA  SHR
B   Male    Case  0.40   ST  SHR
C   Male Control  0.73 PUFA  SHR
D   Male    Case  0.42   ST  SHR
E Female    Case  0.93 PUFA  SHR
F   Male Control  0.22   ST  SHR
> varMetadata(sample.ExpressionSet)
      labelDescription
sex        Female/Male
type      Case/Control
score    Testing Score
ES          What ES is
TYPE      What TYPE is

?

Hope that helps,

Martin

>> in order to gave to me the possibility to perform factDesign analysis.
>>
>> Somebody can help me?
>>
>>
>> BEST REGARDS.
>>
>>
>>
>> --
>> -----------------------------------------------------
>> Dr. Alberto Goldoni
>> Bologna, Italy
>> -----------------------------------------------------
>>

-- 
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793



More information about the Bioconductor mailing list