[BioC] help with dataset

Martin Morgan mtmorgan at fhcrc.org
Wed May 27 15:43:16 CEST 2009


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

> Many thanks, but now the situation is like this:
>> pData(eset.iqr.50)
>               sample   ES TYPE
> SHR-PUFA5.CEL      1 PUFA  SHR
> SHR-PUFA6.CEL      2 PUFA  SHR
> SHR-st7.CEL        3 PUFA  SHR
> SHR-st8.CEL        4 PUFA  SHR
> WK-PUFA3.CEL       5   ST   WK
> WK-PUFA4.CEL       6   ST   WK
> WK-st1.CEL         7   ST   WK
> WK-st2.CEL         8   ST   WK
>> head(pData(eset.iqr.50))
>               sample   ES TYPE
> SHR-PUFA5.CEL      1 PUFA  SHR
> SHR-PUFA6.CEL      2 PUFA  SHR
> SHR-st7.CEL        3 PUFA  SHR
> SHR-st8.CEL        4 PUFA  SHR
> WK-PUFA3.CEL       5   ST   WK
> WK-PUFA4.CEL       6   ST   WK
>> varMetadata(eset.iqr.50)
>           labelDescription
> sample arbitrary numbering
> ES              What ES is
> TYPE          What TYPE is
> i would like to remove "sample" and leave only ES and TYPE,
> can you help me again?

> phenoData(sample.ExpressionSet)
An object of class "AnnotatedDataFrame"
  sampleNames: A, B, ..., Z  (26 total)
  varLabels and varMetadata description:
    sex: Female/Male
    type: Case/Control
    ...: ...
    TYPE: What TYPE is
    (5 total)
> phenoData(sample.ExpressionSet) <- phenoData(sample.ExpressionSet)[,-1]
> phenoData(sample.ExpressionSet)
An object of class "AnnotatedDataFrame"
  sampleNames: A, B, ..., Z  (26 total)
  varLabels and varMetadata description:
    type: Case/Control
    score: Testing Score
    ES: What ES is
    TYPE: What TYPE is

(but unless 'sample' is a data entry error why would you want to lose
information?)

Martin

> Best regards.
>
>
> 2009/5/27 Martin Morgan <[[mtmorgan at fhcrc.org]]>
>
>           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     

-- 
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