andersen-lab / Freyja

Depth-weighted De-Mixing
BSD 2-Clause "Simplified" License
102 stars 29 forks source link

Feature request: raw bootstraps #153

Closed wutron closed 1 year ago

wutron commented 1 year ago

Is it possible to have freyja boot write the raw bootstraps? (Completely fake) example output:

,B.1.617.2,B.1.2,AY.6,Q.3
1,0.5,0.25,0.15,0.1
2,0.4,0.2,0.25,0.15
...
100,0.55,0.2,0.15,0.15

where the first line specifies the lineages, and each successive line specifies the estimates for each bootstrap (each --nb 100).

Use case: We want to show confidence intervals for a group of lineages (e.g. constellations), but our constellations are different than that of curated_lineages.json and also might change over time. Having the raw bootstraps would allow us to find CIs without having to rerun freyja boot with different sets of constellations since we can sample from the bootstrap estimates per lineage. In essence, we are okay with doing the summaries ourselves from the lineage estimates.

Thanks for the package!

joshuailevy commented 1 year ago

Hi @wutron,

Thanks for the suggestion! We can certainly add in a --bootfile (or something like that) option for users to specify this. We have some custom grouping functionality (using a config file) for the dash and plot functions, but at the moment we don't have an analog for the bootstrapping. We'll follow up on this!

Best, Josh