COSGR icon indicating copy to clipboard operation
COSGR copied to clipboard

Seurat V5 and cosg

Open liyanguo520 opened this issue 6 months ago • 1 comments

Is there any way to solve the problem?

marker_cosg <- cosg(scRNA_object, groups='all',assay='SCT',

  •                 slot='data',mu=1,n_genes_user=100,
    
  •                 remove_lowly_expressed=TRUE,
    
  •                 expressed_pct=0.1)
    

Error in ..subscript.2ary(x, l[[1L]], l[[2L]], drop = drop[1L]) : NA subscripts in x[i,j] not supported for 'x' inheriting from sparseMatrix addition: Warning message: x or y has vectors with all zero; consider setting use_nan = TRUE to set these values to NaN or use_nan = FALSE to suppress this warning

liyanguo520 avatar Dec 17 '23 16:12 liyanguo520

Hi,

The above error might be caused by using the SCT assay, which is not sparse after the scTransform normalization. We recommend use the RNA assay with the slot data as the input. Hope it works!

Best, Min

genecell avatar Mar 12 '24 20:03 genecell