runscripts.workflow
- runscripts.workflow.copy_to_filesystem(source, dest, filesystem)[source]
Robustly copy the contents of a local source file to a destination path on a PyArrow filesystem.
- runscripts.workflow.generate_colony(seeds)[source]
Create strings to import and compose Nextflow processes for colony sims.
- Parameters:
seeds (int)
- runscripts.workflow.generate_lineage(seed, n_init_sims, generations, single_daughters, analysis_config)[source]
Create strings to import and compose Nextflow processes for lineage sims: cells that divide for a number of generations but do not interact. Also contains import statements and workflow jobs for analysis scripts.
- Parameters:
seed (int) – First seed for first sim
n_init_sims (int) – Number of sims to initialize with different seeds
generations (int) – Number of generations to run for each seed
single_daughters (bool) – If True, only simulate one daughter cell each gen
analysis_config (dict[str, dict[str, dict]]) –
Dictionary with any of the following keys:
{ 'variant': analyses to run on output of all cells combined, 'cohort': analyses to run on output grouped by variant, 'multigen': analyses to run on output grouped by variant & seed, 'single': analyses to run on output for each individual cell, 'parca': analyses to run on parameter calculator output } Each key corresponds to a mapping from analysis name (as defined in ``ecol/analysis/__init__.py``) to keyword arguments.
- Returns:
2-element tuple containing
sim_imports: All include statements for Nextflow sim processes
sim_workflow: Fully composed workflow for entire lineage