Rename of assays for SingleCellExperiment object in R
1
0
Entering edit mode
14 months ago
Hien • 0

Hi, I would like to ask a question related to the renaming of assays for the SingleCellExperiment object in R. My data as below:

cortex_sc
class: SingleCellExperiment 
dim: 30535 6460 
metadata(9): Integrated_colors category2_colors ... pca umap
assays(2): **X** logcounts
rownames(30535): MIR1302-2HG OR4F5 ... AC213203.1 FAM231C
rowData names(7): gene_ids mt ... total_counts n_cells
....

In assays, I want to change "X" to "counts". Could anyone suggest to me how to fix it? I have tried someway, but unfortunately, I have not been success.

Thank you!

SingleCellExperiment R • 938 views
ADD COMMENT
1
Entering edit mode
14 months ago
Basti ★ 2.0k

A possible solution is names(assays(sce))=c("counts","logcounts") (sce is your singleCellExperiment object)

ADD COMMENT
0
Entering edit mode

Thank you so much! It works!!!

ADD REPLY

Login before adding your answer.

Traffic: 1621 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