Question: GSVA analysis in R: How to use my geneset and expression data matrix in GSVA.
1
gravatar for Mike
3.4 years ago by
Mike1.4k
UK
Mike1.4k 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 • 5.9k views
ADD COMMENTlink modified 2.5 years ago by likhithakolla0 • written 3.4 years ago by Mike1.4k

how do you create your own geneset?

ADD REPLYlink written 2.5 years 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 2.5 years ago • written 2.5 years ago by Samuel Brady310

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 14 months ago • written 14 months ago by idewdewi0
2
gravatar for Mike
3.4 years ago by
Mike1.4k
UK
Mike1.4k wrote:

The problem is solved.....

just using getGMT function.

geneSets <- getGmt("new_pathways.gmt")
ADD COMMENTlink written 3.4 years ago by Mike1.4k
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: 863 users visited in the last hour