Snakemake Q: passing list of param values @ CLI --> one build per value

Welcome, @sidneymbell! :slight_smile: Would something like the example code in this post help you achieve what you’re trying to do? This shows how to include multiple counties in a single focal set (bay-area).

Or are you more interested in creating a separate build per county? If so, you could set this up like so:

subsampling:
  # Default subsampling logic for a single county.
  county:
    # Focal samples for multiple counties
    county_focus:
      group_by: "division year month"
      seq_per_group: 48
      include: --query "(country == '{country}') & (division == '{division}') & (location == '{county}')"
    # Contextual samples from the rest of the world that are genetically similar to county samples
    global:
      group_by: "country year month"
      seq_per_group: 1
      exclude: "--exclude-where 'region={region}'"
      priorities:
        type: "proximity"
        focus: "county_focus"

Then your builds can be defined like so:

builds:
  california-sonoma:
    subsampling_scheme: county
    region: North America
    country: USA
    division: California
    county: Sonoma