This is a test version of Biostars. For the public version, visit https://www.biostars.org.
SEURAT scRNA-seq and library contribution for each cluster

Hello Everyone, I'm analyzing three replicates samples with Seurat pipeline and I made clusters in UMAP. I wanted to ask you if it's possible to know what is the contribution of each samples in terms of percentage for each cluster, I know R is capable of everything but I don't know how to code it,

could somebody help me with that?

Thank you in advance

-M

rna-seq

2 answers

I prefer dittoSeq for tasks like this. It works on Seurat objects directly and has much better visualizations than Seurat. Should be included in the next Bioconductor release.

With dittoSeq, this would be done with:

dittoBarPlot("your_cluster_column", your_seurat_object, group.by = "your_sample_column")

Thank you Jared.andrew for the answer, I was not able to install the package that includes dittoBarPlot case requires an upgrade version of R, but I solved the problem anyway

you could also create a table breakdown of individual samples and then calculate total % per cluster: Would look like:

breakdown<-table(seuratObject@metadata$seurat_clusters, seuratObject@metadata$samples)

your output is a breakdown of all clusters and how many cells come from each sample in each one of those clusters. hope this helps!

Hi Amjass, thank you very much for the code it worked perfectly fine, awesome !! :)

great! glad it helped :) enjoy!

Log in to answer this question.