zavolanlab / zarp

The Zavolab Automated RNA-seq Pipeline

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fix: htsinfer.smk treats 'nan' values in sample table wrongly

ninsch3000 opened this issue · comments

Describe the bug
When calling the htsinfer.smk from zarp-cli and passing a sample table containing NaN for empty fq2 values, the rule run_htsinfer uses nan for the htsinfer call, instead of an empty string. This causes htsinfer to give an error because it can't find the filepath "nan".
Following code snippet (

fq2_path=lambda wildcards: (
) probably interprets NaN as True:

params:
        fq2_path=lambda wildcards: (
            samples.loc[wildcards.sample, "fq2"]
            if samples.loc[wildcards.sample, "fq2"]
            else ""
        ),

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
empty strings and NaNs should all lead to an empty cli parameter.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Guess this might as well be solved in zarp-cli. I think that a sample table with nan as string is bound to cause problems... @balajtimate