You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I have a rule in my workflow that has four outputs. However, I want two of these outputs to only be generated if a value in config is set to true. The way I achieved this by doing this:
However, I get the following error when linting my workflow:
Duplicate output file pattern in rule my_rule. First two duplicate for entries optional_output_one and optional_output_two
Describe the solution you'd like
I modified the following line in function check_output_duplicates of rules.py:
ifvalueinseen:
to
ifvalueandvalueinseen:
and it fixed the problem. This disables the check if it's an empty value for the output file.
Describe alternatives you've considered
If you have any other suggestions or patterns on how to implement this logic that is better than what I've done, that would be very helpful.
Additional context
I'm not entirely sure if this change would introduce undesired or unexpected behaviour; however, if you agree with it, I'd appreciate the opportunity of contributing to Snakemake.
Thank you for any assistance you can provide.
Best,
Vini
The text was updated successfully, but these errors were encountered:
- Modify function 'check_output_duplicates' to check for empty value
- Complete docstring
- Add period at the end of raise message
- Closessnakemake#1367
Hi,
Is your feature request related to a problem? Please describe.
I have a rule in my workflow that has four outputs. However, I want two of these outputs to only be generated if a value in config is set to true. The way I achieved this by doing this:
However, I get the following error when linting my workflow:
Describe the solution you'd like
I modified the following line in function
check_output_duplicates
ofrules.py
:to
and it fixed the problem. This disables the check if it's an empty value for the output file.
Describe alternatives you've considered
If you have any other suggestions or patterns on how to implement this logic that is better than what I've done, that would be very helpful.
Additional context
I'm not entirely sure if this change would introduce undesired or unexpected behaviour; however, if you agree with it, I'd appreciate the opportunity of contributing to Snakemake.
Thank you for any assistance you can provide.
Best,
Vini
The text was updated successfully, but these errors were encountered: