gskb and GSEA
0
0
Entering edit mode
eaclark • 0
@eaclark-16815
Last seen 6.3 years ago

Hi,

I'm trying out the gskb package, but finding the tutorial a little confusing.  Are there any other examples of the GSEA() function? I tried...

> ?GSEA
No documentation for ‘GSEA’ in specified packages and libraries:
you could try ‘??GSEA’

> ?gskb::GSEA() 
Error in .helpForCall(topicExpr, parent.frame()) : 
  no methods for ‘GSEA’ and no documentation for it as a function

...but I'm guessing because the R program for GSEA is downloaded and saved on the lab web site (or locally), the help doesn't work this way. I downloaded the R-GSEA script from the Broad, but the README file describes how to run it by changing the .R file which I'm not sure how to then use with the databases in gskb.

The reason I'm stuck is I can't figure out how to read in the .gct expression file following the example in the vignette. It specifies the file as input.ds = "http://ge-lab.org/gskb/mouse_data.gct"

But I have a .gct file locally. I tried reading it in as a table, but the extra lines at the top of the file throw an error

> input_exp = read.table("path_to/expression.gct")

Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 17 elements

So I tried...

> input_exp = read.table("/Volumes/ATAC_RNA/atac/2018atac/TSS_RNA_analysis/GO/cns_express.gct", skip = 2, header = TRUE, sep = "\t")
> phenotype = read.table("/Volumes/ATAC_RNA/atac/2018atac/TSS_RNA_analysis/GO/cns_poised.cls", header = TRUE, sep = "\t")
> gs_bd = mm_GO
> outdir= "path_to/GO"
> GSEA.prog.loc<- "http://ge-lab.org/gskb/GSEA.1.0.R"
> source(GSEA.prog.loc, max.deparse.length=9999)
> GSEA(input_exp, phenotype, gs_bd, outdir,
+      doc.string = "mouse",
+      non.interactive.run = T,
+      reshuffling.type = "sample.labels",
+      nperm = 1000,
+      weighted.score.type =  1,
+      nom.p.val.threshold = -1,
+      fwer.p.val.threshold = -1,
+      fdr.q.val.threshold = 0.25,
+      topgs = 10,
+      adjust.FDR.q.val = F,
+      gs.size.threshold.min = 15,
+      gs.size.threshold.max = 500,
+      reverse.sign = F,
+      preproc.type = 0,
+      random.seed = 3338,
+      perm.type = 0,
+      fraction = 1.0,
+      replace = F,
+      save.intermediate.results = F,
+      OLD.GSEA = F,
+      use.fast.enrichment.routine = T)
[1] " *** Running GSEA Analysis..."
Error in order(class.labels, decreasing = F) : argument 1 is not a vector

I'm guessing that skipping the first 2 lines of gct file messed it up. I tried filling in empty columns to complete the 1st and 2nd rows so that I could read.table without skipping lines, (also with and without specifying header), but got the same result: 

Error in order(class.labels, decreasing = F) : argument 1 is not a vector

I hope that all makes sense. I'm still a little new to R, so I apologize if these are silly mistakes. Any pointers would be much appreciated. Thank you!

gskb • 684 views
ADD COMMENT

Login before adding your answer.

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