This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Adding gene set to GSVA

Hi

I am trying to add oncogenic signatures to GSVA but I don't know how to do that

> data(C6BroadSets) #http://software.broadinstitute.org/gsea/msigdb/collections.jsp#C2
Warning message:
In data(C6BroadSets) : data set ‘C6BroadSets’ not found
>

From this tutorial

How to use GSVA for the RNA-seq RPKM file

> topMatrixGSVA <- gsva(topMatrix, c6BroadSets, min.sz=10, max.sz=999999, abs.ranking=FALSE, verbose=TRUE)
Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'gset.idx.list' in selecting a method for function 'gsva': object 'c6BroadSets' not found
> 
>

I have also tried

anonicalC2BroadSets <- c6BroadSets[c(grep("^ERBB2_UP.V1_DN", names(c6BroadSets)),
+                                                                           grep("^ERBB2_UP.V1_UP", names(c6BroadSets)),
+                                                                          grep("^WNT_UP.V1_DN", names(c6BroadSets)))]
Error: object 'c6BroadSets' not found
>

How I can add c6 collection ti GSVA?

gsva

1 answer

The problem is you will have to create the C6: oncogenic signatures yourself, because they are not included in any package. The tutorial you linked to works because c2BroadSets is included in the package GSVAdata. The GSVAdata has this description on how c2BroadSets was created:

The data is contained in an GeneSetCollection object called c2BroadSets obtained by parsing the file c2.all.v3.0.entrez.gmt, downloaded from http://www.broadinstitute.org/gsea, using the getGmt() function from the GSEABase package.

You meant I have to use getGmt() to convert c6.all.v7.1.entrez.gmt to c2BroadSets ?

> gsc <- getBroadSets("c6.all.v7.1.symbols.gmt")
Start tag expected, '<' not found
Error: 'getBroadSets' failed to create gene sets:
  1: Start tag expected, '<' not found
>

How come you ask about using getGmt(), and then you use getBroadSets()? Why don't you try getGmt()?

And no, don't call the new object c2BroadSets, it will overwrite the existing c2BroadSets from GSVAdata, if the package has been loaded.

Finally I used GSEA itself

gset <- gmtPathways("c6.all.v7.1.entrez.gmt")

I fed up regulated genes in one group and I got this

enter image description here

Does this mean KRAS pathway is being down regulated in this group?

Thank you

How I prepare that for GSVA

canonicalC6BroadSets <- GeneSetCollection(msigdbr::msigdbr(species = "Homo sapiens", category = "C6"))
Error in validObject(.Object) : 
  invalid class “GeneSetCollection” object: 1: members must all be 'GeneSet' classes
invalid class “GeneSetCollection” object: 2: unable to find an inherited method for function ‘setName’ for signature ‘"character"’
>

The problem is you are trying to convert it to a GeneSetCollection object. You don't need to do that. GSVA can also take a basic list object (like in the fgsea example in the vignette I linked to).

m_df = msigdbr::msigdbr(species = "Homo sapiens", category = "C6")
m_list = split(x = m_df$gene_symbol, f = m_df$gs_name)

Great post here! I was looking for exactly the same answer!

To get gene sets in ENSEMBL ids, what can I do?

Thank you!

Log in to answer this question.