qurro icon indicating copy to clipboard operation
qurro copied to clipboard

Add option to take log geometric mean of abundances when using multiple taxa

Open fedarko opened this issue 5 years ago • 4 comments

Jamie's suggestion.

Edit: for reference, this would let Qurro use the same definition of ``balance'' as is shown in the Selbal paper.

This should be doable in Qurro's JS by replacing the calls in updateBalanceMulti() to sumAbundancesForSampleFeatures with separate calls to a new function (maybe we could call it geometricMeanOfSampleFeatures?) that computes the geometric mean of the selected feature counts for a given sample.

For the UI, I expect this would be easiest to do in such a way that changes to this setting take effect upon the next time a log-ratio is computed? Or we could store state info about the "previous" log-ratio and, on a change, re-update the sample plot.

It would also be good to make note of this in the sample plot, either in the y-axis or below the plot somehow -- this way people don't accidentally use results from "sum" log-ratios when they think they're actually looking at "geom. mean" log-ratios, or vice versa. I think this might necessitate destroying then recreating the sample plot in order to update the y-axis :| but that's doable, I guess.

fedarko avatar Dec 03 '18 23:12 fedarko