Question: Problem in SPIA: de must be a vector of log2 fold changes. The names of de should be included in the refference array!
5.6 years ago by
Moritz Kebschull • 100
Moritz Kebschull • 100 wrote:
Dear Adi, dear list, I am trying to run SPIA on some data generated using limma. I am, however, running into an error message I donÂ´t understand - my data (at least to me) look very similar to the "Colorectal" example data set used in the vignette. For the ALL list, I did the following. As ALL_Colorectal, all is a character vector of Entrez IDs. > entrezid = mget(ids, illuminaMousev2ENTREZID, ifnotfound = NA) > all <- as.vector(as.numeric(entrezid)) > all <- na.omit(all) > all <- as.character(all) > is.vector(all) TRUE > length(all) 20573 > all "66836" > is.vector(ALL_Colorectal) TRUE> length(ALL_Colorectal) 18045 > data(colorectalcancer) > ALL_Colorectal "3491" For the DE list, I did. > pg=topTable(ebFit, coef=1, number=1000, p.value=0.05, lfc=1) > de_pg <- pg[,5]> names(de_pg)<-pg[,3] de_pg is a numerical vector of log2 fold changes, with EntrezIDs as names, as DE_Colorectal, the example dataset. > is.vector(de_pg) TRUE > de_pg 14825 5.189596 > is.vector(DE_Colorectal) TRUE> DE_Colorectal 3491 5.960206 The names of de_pg are in all, similar to the names of DE_Colorectal being in ALL_Colorectal > names(de_pg) %in% all  TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE etc ... > names(DE_Colorectal) %in% ALL_Colorectal  TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE etc ... However, when I run spia, I get an error I cannot understand > res<-spia(de=de_pg, all=all, organism="mmu",beta=NULL,nB=2000,plots=FALSE, verbose=TRUE,combine="fisher") Error in spia(de = de_pg, all = all, organism = "mmu", beta = NULL, nB = 2000, : de must be a vector of log2 fold changes. The names of de should be included in the refference array! What am I doing wrong? Many thanks for your help, Moritz [[alternative HTML version deleted]]
ADD COMMENT • link •