This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Subsetting Genes from Clusters

Hello,

I have a fairly simple question on Rstudio but im not sure how to get it done - really bad with handling columns and rows. I have the below which is a list of genes. What would be the way to extract all the genes that are significant in cluster 6? (as opposed to all the other clusters).

I was trying the below which didn't work necessarily, but that would be what I wanted to do. I'm only interested in the gene names not the other data like p_value etc.

cluster6genes <- row.names(subset(marker.genes, cluster = "6"))

Thanks!

Image is here :

https://ibb.co/TRqpbDv

rstudio seurat r dataframes

1 answer

row.names(subset(marker.genes, cluster == 6))

thank you, worked amazingly well :)

Log in to answer this question.