Question: Using GANPA package in R to do enrichment analysis
0
gravatar for zjw6291
2.0 years ago by
zjw62910
zjw62910 wrote:

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

gene R software error • 907 views
ADD COMMENTlink modified 2.0 years ago • written 2.0 years ago by zjw62910

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 REPLYlink written 2.0 years ago by Selenocysteine550

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

ADD REPLYlink written 2.0 years ago by zjw62910
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1742 users visited in the last hour