ajshedivy / tps

Temporal Pathway Synthesizer
Other
0 stars 0 forks source link

Use config file for TPS workflow inputs #14

Closed agitter closed 2 years ago

agitter commented 4 years ago

We discussed using a config or properties file to track all of the input files and settings that a user needs to specify. That would greatly reduce the number of command line arguments needed.

A YAML file could be one option. We should look at what other modern software uses.

agitter commented 4 years ago

This blog post gives a thorough overview of different file types and associated parsers that are often used for config files: https://hackersandslackers.com/simplify-your-python-projects-configuration/

Using YAML as an example, we could have a config file like

tps:
  network: data/networks/input-network.tsv
  timeseries: data/timeseries/median-time-series.tsv
  firstscores: data/timeseries/p-values-first.tsv
  ...

cytoscape: /home/seluser/cytoscape/start.sh
agitter commented 4 years ago

Snakemake uses a YAML or JSON config file: https://snakemake.readthedocs.io/en/stable/snakefiles/configuration.html#standard-configuration

If we use YAML, it would make it easier to switch from a script-driven workflow to a Snakemake workflow later.

ajshedivy commented 4 years ago

Here is a list of all of the parameter files

TPS:

Annotation generation:

Visualization workflow

agitter commented 4 years ago

Thanks, it's very helpful to see all of these listed explicitly. The sheer number makes me prefer the config file option even more. That would be a lot of required arguments to supply at the command line.

Some of these are also redundant in the sense that the same input file is used in two different stages (e.g. timeSeriesFile) or the output of one stage is consumed as input by another stage.

We can also think more about setting reasonable defaults. For instance, most users won't need to specify a custom styleTemplateFile.

agitter commented 4 years ago

One example from the Manubot project of using subprocess and passing arguments: https://github.com/manubot/manubot/blob/217e51473f1fd1c6427803676b3c70d44314bb93/manubot/pandoc/bibliography.py