problems fitting model using manova
1
0
Entering edit mode
David ▴ 860
@david-3335
Last seen 6.0 years ago
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') Again, I can't use the MANOVA package for this (flow cytometry data). Any help to fit in the model would be very appreciated
Microarray Microarray • 1.8k views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 6 weeks ago
United States
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 -- 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
ADD COMMENT
0
Entering edit mode
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 > >
ADD REPLY

Login before adding your answer.

Traffic: 782 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6