Is there any wat to access the input of a snakemake rule in the output
1
0
Entering edit mode
3.5 years ago
curious ▴ 750

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 • 1.6k views
ADD COMMENT
0
Entering edit mode
3.5 years ago
curious ▴ 750

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

ADD COMMENT

Login before adding your answer.

Traffic: 2221 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6