GSVA analysis in R: How to use my geneset and expression data matrix in GSVA.
1
2
Entering edit mode
8.3 years ago
Mike ★ 1.9k

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

gene RNA-Seq • 14k views
ADD COMMENT
0
Entering edit mode

how do you create your own geneset?

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
2
Entering edit mode
8.3 years ago
Mike ★ 1.9k

The problem is solved.....

just using getGMT function.

geneSets <- getGmt("new_pathways.gmt")
ADD COMMENT

Login before adding your answer.

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