neurorestore/Libra

cell_type not found when subsetting object

MjelleLab opened this issue · 3 comments

When running my whole Seurat object, run_de works fine. When I subset the object to contain only one cell type I get cell_type not found. What is the reason for this? I want to subset before running run_de to set different threshold for my cells types (High vs Low)

Strange - can you send me a sample of the data? (email on profile).

Error was related to number of cells. Setting a filter of min 100 cells solved it.

libra_result = run_de(expr,meta = meta,

  •          replicate_col = "orig.ident",
    
  •          cell_type_col = "seurat_clusters", 
    
  •          label_col = "RNA_snn_res.0.25",
    
  •          input_type = "scRNA",
    
  •          de_family = 'pseudobulk', 
    
  •          de_method = 'edgeR', 
    
  •          de_type = 'LRT',
    
  •          min_cells = 50,
    
  •          min_reps = 2,
    
  •          n_threads = 4
    
  •          )
    

Must group by variables found in .data.
✖ Column cell_type is not found. HOW TO FIX IT?