[BioC] problems fitting model using manova

David martin vilanew at gmail.com
Thu Dec 10 14:47:32 CET 2009


Thanks,
working now....

Martin Morgan wrote:
> Hi David --
> 
> David martin wrote:
>> I'm having a problem to create a proper design:
>> For a set of patients i have extracted two cell types (tcells and
>> Bcells). Fore each cell type i have measured the expression of a set of
>> genes.
>>
>> Please note this is not microarray data but flow data. I have a proper
>> expr(eset) object that contains the expression data. I can't use the
>> MAANOVA package as it is specific to arrays.
>>
>>
>> The pData looks like that
>> pData:
>>             Celltype  Patient  Group
>> pat1.cell1     Bcell         1       normal
>> pat1.cell2     Tcell         1       normal
>> pat2.cell1     Bcell         2      severe
>> pat2.cell2     Tcell         2      severe
>> pat2.cell1     Bcell         3      mild
>> pat2.cell2     Tcell         3      mild
>>
>>
>> My data.eset matrix looks like that
>>
>> exprs(mydata.eset)
>> exprs:
>>
>>        pat1.cell1  pat1.cell2 .....
>> gene1     0.18            1.2
>> gene2     0.56            1.5
>> gene3     0.20            1.3
>> gene4     0.56            2.2
>> ...
>>
>> I have problems to create the design. Basically i want to know what the
>> are genes differentially expressed between the different severity groups
>> by cell type and then combining cell types.
>>
>> I have created
>> group=c(as.character(unique(phenotype$Group)))
>> patient=c(as.character(unique(phenotype$Patient)))
>> celltype=c(as.character(unique(phenotype$Celltype)))
>>
>> #The function design.list is a custom copded encoded function to easily
>> create the numeric values for the different variables
>>
>> groups = factor(c(design.list(phenotype$Group,group)))
>> celltypes = factor(c(design.list(phenotype$Celltype,celltype)))
>> patients =  factor(c(design.list(phenotype$Patient,patient)))
>>
>>> celltypes
>>> celltypes
>>   [1] 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1
>> ......[112] 2 1 2 1 2 1 2 1 2 1 2
>> Levels: 1 2
>>> length(celltypes)
>> 122
>>
>>> groups
>>   [1] 1 1 1 1 2 2 2 2 2 2 2 2 1 1 2 2 2 2 1 1 2 2 2 2 2 2 2 2 3 3 3 3 3
>> ...[112] 1 1 1 1 1 1 1 1 1 1 1
>> Levels: 1 2 3
>>> length(groups)
>> 122
>>
>> patients
>>   [1] 1  1  2  2  3  3  4  4  5  5  6  6  7  7  8  8  9  9  10 10 11 11
>> [101] 51 51 52 52 53 53 54 54 55 55 56 56 57 57 58 58 59 59 60 60 61 61
>> 61 Levels: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
>> ... 61
>>> length(patients)
>> 122
>>
>> fit<- manova( exprs(mydata.eset) ~ celltypes*groups , random=patient)
>> Error in model.frame.default(formula = exprs(mydata.eset) ~ celltypes *  :
>>   variable lengths differ (found for 'celltypes')
> 
> manova fits the model to *columns* so expects t(exprs(mydata.eset)). Martin
> 
>> Again, I can't use the MANOVA package for this (flow cytometry data).
>>
>> Any help to fit in the model would be very appreciated
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at stat.math.ethz.ch
>> 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