Skip to content

Commit

Permalink
Standardize auxiliary input files in a "defaults" directory
Browse files Browse the repository at this point in the history
This commit renames the `config` directory to `defaults` in both the ingest
phylogenetic workflow. The `defaults.yaml` for configuraiton values is also
renamed to `config.yaml` to be consistent with the pathogen-repo-guide.

https://github.com/nextstrain/pathogen-repo-guide/tree/main/ingest/defaults
  • Loading branch information
j23414 committed Feb 28, 2024
1 parent d459555 commit efa9295
Show file tree
Hide file tree
Showing 15 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ingest/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ min_version(
) # Snakemake 7.7.0 introduced `retries` directive used in fetch-sequences

# Use default configuration values. Override with Snakemake's --configfile/--config options.
configfile: "config/defaults.yaml"
configfile: "defaults/config.yaml"


send_slack_notifications = config.get("send_slack_notifications", False)
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions ingest/config/defaults.yaml → ingest/defaults/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ curate:
geolocation_rules_url: 'https://raw.githubusercontent.com/nextstrain/ncov-ingest/master/source-data/gisaid_geoLocationRules.tsv'
# The path to the local geolocation rules within the pathogen repo
# The path should be relative to the ingest directory.
local_geolocation_rules: 'config/geolocation-rules.tsv'
local_geolocation_rules: 'defaults/geolocation-rules.tsv'
# List of field names to change where the key is the original field name and the value is the new field name
# The original field names should match the ncbi_datasets_fields provided above.
# This is the first step in the pipeline, so any references to field names in the configs below should use the new field names
Expand Down Expand Up @@ -85,7 +85,7 @@ curate:
authors_default_value: '?'
# Path to the manual annotations file
# The path should be relative to the ingest directory
annotations: "config/annotations.tsv"
annotations: "defaults/annotations.tsv"
# The ID field in the metadata to use to merge the manual annotations
annotations_id: 'genbank_accession'
# The ID field in the metadata to use as the sequence id in the output FASTA file
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion phylogenetic/Snakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configfile: "config/config_zika.yaml"
configfile: "defaults/config_zika.yaml"

rule all:
input:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion phylogenetic/rules/annotate_phylogeny.smk
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ rule translate:
input:
tree = "results/tree.nwk",
node_data = "results/nt_muts.json",
reference = "config/zika_reference.gb"
reference = "defaults/zika_reference.gb"
output:
node_data = "results/aa_muts.json"
shell:
Expand Down
6 changes: 3 additions & 3 deletions phylogenetic/rules/export.smk
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ rule export:
traits = "results/traits.json",
nt_muts = "results/nt_muts.json",
aa_muts = "results/aa_muts.json",
colors = "config/colors.tsv",
auspice_config = "config/auspice_config.json",
description = "config/description.md"
colors = "defaults/colors.tsv",
auspice_config = "defaults/auspice_config.json",
description = "defaults/description.md"
output:
auspice_json = "results/raw_zika.json",
root_sequence = "results/raw_zika_root-sequence.json",
Expand Down
4 changes: 2 additions & 2 deletions phylogenetic/rules/prepare_sequences.smk
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ rule filter:
input:
sequences = "data/sequences_all.fasta",
metadata = "data/metadata_all.tsv",
exclude = "config/dropped_strains.txt",
exclude = "defaults/dropped_strains.txt",
output:
sequences = "results/filtered.fasta"
params:
Expand Down Expand Up @@ -90,7 +90,7 @@ rule align:
"""
input:
sequences = "results/filtered.fasta",
reference = "config/zika_reference.gb"
reference = "defaults/zika_reference.gb"
output:
alignment = "results/aligned.fasta"
shell:
Expand Down

0 comments on commit efa9295

Please sign in to comment.