Skip to content

Use augur subsample #101

Description

@victorlin

This workflow's subsampling is implemented by custom rules that call augur filter one or two times and combines the results. It works fine, but complicates the Snakemake workflow DAG, is ad-hoc, and is not portable across pathogen repos.

Description of work

  1. Update the configuration from:

    filter:
    group_by: "year country"
    min_coverage:
    genome: 0.3
    G: 0.3
    F: 0.3
    min_length:
    genome: 10000
    G: 600
    F: 1200
    resolutions:
    all-time:
    min_date: 1975-01-01
    6y:
    min_date: 6Y
    background_min_date: 1975-01-01
    3y:
    min_date: 3Y
    background_min_date: 1975-01-01
    subsample_max_sequences:
    genome: 3000
    G: 3000
    F: 3000

    to something more generic and customizable.

  2. Replace the filter_recent, filter_background, and combine_samples rules with a rule that calls augur subsample.

    This rule should:

    1. Allow concurrent sample runs with threads
    2. Pass a dump of Snakemake's config as a YAML file to --config
    3. Extract the relevant configuration using --config-section
    4. Allow Snakemake to intelligently handle conditional runs of the subsample rule in the case of config changes.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions