Thanks. That seemed to do it.

That behavior is highly unexpected, at least to me.

On Tue, May 1, 2012 at 10:35 AM, James W. MacDonald <jmacdon@uw.edu> wrote:

> You need to have consistent ordering between your phenoData and expression
> matrix.
>
> Best,
>
> Jim
>
>
>
>
> On 5/1/2012 1:18 PM, dha 2001 wrote:
>
>> Hi,
>>
>> I'm trying to create a small expression set from the following pieces of
>> data:
>>
>>
>>  is.matrix(sdr)
>>>
>> [1] TRUE
>>
>>
>>  sdr
>>>
>>                  PR8.16      PR8.12    X31.12    PR8.24     VN.24
>> VN.12
>> 1600014C10Rik 0.1398317 -0.07606908 0.1183433 0.8794916 0.5701783
>> 0.2045793
>> 1700123I01Rik 0.2797059  0.17511382 0.2417623 0.9663656 0.7656528
>> 0.3691544
>> 2010005H15Rik 0.5722452  0.22999830 0.5018363 1.0000000 0.7351083
>> 0.5912760
>>                  X31.16     VN.16    X31.24 M.12       M.24        M.16
>> 1600014C10Rik 0.3294323 0.1177338 1.0000000    0 -0.1618993 -0.07646396
>> 1700123I01Rik 0.4761550 0.4523119 1.0000000    0  0.3090218  0.16773738
>> 2010005H15Rik 0.8050344 0.5789556 0.8703344    0  0.1371578  0.06224045
>>
>>
>> And
>>
>>
>>  repPhenoData
>>>
>> An object of class "AnnotatedDataFrame"
>>   rowNames: X31.12 PR8.24 ... VN.24 (12 total)
>>   varLabels: strain time
>>   varMetadata: labelDescription
>>
>>> pData(repPhenoData)
>>>
>>        strain time
>> X31.12    X31   12
>> PR8.24    PR8   24
>> PR8.12    PR8   12
>> PR8.16    PR8   16
>> VN.16      VN   16
>> M.12        M   12
>> M.24        M   24
>> X31.24    X31   24
>> VN.12      VN   12
>> M.16        M   16
>> X31.16    X31   16
>> VN.24      VN   24
>>
>> As far as I can tell, the names match up:
>>
>>  sort(sampleNames(repPhenoData)**)
>>>
>>  [1] "M.12"   "M.16"   "M.24"   "PR8.12" "PR8.16" "PR8.24" "VN.12"
>>  "VN.16"
>>  [9] "VN.24"  "X31.12" "X31.16" "X31.24
>>
>>  sort(colnames(sdr))
>>>
>>  [1] "M.12"   "M.16"   "M.24"   "PR8.12" "PR8.16" "PR8.24" "VN.12"
>>  "VN.16"
>>  [9] "VN.24"  "X31.12" "X31.16" "X31.24"
>>
>> The objects appear to be valid:
>>
>>  validObject(sdr)
>>>
>> [1] TRUE
>>
>>> validObject(repPhenoData)
>>>
>> [1] TRUE
>>
>> However, when I try to create the expression set, I get:
>>
>>  eSDR<- new("ExpressionSet", exprs=sdr, phenoData=repPhenoData)
>>>
>> Error in validObject(.Object) :
>>   invalid class "ExpressionSet" object: sampleNames differ between
>> assayData and phenoData
>>
>>
>> Any clues?
>>
>> Thanks!
>>
>> -DHA
>>
>>  sessionInfo()
>>>
>> R version 2.14.2 (2012-02-29)
>> Platform: x86_64-apple-darwin9.8.0/x86_**64 (64-bit)
>>
>> locale:
>> [1] C
>>
>> attached base packages:
>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>
>> other attached packages:
>> [1] ggplot2_0.9.0  Biobase_2.14.0
>>
>> loaded via a namespace (and not attached):
>>  [1] MASS_7.3-17        RColorBrewer_1.0-5 colorspace_1.1-1
>> dichromat_1.2-4
>>  [5] digest_0.5.2       grid_2.14.2        memoise_0.1        munsell_0.3
>>
>>  [9] plyr_1.7.1         proto_0.3-9.2      reshape2_1.2.1     scales_0.2.0
>>
>> [13] stringr_0.6        tools_2.14.2
>>
>>        [[alternative HTML version deleted]]
>>
>> ______________________________**_________________
>> Bioconductor mailing list
>> Bioconductor@r-project.org
>> https://stat.ethz.ch/mailman/**listinfo/bioconductor<https://stat.ethz.ch/mailman/listinfo/bioconductor>
>> Search the archives: http://news.gmane.org/gmane.**
>> science.biology.informatics.**conductor<http://news.gmane.org/gmane.science.biology.informatics.conductor>
>>
>
> --
> James W. MacDonald, M.S.
> Biostatistician
> University of Washington
> Environmental and Occupational Health Sciences
> 4225 Roosevelt Way NE, # 100
> Seattle WA 98105-6099
>
>

	[[alternative HTML version deleted]]

