poe.mcmc - metaArra non-numeric matrix extent error
1
0
Entering edit mode
@adrian-johnson-2728
Last seen 4.6 years ago
Hi: I am trying to replicate the code in metaArray package. The merged object after mergeExprs does not seem to work for poe.mcmc. Could anyone help me understand where the problem exist. Thanks in advance. > poe.mat <- poe.mcmc(merged,M=1000) Error in matrix(0, GG, TT) : non-numeric matrix extent I am using merged object from mergeExprs function from mergeMaid. Following is the code I used. This code is chunk1 from metaArray vignette ( october 1 2012) Thanks Adrian ## code chunk 1 ### from metaArray vignette library(metaArray) library(Biobase) library(MergeMaid) data(mdata) common <- intersect(rownames(chen.poe),rownames(garber.poe)) common <- intersect(common, rownames(lapointe.poe)) chen.poe <- chen.poe[match(common, rownames(chen.poe)),] garber.poe <- garber.poe[match(common, rownames(garber.poe)),] lapointe.poe <- lapointe.poe[match(common, rownames(lapointe.poe)),] vars <- list("var1","var2") names(vars) <- names(chen.spl) pdata1 <- new("AnnotatedDataFrame") pData(pdata1) <- chen.spl varLabels(pdata1) <- vars sample1 <- new("ExpressionSet", exprs=chen.poe, phenoData = pdata1) names(vars) <- names(garber.spl) pdata2 <- new("AnnotatedDataFrame") pData(pdata2) <- garber.spl varLabels(pdata2) <- vars sample2 <- new("ExpressionSet", exprs=garber.poe, phenoData = pdata2) names(vars) <- names(lapointe.spl) pdata3 <- new("AnnotatedDataFrame") pData(pdata3) <- lapointe.spl varLabels(pdata3) <- vars sample3 <- new("ExpressionSet", exprs=lapointe.poe, phenoData = pdata3) merged <- mergeExprs(sample1,sample2,sample3)
MergeMaid metaArray MergeMaid metaArray • 1.3k views
ADD COMMENT
0
Entering edit mode
@adrian-johnson-2728
Last seen 4.6 years ago
I got it worked. The answer is hidden in mergemaid function. poe.mcmc(exprs(intersection(merged)),NN=m) Sorry for another question. How to select genes differentially expressed across all datasets from poe.mcmc result? names(poeRes) [1] "alpha" "mug" "kappaposg" "kappanegg" "sigmag" "piposg" "pinegg" "mu" [9] "tausqinv" "gamma" "lambda" "pil.pos.mean" "pil.pos.prec" "pil.neg.mean" "pil.neg.prec" "kap.pos.rate" [17] "kap.neg.rate" "poe" "accept" Thanks Adrian On Sun, Oct 21, 2012 at 8:12 AM, Adrian Johnson <oriolebaltimore at="" gmail.com=""> wrote: > Hi: > > I am trying to replicate the code in metaArray package. > > The merged object after mergeExprs does not seem to work for poe.mcmc. > Could anyone help me understand where the problem exist. Thanks in advance. > >> poe.mat <- poe.mcmc(merged,M=1000) > Error in matrix(0, GG, TT) : non-numeric matrix extent > > I am using merged object from mergeExprs function from mergeMaid. > Following is the code I used. This code is chunk1 from metaArray > vignette ( october 1 2012) > > Thanks > Adrian > > > > ## code chunk 1 ### from metaArray vignette > library(metaArray) > library(Biobase) > library(MergeMaid) > data(mdata) > common <- intersect(rownames(chen.poe),rownames(garber.poe)) > common <- intersect(common, rownames(lapointe.poe)) > chen.poe <- chen.poe[match(common, rownames(chen.poe)),] > garber.poe <- garber.poe[match(common, rownames(garber.poe)),] > lapointe.poe <- lapointe.poe[match(common, rownames(lapointe.poe)),] > vars <- list("var1","var2") > names(vars) <- names(chen.spl) > pdata1 <- new("AnnotatedDataFrame") > pData(pdata1) <- chen.spl > varLabels(pdata1) <- vars > sample1 <- new("ExpressionSet", exprs=chen.poe, phenoData = pdata1) > names(vars) <- names(garber.spl) > pdata2 <- new("AnnotatedDataFrame") > pData(pdata2) <- garber.spl > varLabels(pdata2) <- vars > sample2 <- new("ExpressionSet", exprs=garber.poe, phenoData = pdata2) > names(vars) <- names(lapointe.spl) > pdata3 <- new("AnnotatedDataFrame") > pData(pdata3) <- lapointe.spl > varLabels(pdata3) <- vars > sample3 <- new("ExpressionSet", exprs=lapointe.poe, phenoData = pdata3) > merged <- mergeExprs(sample1,sample2,sample3)
ADD COMMENT

Login before adding your answer.

Traffic: 886 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