SEURAT scRNA-seq and library contribution for each cluster
2
0
Entering edit mode
2.7 years ago
Morris_Chair ▴ 310

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?

-M

RNA-Seq • 2.0k views
2
Entering edit mode
2.7 years ago

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")

0
Entering edit mode

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

2
Entering edit mode
2.7 years ago
amjass ▴ 20

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!

1
Entering edit mode

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

0
Entering edit mode

great! glad it helped :) enjoy!