SCE object acting strangley
1
0
Entering edit mode
12 days ago
wykpenguin • 0

I made a SCE object from a seurat object but it is acting strangely.

seurat_object

An object of class Seurat  85012 features across 6078 samples within 2
assays  Active assay: RNA (55403 features, 0 variable features)  2
layers present: counts, data  1 other assay present: SCT

Converting it to SCE with inbuilt function in Seurat seemed to go fine:

sce_object <- as.SingleCellExperiment(seurat_object)
sce_object

class: SingleCellExperiment  dim: 55403 6078  metadata(0): 
assays(2): counts logcounts
rownames(55403): Xkr4 Gm37180 ... mt-Tt mt-Tp
rowData names(0): 
colnames(6078): P10_AAAGGATCAGCTACCG-1
P10_AAAGTCCCAACTGAAA-1 ...   P28_20RM_TTTGGAGTCTGCTTTA-1
P28_20RM_TTTGGTTAGCGACATG-1
colData names(21): orig.ident nCount_RNA ... SubclusterGroups   Stage
reducedDimNames(0):  mainExpName: RNA 
altExpNames(1): SCT

length(rownames(sce_object))    
55403 

length(sce_object$Stage)
6078

However, when I check

length(rownames(sce_object$Stage)) 
0

Am I entering my metadata in the wrong slot in the SCE object?

R SCE Seurat SingleCellExperiment • 282 views
ADD COMMENT
1
Entering edit mode
12 days ago
ATpoint 85k

This is not unexpected. sce_object$Stage will return a character (or factor, numeric, whatever is in this slot) vector, and this by definition has no rownames. What do you try to see with this command?

In a SCE the genes are in rowData() and the metadata are in colData():

ADD COMMENT

Login before adding your answer.

Traffic: 1646 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6