scater runUMAP
1
0
Entering edit mode
@a9c5eb20
Last seen 3 months ago
United States

Hello,

I got the warning message:
In .check_reddim_names(x, value, withDimnames) :
non-NULL 'rownames(value)' should be the same as
'colnames(x)' for 'reducedDim<-'. This will be an error
in the next release of Bioconductor.

Does anyone have solutions?

# package version: scran-1.22.1, scuttle-1.4.0, scater-1.22.0 
library(scran); library(scuttle)                                                                                                   
sce <- mockSCE(); sce <- logNormCounts(sce)                                                                                                          
colnames(sce) <- c(rep('cell1', 100), rep('cell2', 100))                                                                                                                                                                                                             
# Modelling the variance:                                                                                                          
var.stats <- modelGeneVar(sce)                                                                                                                                                                                                                                      
# Automatically storing the results.                                                                                               
sce <- denoisePCA(sce, technical=var.stats, subset.row=rownames(var.stats))                                                        

library(scater)                                                                                                                    
sce <- runUMAP(sce, dimred="PCA")

Regards

scater runUMAP • 1.6k views
ADD COMMENT
3
Entering edit mode
Peter Hickey ▴ 740
@petehaitch
Last seen 1 day ago
WEHI, Melbourne, Australia

Why are you doing colnames(sce) <- c(rep('cell1', 100), rep('cell2', 100))? It's generally a bad idea for different columns (cells) to have the same name, and this is what is raising this warning. If instead you use unique colnames, e.g., something like colnames(sce) <- paste0("cell", seq_len(ncol(sce))), then you won't have any problem.

ADD COMMENT
0
Entering edit mode

Yes, in my work I need to use duplicated column names.

ADD REPLY
2
Entering edit mode

Without knowing why you need that, I'd still strongly recommend using unique column names and just store the duplicate-containing cell-level metadata in colData(sce) for when you need to access it (e.g., sce$alt_colnames <- (rep('cell1', 100), rep('cell2', 100)))

ADD REPLY
0
Entering edit mode

Got it. Thank you!

ADD REPLY

Login before adding your answer.

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