How to record Seurat DE analysis efficiently?
2
0
Entering edit mode
3.8 years ago
Pratik ★ 1.1k

So Seurat can generate ViolinPlots that illustrate differential gene expression across clusters.

Example: Seurat DE What would be the best approach to record this data using automation/scripting?

Ideally, I want to record this information like this:

enter image description here

Where I could set some sort of threshold which results recording the cluster as X or TRUE? Or even better would be some sort of quantitative value?

I am familiar with basic R scripting, just not entirely sure where to begin with this!

Any help would be appreciated!

R RNA-Seq rna-seq • 1.6k views
ADD COMMENT
1
Entering edit mode

not sure if this helps here, probably not, but I usually present DE results as heatmaps (if you have many genes). The thing with violins is that they are only really illustrative if the median is above zero, meaning that at least 50% of cells need to have counts for that gene > 0 and this is (at least in 10X data) often not the case despite the gene was meaningful. Given the large dropout rate I find it often helpful for visualization to bin cells, e.g. average 10 cells that (along a trajectory per cluster) are adjacent. That helps denoising heatmaps.

ADD REPLY
0
Entering edit mode

Thank you for this ATPoint. I didn't know this. I'm going to play around with both now.

Question:

When you say:

binning cells eg. average 10 cells that (along a trajectory per cluster) are adjacent.

Do you mean doing something like this (in Seurat)?

DoHeatmap(subset(pbmc, downsample = 10), features = mygenesofinterest, size = 3)

I looked around and I'm thinking binning cells might be a functionality of Monocle or scanpy?

Or maybe I'm just speaking to my lack of understanding!!

ADD REPLY
1
Entering edit mode

I am not a Seurat user myself, I simply ordered the cells per cluster along the inferred trajectory using slingshot, and then used rowMeans to average cells adjacent in pseudotime (e.g. 10 cells). Not sure whether there are ready-made functions for this.

ADD REPLY
0
Entering edit mode

Oh, Okay. Thank you! I am thinking of playing around with trajectories at some point. Your approach definitely helped me gain additional exposure and understanding.

Definitely going to refer back here.

I don't think there are ready-made functions like this in Seurat.

Thank you again!

ADD REPLY
1
Entering edit mode
3.8 years ago
Pratik ★ 1.1k

Realized/found a solution!

Basically, I can use stacked violin plots as described in this post, which scanpy can do, but the Seurat version of it.

A: Seurat :Violin plot showing relative expression of select differentially express

This will be pretty much exactly what I need, if not, better.

And for further analysis of the specific clusters I am interested in. I'll subset the Seurat object, compile a list cluster-specific markers using FindMarkers, remove duplicates using dplyr's distinct() and then generate stacked ViolinPlots on the subsetted data.

Yay!

ADD COMMENT
3
Entering edit mode
3.8 years ago

You can save the picture as a PDF. Or use rmarkdown to make a file which contains your script, some explanation, and your images.

ADD COMMENT
0
Entering edit mode

Thank you. Okay. Let me do this.

ADD REPLY

Login before adding your answer.

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