cellassign
cellassign copied to clipboard
I keep getting Error in cellassign(exprs_obj = sub_sizefac, marker_gene_info = reorder_markersel, : nrow(rho) == G is not TRUE
Hi,
I am running cellassign on a custom marker file and a single cell experiment object. Whenever I run
fit <- cellassign(exprs_obj = sub_sizefac, marker_gene_info = reorder_markersel, s = s, learning_rate = 1e-2, shrinkage = TRUE, verbose = FALSE)
I keep getting the following error
Error in cellassign(exprs_obj = sub_sizefac, marker_gene_info = reorder_markersel, : nrow(rho) == G is not TRUE
despite the fact that rownames of both the Single cell experiment obj and marker matrix are exact same including the order of rows.
`> nrow(sub_sizefac) [1] 19371
nrow(reorder_markersel) [1] 19371 all.equal(rownames(sub_sizefac),rownames(reorder_markersel)) [1] TRUE`
I was wondering if you can shed some light on it. I have followed the cellassign vignette to a T and would appreciate your help in resolving this. Thank you!
One big comment before investigating: the input should be marker genes only - it looks like you're inputting 19371 genes - are these really all markers? See e.g. the basic usage section here
As to the issue itself, can you
print(class(sub_sizefac))
print(sub_size_fac)
Thanks
Did you solve this problem? I also met this situation. Error in cellassign(exprs_obj = sce_marker, marker_gene_info = sce_marker_mat, : nrow(rho) == G is not TRUE code: fit1 <- cellassign(exprs_obj = sce_marker, marker_gene_info = sce_marker_mat, s = s, learning_rate = 1e-2, shrinkage = TRUE, verbose = FALSE)
print(sce_marker) class: SingleCellExperiment dim: 3807 17912 metadata(0): assays(1): counts rownames(3807): Ccl5 Cd8a ... Slurp1 Upk3b rowData names(0): colnames(17912): AAACCCAAGAAGTATC-1_1 AAACCCAAGTCAAGCG-1_1 ... TTTGTTGTCGTGAGAG-1_2 TTTGTTGTCTGAATGC-1_2 colData names(2): X sizeFactor reducedDimNames(0): mainExpName: NULL altExpNames(0): print(nrow(sce_marker_mat)) [1] 3807