WayScience / CytoSnake

Orchestrating high-dimensional cell morphology data processing pipelines
https://cytosnake.readthedocs.io
Creative Commons Attribution 4.0 International
3 stars 3 forks source link

Helper function implementation #31

Closed axiomcura closed 1 year ago

axiomcura commented 1 year ago

About this PR

This PR introduces the first implementations of helper functions that standardizes all inputs and output paths before executing a workflow.

What is new?

A new module has been added known as helper_funcs that attempts to solve the issues with snakemake strict naming rules.

A new rule module known as common.smk:

Motivation and implementation

helper_funcs

Simple schematic on how the helper_funcs module is involved in generating paths. It loads in the configurations found in cytosnake, and uses those configurations to generate the input and output paths.

One of the issues that @jenna-tomkinson found is that Snakemake expects an exact file names in order for a workflow to successfully work. This means that any files names that do not have the expected files names will cause the workflow to not execute. Fortunately, there is a common work around this issue and it is using python functions as inputs for a Snakemake workflow [source] . Due to this feature that Snakemake has, this drove the development of the helper_funcs module, pre-define the file paths before declaring it the Snakemake based workflows.

axiomcura commented 1 year ago

Hello @gwaybio @roshankern !

Hopefully I was able to answer your comments!

Thank you for all of your suggestions!