Using GANPA package in R to do enrichment analysis
0
0
Entering edit mode
7.2 years ago
zjw6291 • 0

Dear all

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 !!!!!!

Thanks

R software error gene • 1.8k views
ADD COMMENT
0
Entering edit mode

Just at a quick glance, there is a typo here:

gexp <- list(gExprs = expSet2, samleinfo = sampleinfo)

You wrote samleinfo instead of sampleinfo. The function refers to the "pieces" of your expression object by name, so it is trying to find "sampleinfo" and it can not do it because you mis-labelled it. Try to fix this and see if it works.

ADD REPLY
0
Entering edit mode

Oh this is awkward... Thank you so much!!

ADD REPLY

Login before adding your answer.

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