This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Issues with Merging Seurat Objects: Multiple Counts in Assays Layer

Hello Biostars Community,

I am currently working with Seurat to analyze scRNA-seq data from a set of 6 different rat samples, comprising 3 male and 3 female individuals. My objective is to conduct quality control (QC) and subsequent analysis on these samples. Each sample has been loaded into Seurat with its respective matrix, and I am at the stage where I need to merge these Seurat objects into one for comprehensive analysis.

However, I am encountering an unexpected issue during the merge process. Instead of obtaining a single count in the assays layer of the merged Seurat object, I find myself with 6 separate counts (counts.1, counts.2, ... counts.6). This is perplexing, as I anticipate a unified count post-merge to proceed with my analysis.

To ensure consistency and accuracy, I have meticulously followed the script provided by my Principal Investigator (PI), who had previously performed similar QC steps without such issues. Furthermore, I have attempted this process using the exact version of Seurat that my PI used, yet the problem persists.

Below, I have shared the snippet of the script where I am stuck, along with a screenshot illustrating the assays layer of my Seurat object post-merge. I am at a loss as to why this issue is arising and how to resolve it, preventing me from moving forward with my analysis.

enter image description here enter image description here I would greatly appreciate any insights, suggestions, or solutions from the community. Has anyone else faced a similar issue, or does anyone have an idea why the merge function is resulting in multiple counts instead of a single consolidated count?

Thank you in advance for your help and support. Adding the whole code link below. https://github.com/darshanjadhav/seurat/blob/main/QC.R

seurat

1 answer

However, I am encountering an unexpected issue during the merge process. Instead of obtaining a single count in the assays layer of the merged Seurat object, I find myself with 6 separate counts (counts.1, counts.2, ... counts.6). This is perplexing, as I anticipate a unified count post-merge to proceed with my analysis.

This is not any problem. The problem you have is you do not understand how the data are stored in a Seurat object when it is created using Seurat V5. Data are stored as individual layers in Seurat V5 object that's why you see 6 layers even though you have merged them. So, if you would like to a single combined layer, you can simply Join layer by following function-

seurat_object <- JoinLayers(seurat_object)

Having said that unjoined layers will not affect/hinder your downstream analyses unless you are doing differential expression analyses like FindMarkers, FindAllMarkers etc. I would suggest you to invest some time to read Seurat V5 manual.

This worked, thanks.

Maybe I will read the manual, thanks for the suggestion.

Keep it up and stay humble my friend. When you become an expert, keep talking to people in a nice way. That makes all the difference.

Log in to answer this question.