Question: how to visualize co-expression of several genes simultaneously in Featureplot (scRNA-seq) in one figure?
0
gravatar for biologo
21 months ago by
biologo40
biologo40 wrote:

Dear all, I am analysis the 10X genomics scRNA-seq data nowadays, and the problem i met was i want to know a set of gene distribution along all the clusters. As i know the Featureplot support one gene or two gene, how can i plot a list of genes?

typical code as follows:

FeaturePlot(object = pbmc, features.plot = c("MS4A1", cols.use = c("grey", "blue"), reduction.use = "tsne")
seurat featureplot scrna • 2.2k views
ADD COMMENTlink modified 21 months ago by lehmannnathalie40810 • written 21 months ago by biologo40

Try grid package.

ADD REPLYlink written 21 months ago by cpad011213k

thanks, cpad, but can you mention a little bit more details, i web the grid package, and it seems like work on the picture layout

ADD REPLYlink written 21 months ago by biologo40

sorry..it was gridextra, not grid. Btw, did you go through the visualization examples provided by seurat devs? https://satijalab.org/seurat/visualization_vignette.html. They provided an example of list with 7 genes.

esp

features.plot <- c("LYZ", "CCL5", "IL32", "PTPRCAP", "FCGR3A", "PF4")
FeaturePlot(object = pbmc, features.plot = features.plot, cols.use = c("lightgrey", 
    "blue"))
ADD REPLYlink modified 21 months ago • written 21 months ago by cpad011213k

many thanks, but that's not what i mean, i wanna one scatter plot which contain all the gene expression i want simultaneously, not split into many figure,and each figure shows the expression of single gene.

ADD REPLYlink written 21 months ago by biologo40
1
gravatar for lehmannnathalie408
21 months ago by
lehmannnathalie40810 wrote:

Hi, if you don't mind visualizing all the markers without being able to differentiate each of them, you can simply use this:

markers <- c("MS4A1", "GNLY", "CD3E", "CD14", "FCER1A", "FCGR3A", "LYZ", "PPBP", "CD8A")
markers_percent <- Matrix::colSums(pbmc_small@raw.data[markers, ])/Matrix::colSums(pbmc_small@raw.data)
pbmc_small <- AddMetaData(object = pbmc_small, metadata = markers_percent , col.name = "markers_percent")
FeaturePlot(object = pbmc_small, features.plot = "markers_percent", cols.use = c("grey", "blue"), reduction.use = "tsne", no.legend = F)
ADD COMMENTlink written 21 months ago by lehmannnathalie40810

@biologo, this is the optimal solution. If you plot all the markers with individual colors, then the color will mix up if the same cell expresses multiple markers and the visualization won't be that straightforward.

ADD REPLYlink written 21 months ago by Santosh Anand5.1k
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: 1210 users visited in the last hour