The percentile normalization function in the q2-perc-norm plugin uses relative abundances, and currently only accepts
FeatureTable[RelativeFrequency] as an input. @cdiener pointed out that it would be nice to also allow
FeatureTable[Frequency] as an input, so that it can use the output of denoising without having to convert to
I have one philosophical and one logistical question:
Does this make sense to incorporate into my plugin, or is this sort of redundancy not recommended? What I’d end up doing is checking whether the input is
Frequency, and if it’s
Frequency first convert to relative abundance before proceeding (e.g. with this function in the feature table plugin). This adds redundancy into qiime2, because the user could instead just use the
q2-feature-table plugin to do this conversion, so it may not be ideal. On the other hand, it’s much more convenient for the user to have this wrapped into the code without requiring an extra step. What do y’all think?
Logistically, how do I check whether the input is
Frequency and include an extra step before the percentile normalization if it’s
Frequency? One hacky way I can think of to do this is check whether each sample sums to 1, but it would be cleaner to directly interrogate the input type.