I am trying to use the GSE.Test.Main function in the GANPA package in R to do enrichment analysis of my microarray data. I've checked the example in the document and I'm sure that all my data including the gene sets and the expression value are in the exact same format as it suggests in the document. But I'm not sure how to choose the gene network in the algorithm, so I just go with the one in the example. However, an error comes up when I run that function. And I can't figure out what goes wrong.
Here are my codes:
The expSet2 is a list of expression value and the gexp is the input of the expression value as it suggests in the document. The gset it the list of gene sets.
library(GANPA) expSet <- read.csv("E:/SIAT/expressiondifference10.9/expression_profile.csv", header = T) rownames(expSet) <- expSet[,1] expSet <- expSet[,-1] expSet2 <- as.matrix(expSet) attr(expSet2, "dimnames") <- list(rownames(expSet), colnames(expSet)) sampleinfo <- cbind(sampleid = c("a40_s16_1","a40_s48_1","a40_s55_1","a40_s68_1", "a80_s6_2","a80_s52_1","a80_s53_1","a80_s60_1"), status = c(rep("young",4), rep("old",4))) rownames(sampleinfo) <- colnames(expSet) gexp <- list(gExprs = expSet2, samleinfo = sampleinfo) setwd("E:/SIAT/enrichmentanalysis10.12/gsea_db") completepath <- list.files(pattern = "*.txt") gset <- lapply(setNames(completepath, make.names(gsub("*.txt$","",completepath))), function(i) as.character(unlist(read.table(i)))) GSE.Test.Main(gExprs.obj = gexp, gsets = gset, gNET = gNET, check.exprs = F, permN = 100, randN = 30, permFDR.cutoff = 0.1, output.label = "gsea", msp.correction = F)
And here is the the error information:
Error in obtainT(gExprs = gExprs.obj, reverse = FALSE, check.exprs = check.exprs, : obtainT(): status number is not 2! In addition: Warning message: In is.na(status) : is.na() applied to non-(list or vector) of type 'NULL'
If anyone has any idea about my question, please help me !!!!!!