Is there any wat to access the input of a snakemake rule in the output
1
0
Entering edit mode
6 months ago
curious ▴ 530

I have a rule that needs to take a that could come from many different locations, do some processing, then put output in a new path which varies depending on the input. Is it possible to do this with key value pairs like this:

def get_vcf_path():
an input function that gets vcf path

my_dict = {'vcf_input_path' : 'vcf_output_path'}

rule my_rule:
input:
vcf_in_path=get_vcf_path

output:
vcf_out_path= lambda wildcards: my_dict [wildcards.input.vcf_path]

shell:
do stuff


I seem to be having issues. I kind of wonder if snakemake cant have output that is that dynamic because it won't be able to tell which rule outputs satisfy rule all.

snakemake • 525 views
0
Entering edit mode
6 months ago
curious ▴ 530

OP here, I don't think you can: https://groups.google.com/g/snakemake/c/VVyw0b6PYig