snakemake icon indicating copy to clipboard operation
snakemake copied to clipboard

file inclusion/exclusion control?

Open cefect opened this issue 8 months ago • 0 comments

I have a snakemake workflow running my compute chain on a set of parallel tiles. I'd like to easily be able to control which tiles are included/excluded from the workflow. I know snakemake can detect the tiles from a directory:

rule ruleName:
    input:
        <my_directory>/{tile_name}/DEM.tif

but I'd like to be able to easily exclude (then un-exclude) some tiles for my development.

Alternatively, I can specify the files as a parameter list into expand:

TILE_NAMES_L = pd.read_csv('tile_list.txt', header=None)[0].tolist()

rule ruleName:
    input:
        expand("<my_directory>/{tile_name}/DEM.tif", tile_name=TILE_NAMES_L))

but anytime TILE_NAMES_L changes snakemake detects a 'changed parameter' and wants to recompute everything (even if I've only REMOVED entries from the list). How should I setup my snakeflie such that it doesn't recompute tiles when only the list has been shortened?

cefect avatar May 28 '24 16:05 cefect