Different Priority based on wildcards

Create issue
Issue #1293 new
Former user created an issue

I'd like to see the priority field of rules support functions as input. Basically my workflow is splitting an input into many distinct chunks but can't guarantee that chunks are the same size. Ideally, larger chunks would have a larger priority than smaller chunks in order for the parrelelization to work smoothly. This chunk size information is easy to encode into the file paths and can easily be captured by wild cards, but it can't currently be used to inform job priority. (at least I can't see how to do it)

Probably a very niche feature but its one I'd like. Simple example below....

rule process_chunk:
    input:
        "chunk_{i}_{size}.txt"
    output:
        "result_{i}_{size}.tsv"
    priority:
        lambda wcs: int(wcs["size"])
    script:
        "processer.py"

Comments (0)

  1. Log in to comment