find top expressed genes under one specific object
1
0
Entering edit mode
2.0 years ago
Andy ▴ 120

Hello everyone,

I hope you guys could help me with a code I am trying to write. I have a single cell dataset, and my data from both healthy and diseased patients. I performed a find cluster analysis, and I found 6 t-cell clusters. I want to know the top 10 t-cell markers in each t-cell cluster in different patient condition. I wonder how could I find my top 10 t-cell markers.

Thank you Andy

seurat R • 1.8k views
ADD COMMENT
0
Entering edit mode
2.0 years ago
seidel 11k

If you're using R and the Seurat pipeline, one way to get top lists of markers following a call to FindAllMarkers() is to use some of the dplyr functions from the tidyverse on the marker matrix:

 top10 <- markergenes %>% group_by(cluster) %>% top_n(-10, p_val_adj)
# split dataframe into list if you find that convenient
 top10.cids <- split(top10$gene, top10$cluster)

This would try to select the top 10 by P-value. You'll have to know which cluster numbers are your t-cells. And you can get back more than 10 if genes in the top set have the same p-value.

ADD COMMENT
0
Entering edit mode

I appreciate your help.

However, the code did not run successfully. Since I want to split my data by Seurat objects. I run your code with top10$study, and r said first argument has to be a vector.

ADD REPLY

Login before adding your answer.

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