neurorestore / Libra

MIT License
153 stars 25 forks source link

How to perform edgeR-LRT using Libra with no biological replicates? #30

Open DrDaedalusWHU opened 2 years ago

DrDaedalusWHU commented 2 years ago

DE = run_de(snRNA, de_family = 'pseudobulk', de_method = 'edgeR', de_type = 'LRT',cell_type_col = "orig.ident")

This returns: Error in mutate_at(): ! Can't subset columns that don't exist. ✖ Column replicate doesn't exist.

So how can I perfrom edgeR-LRT using Libra with no biological replicates?

jordansquair commented 2 years ago

If you do not have biological replicates you would typically use a single-cell method (e.g., Wilcox), since pseudobulk methods require replicates. Alternatively, you could treat cells as replicates (cell_type_col = barcode) - however this will not protect you against the biases we describe in the paper.

DagmaraNiedziela commented 10 months ago

I tried to run a single-cell method (wilcox) on a Seurat dataset (specifically ifnb, it is a PMBC dataset with 2 treatments, no biological replicates), and I also received an error "Column replicate doesn't exist". Should this be working by default?