Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent name collisions on input parameters #365

Merged
merged 2 commits into from
Jan 8, 2024

Conversation

rahuldesai1
Copy link
Contributor

In a Snakefile, it is possible for two different input files to have the same parameter name as long as they are defined in different rules. This can lead to name collisions because we use a global mapping (across all rules) of param_name -> input_file.

To avoid this name collision, I add a check and raise an error if it doesn't pass.

I considered adding the job_id to the front of all the variable names, but I suspect that this will make the entrypoint file even less readable. Since this seems like enough of an edge case, I would prefer to just fail and raise an error rather than append the job id to all the variable names.

@rahuldesai1 rahuldesai1 force-pushed the rahuldesai1/snakemake/fix-param-name-collision branch from 947a877 to 36abd19 Compare January 8, 2024 23:45
@rahuldesai1 rahuldesai1 force-pushed the rahuldesai1/snakemake/fix-param-name-collision branch from 36abd19 to 8f77da1 Compare January 8, 2024 23:46
@rahuldesai1 rahuldesai1 requested a review from ayushkamat January 8, 2024 23:46
@rahuldesai1 rahuldesai1 merged commit a6b4fef into main Jan 8, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants