Closed ruggerobelluomo closed 3 months ago
Maybe this helps as well to see the structure of the two objects
alldata.integrated An object of class Seurat 34285 features across 125586 samples within 2 assays Active assay: integrated (2000 features, 2000 variable features) 2 layers present: data, scale.data 1 other assay present: RNA 2 dimensional reductions calculated: pca, umap
all_seurat_spliced_unspliced An object of class Seurat 108896 features across 125586 samples within 2 assays Active assay: spliced (54448 features, 0 variable features) 16 layers present: counts.B2FYH, counts.B3MOC, counts.B3MYH, counts.B4FYH, counts.B5MOC, counts.B5MOH, counts.B5MYC, counts.B5MYH, counts.B6FOC, counts.B6FOH, counts.B6FYC, counts.B6FYC_2, counts.B7MOC, counts.B7MOH, counts.B7MYC, counts.B8FOH 1 other assay present: unspliced
Hi,
Not member of dev team but hopefully can be helpful. Can you explain why you want to merge cells with the same ids from 2 objects? Might help to understand goal better in order to help you.
Thanks, Sam
Hey @samuel-marsh,
thanks for your reply. I need to perform RNA velocity analysis and I do not have the information about spliced vs unspliced transcripts in my integrated object. So I counted spliced and unspliced transcripts with Salmon and I created a new objefct with spliced and unspliced assays. Now, I need to add this info to my integrated data to preform RNA velocity analysis in my clusters, hope it is clear enough...
Hi Ruggero, the merge function is intended to combine Seurat objects containing two different sets of cells, which is why it is outputting an object that has renamed the cells uniquely. If these two objects represent information for the exact same cells and you just want to combine them into one object, I would recommend just adding the relevant metadata and assays from one of your objects to the other. For example, you can extract metadata and assays from one of the objects, and add it to the other using the AddMetaData
and CreateAssayObject
functions.
Hi @igrabski, I am using the CreateAssayObject as you suggested but in seurat v5 the data structure changed and I cannot find anymore where the data is. Before I could do: alldata.integrated[["unspliced"]] <- CreateAssayObject(data = renamed.assay@assays$unspliced@data)
but now I cannot find it anymore in the new Seurat version. Do you know where I can find it?
Can you show the structure of your object containing the unspliced data (renamed.assay
) and how you created it?
Closing this since there has been no response -- please feel free to open a new issue if the problem persists!
Hi everyone,
I am trying to create a Seurat object that contains the information spread across two Seurat objects. The tewo seurat object have matching cell IDs but in different order.
My two objects look like this:
The resulting object should be something like:
How can I achieve this? The merge function doesnt add the columns instead creates new rows with new unique cell IDs which is not what I would like (even if I pass the merge.data=T still the same). Is it possible to just reorder the cells in object 2 as cells in object1?
Thanks for the help!
Info: platform x86_64-w64-mingw32
arch x86_64
os mingw32
crt ucrt
system x86_64, mingw32
status
major 4
minor 3.1
year 2023
month 06
day 16
svn rev 84548
language R
version.string R version 4.3.1 (2023-06-16 ucrt) nickname Beagle Scouts