Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference level of label_col factor not respected #48

Open
agrier-wcm opened this issue Jan 16, 2024 · 1 comment
Open

Reference level of label_col factor not respected #48

agrier-wcm opened this issue Jan 16, 2024 · 1 comment

Comments

@agrier-wcm
Copy link

When comparing two groups, it is standard practice to set the levels of the grouping variable (factor) in order to control which group is being used as the reference. Libra does not respect factor levels in the metadata label_col, meaning that it may or may not use the reference group specified by the user. This is a problem because A) half the time it's not doing the comparison the user intends and B) in order to find out what comparison it actually is doing, the user has to inspect the expression levels of individual genes and compare them to the sign of the fold change in the Libra output.

A hacky way around this exists: if you're not getting the comparison you want, swap the reference level, even if that means setting it to the level that you explicitly don't want to be the reference. This is clearly undesirable, though.

@AlanTeoYueYang
Copy link
Collaborator

By default, Libra will refactor according to the character order of the labels. We understand this is non-optimal and we will push a fix soon where we can include factor_levels as an argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants