showyourwork / showyourwork

A workflow for reproducible and open scientific articles

Home Page:https://show-your.work

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Snakemake rules not being found/run

mkenworthy opened this issue · comments

I have a fresh install of showyourwork, with a rule in Snakemake:

rule proc_asassn23ht:
   input:
      "src/data/asassn/light_curve_b488d087-d12f-4453-b8ef-afe147b26219.csv"
   output:
      "src/data/obs_ASASSN-23ht_ASASSN.ecsv"
   conda:
      "environment.yml"
   script:
      "src/scripts/convert_asassn-23ht.py"

...and a corresponding dependencies in showyourwork.yml:

# Custom file dependencies
dependencies:
  src/scripts/plot_asassn-23ht.py:
    - src/data/obs_ASASSN-23ht_ASASSN.ecsv
  src/scripts/convert_asassn-23ht.py:
    - src/data/asassn/light_curve_b488d087-d12f-4453-b8ef-afe147b26219.csv

...so when I want to make a plot for the paper with plot_asassn-23ht.py, it should use obs_ASASSN-23ht_ASASSN.ecsv and then when it cannot find that, run convert_asassn-23ht.py to take the raw data file light_curve_b488d087-d12f-4453-b8ef-afe147b26219.csv and generate obs_ASASSN-23ht_ASASSN.ecsv.

If I run convert_asassn-23ht.py manually, it works and then plot_asassn-23ht.py works too.

Unfortunately, the Snakemake rule is never found and syw stops because obs_ASASSN-23ht_ASASSN.ecsv is not generated. I build the DAG as well but the dag.pdf shows that the rule is not parsed... what am I missing?

Can you put together a minimal, reproducible example that demonstrates the problem (i.e. small self contained syw project), then I can take a look.

@dfm I did put a simple version together, and that worked. syw is working as intended.

I finally found it was my fault - the filename of the script in the \script{} latex command was partially capitalized, but the version in the Snakemake file was not.