You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, the only input format supported are text files, these are inherently limited in that they don't support:
data types (numeric vs. character)
factor levels (i.e. categorical variables with a predefined ordering).
Data types are guessed on reading in the data and factor levels are lost and replaced with alphabetical order of the categories.
For the "simple" contrasts (variable, baseline, target) this is not so much of an issue, as every comparison is defined explicitly. Numerical variables can be converted to categoricals for this purpose (I'm actually not sure what happens if a numeric variable is supplied to blocking_factors).
For complex contrasts with formula and make_contrast_str, the order of factors is often very important as the contrast string depends on which category is considered the baseline. For complex model designs, it is also convenient and common practice to explicitly set the baseline (e.g. pre-treatment), and then specify contrasts relative to the baseline.
There should be some way to specify factor levels (and possibly variable types) in differentialabundance. Two options I could imagine:
support some sort of binary format as input, e.g. parquet as a language-agnostic tabular format, or SummarizedExperiment/AnnData as discussed in Support SummarizedExperiment as input #365.
allow to explicitly specify the factor levels and possibly variable types, e.g.
Description of feature
Right now, the only input format supported are text files, these are inherently limited in that they don't support:
Data types are guessed on reading in the data and factor levels are lost and replaced with alphabetical order of the categories.
For the "simple" contrasts
(variable, baseline, target)this is not so much of an issue, as every comparison is defined explicitly. Numerical variables can be converted to categoricals for this purpose (I'm actually not sure what happens if a numeric variable is supplied toblocking_factors).For complex contrasts with
formulaandmake_contrast_str, the order of factors is often very important as the contrast string depends on which category is considered the baseline. For complex model designs, it is also convenient and common practice to explicitly set the baseline (e.g. pre-treatment), and then specify contrasts relative to the baseline.There should be some way to specify factor levels (and possibly variable types) in differentialabundance. Two options I could imagine:
@pinin4fjords I'm happy to hear your thoughts on this!