MarioniLab / miloR

R package implementation of Milo for testing for differential abundance in KNN graphs
https://bioconductor.org/packages/release/bioc/html/miloR.html
GNU General Public License v3.0
339 stars 22 forks source link

Direction of test for logFC calculation #338

Closed RemiDL closed 1 day ago

RemiDL commented 3 months ago

Hi,

I'm wondering if there is a way to check the direction of the test used to get the LogFC. I have a seurat object converted to sce, then I run Milo pipeline and run the differential abundance per group:

da_results <- testNhoods(traj_milo, design = ~ group, design.df = traj_design_order)

The outcome is clear that I have neighborhood with positive or negative LogFC, but I can'T be sure of the direction of the test. Can I find this information in the design.df or somewhere in the milo object ?

Thanks a lot for your help. Best regards Rémi

MikeDMorgan commented 3 months ago

The direction is set by the variable in your model. By default in R this is lexicographical ordering - you can set the explicit direction/compator using a factor variable.