Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Allow Git to decide if file is text or binary
# Always use LF line endings even on Windows.
* text=auto eol=lf

# This is a large generated file that, while text, it is not useful to
# routinely show the diff of. A diff can be forced as needed, e.g. with `git
# diff --text`.
/config/configfile.yaml -diff
Comment thread
joverlee521 marked this conversation as resolved.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# CHANGELOG

We use this CHANGELOG to document breaking changes, new features, bug fixes, and config value changes that may affect both the usage of the workflows and the outputs of the workflows.

## 2026

* TBD: The `filter` section in phylogenetic workflow configuration has been replaced by `subsample`/`custom_subsample` for subsampling, and `filter_for_f_antibody_escape` for initial quality filtering. **This is a breaking change**.
* NOTE: The workflow does not yet support proximal samples.
* TBD: Phylogenetic workflow configuration is now validated against a strict schema. The workflow will error if your configuration has extraneous entries that were previously ignored.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,14 @@ Once you've run the build, you can view the results with:

## Configuration

The default configuration is in [`config/configfile.yaml`](./config/configfile.yaml).
The default configuration is generated by
[scripts/generate_default_config.py](./scripts/generate_default_config.py). It
can be run with Nextstrain CLI:

```sh
nextstrain shell . -c 'python scripts/generate_default_config.py'
```

The workflow is contained in the [Snakefile](Snakefile) with included
[rules](workflow/snakemake_rules/). Each rule specifies its file inputs and outputs
and pulls its parameters from the config. There is little redirection and each
Expand Down
227 changes: 227 additions & 0 deletions config.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
$schema: "https://json-schema.org/draft/2020-12/schema"
title: RSV Phylogenetic Workflow Configuration
description: >-
This is the schema for the Nextstrain rsv phylogenetic workflow's
configuration file.

$defs:
per_full_build_map: &per_full_build_map
type: object
additionalProperties: false
propertyNames:
title: Full build name
description: Full build name (e.g. 'a/genome/all-time')

per_subtype_map: &per_subtype_map
type: object
additionalProperties: false
propertyNames:
title: Subtype
description: Subtype ('a' or 'b')

per_build_map: &per_build_map
type: object
additionalProperties: false
propertyNames:
title: Build name
description: Build name ('genome', 'G', 'F', or 'F-antibody-escape')

per_resolution_map: &per_resolution_map
type: object
additionalProperties: false
propertyNames:
title: Resolution name
description: Resolution name ('all-time', '6y', or '3y')

input_item:
type: object
additionalProperties: false
required:
- name
anyOf:
- required: [metadata]
- required: [sequences]
properties:
name:
type: string
metadata:
type: string
sequences:
type: string

type: object
additionalProperties: false
properties:
conda_environment:
type: string
genesforglycosylation:
type: array
items:
type: string
builds_to_run:
type: array
items:
type: string
resolutions_to_run:
type: array
items:
type: string
subtypes:
type: array
items:
type: string
inputs:
type: array
items:
$ref: "#/$defs/input_item"
additional_inputs:
type: array
items:
$ref: "#/$defs/input_item"
exclude:
type: string
description:
type: string
strain_id_field:
type: string
display_strain_field:
type: string
subsample: &subsample_config
<<: *per_full_build_map
description: >-
Subsampling configuration. When using --configfile, it is recommended to
use 'custom_subsample' instead to ignore default subsampling configuration.
patternProperties:
"^.*$":
$ref: "https://nextstrain.org/schemas/augur/subsample-config/v1#/$defs/schemaForUnalignedSequences"
custom_subsample:
<<: *subsample_config
description: >-
Custom subsampling configuration. When using --configfile, this is
recommended over 'subsample' to ignore default subsampling configuration.
files:
type: object
additionalProperties: false
properties:
auspice_config:
type: string
auspice_config_additional_colorings:
type: string
auspice_config_f_antibody_escape:
type: string
auspice_config_non-genome_builds:
type: string
refine:
type: object
additionalProperties: false
properties:
coalescent:
type: string
date_inference:
type: string
clock_filter_iqd:
type: number
divergence_units:
type: string
ancestral:
type: object
additionalProperties: false
properties:
inference:
type: string
cds:
<<: *per_build_map
patternProperties:
"^.*$":
type: string
traits:
type: object
additionalProperties: false
properties:
columns:
type: [string, array]
items:
type: string
frequencies:
type: object
additionalProperties: false
properties:
resolutions:
<<: *per_resolution_map
patternProperties:
"^.*$":
type: object
additionalProperties: false
properties:
min_date:
type: string
nextclade_attributes:
<<: *per_subtype_map
patternProperties:
"^.*$":
type: object
additionalProperties: false
properties:
name:
type: string
reference_name:
type: string
accession:
type: string
filter_for_f_antibody_escape:
type: object
additionalProperties: false
properties:
group_by:
type: string
min_length:
<<: *per_build_map
patternProperties:
"^.*$":
type: integer
min_coverage:
<<: *per_build_map
patternProperties:
"^.*$":
type: number
resolutions:
<<: *per_resolution_map
patternProperties:
"^.*$":
type: object
additionalProperties: false
properties:
min_date:
type: string
background_min_date:
type: string
f_dms_data:
type: string
f_dms_antibodies:
type: array
items:
type: string
dms_only_positive_escape:
type: boolean
enrich_antibody_escape:
<<: *per_build_map
patternProperties:
"^.*$":
type: object
additionalProperties: false
properties:
nseqs_per_antibody_scoretype:
type: integer
group_by:
type: array
items:
type: string
max_identical_f_prot_muts:
type: integer
max_identical_max_escape_mut:
type: integer
custom_rules:
type: array
description: Custom Snakemake rule files to include. If used, this will disable config schema validation.
items:
type: string
Loading
Loading