DoHeatmap with GSEA gene set?
1
0
Entering edit mode
19 months ago
crx6xw ▴ 10

Hello,

I'm trying to create heatmaps based on genes within this GSEA gene set. There are a lot of genes in this set and I'm not expecting to have all of them on the heatmap.

When I run this code:

DoHeatmap(avgexp, features = alphavec, group.by = "ptorigin", angle = 90)

In which alphavec is the string vector of all genes in that gene set, I'm confronted with this error:

Error in DoHeatmap(avgexp, features = alphavec, group.by = "ptorigin", : No requested features found in the scale.data slot for the RNA assay.

I'm assuming this means that some genes were not found in my seurat object. However, how do I go about actually determining which genes are not present so I can remove them from the vector?

scrnaseq singlecell gsea • 1.3k views
ADD COMMENT
2
Entering edit mode
19 months ago
Basti ★ 2.0k

First, you can have a view of how many genes of alphavec are present in your Seurat object :

intersect(avgexp@assays[["RNA"]]@var.features, alphavec)

Then, if there are more than 1 gene overlapping, you can run this code to draw the heatmap :

DoHeatmap(avgexp[alphavec,], features = alphavec, group.by = "ptorigin", angle = 90)
ADD COMMENT

Login before adding your answer.

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