Based on the Tail analysis workflow at https://git.embl.org/grp-cba/tail-analysis/-/blob/main/analysis_workflow.md