Question: GSVA analysis in R: How to use my geneset and expression data matrix in GSVA.
1
gravatar for Mike
2.7 years ago by
Mike1.3k
UK
Mike1.3k wrote:

Hello All,

I am looking GSVA tool for my data sets, but I have some problem in reading expression data and geneset (.gmt) file in GSVA.

I used following tutorial command and worked:

library(GSVA)
library(GSEABase)
library(GSVAdata)
ata(c2BroadSets)
data(leukemia)

filtered_eset <- nsFilter(leukemia_eset, require.entrez=TRUE, remove.dupEntrez=TRUE, var.func=IQR, var.filter=TRUE, var.cutoff=0.5, filterByQuantile=TRUE, feature.exclude="^AFFX")
leukemia_filtered_eset <- filtered_eset$eset
leukemia_es <- gsva(leukemia_filtered_eset, c2BroadSets, min.sz=10, max.sz=500, verbose=FALSE, parallel.sz=1)$es.obs

but when I used my data:

genesets="new_pathways.gmt"
genesets <- GSA.read.gmt(genesets)

I tried:

leukemia_es <- gsva(leukemia_filtered_eset, genesets, min.sz=10, max.sz=500, verbose=FALSE, parallel.sz=1)$es.obs

Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘gsva’ for signature ‘"ExpressionSet", "GSA.genesets"’

mydata <- read.delim("gene_matrix.txt",Header=T, row.names=1)
mydata= as.matrix(mydata)

so how to read .GMT file and expression data for GSVA.

Thanks in advance..

rna-seq gene • 4.4k views
ADD COMMENTlink modified 21 months ago by likhithakolla0 • written 2.7 years ago by Mike1.3k
1
gravatar for Mike
2.7 years ago by
Mike1.3k
UK
Mike1.3k wrote:

The problem is solved.....

just using getGMT function.

geneSets <- getGmt("new_pathways.gmt")
ADD COMMENTlink written 2.7 years ago by Mike1.3k
0
gravatar for likhithakolla
21 months ago by
likhithakolla0 wrote:

how do you create your own geneset?

ADD COMMENTlink written 21 months ago by likhithakolla0

To create your own geneset, make a gmt text file (or add to the bottom of an existing gmt file) a row with the following format:

MY_GENE_SET_NAME na MYGENE1 MYGENE2 MYGENE3 ETC

There should be a tab between each element in the above and a newline at the end. The "na" represents a url giving details about the geneset for other users of the geneset. GSVA doesn't look at it so "na" works just fine.

ADD REPLYlink modified 21 months ago • written 21 months ago by Samuel Brady280

diff <- gsva(data3, geneSets, annotation, method = "gsva", min.sz=1, max.sz=Inf, parallel.sz=0,mx.diff=TRUE, verbose=TRUE) Mapping identifiers between gene sets and feature names Error in as.vector(x, "character") : cannot coerce type 'closure' to vector of type 'character' geneSets <- getGmt("c7.all.v6.2.symbols.gmt")

I have use the data3(expression matrix) and geneSets(gmt file) to do the gsva , while get above error, what should i do ? Great thanks for the help!

ADD REPLYlink modified 5 months ago • written 5 months ago by chunfengxiyu0
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: 1161 users visited in the last hour