Skip to content

Commit

Permalink
Remove nextclade from Snakefile
Browse files Browse the repository at this point in the history
Remove nextclade-related if-else statements from Snakefile.
This also requires editing final rule in curate.smk to output
results/metadata.tsv instead of results/subset_metadata.tsv
  • Loading branch information
kimandrews committed Feb 10, 2024
1 parent 6976bd4 commit 3fb3e9e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
25 changes: 0 additions & 25 deletions ingest/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,6 @@ include: "rules/fetch_from_ncbi.smk"
include: "rules/curate.smk"


# We are pushing to standardize ingest workflows with Nextclade runs to include
# Nextclade outputs in our publicly hosted data. However, if a Nextclade dataset
# does not already exist, it requires curated data as input, so we are making
# Nextclade steps optional here.
#
# If Nextclade config values are included, the nextclade rules will create the
# final metadata TSV by joining the Nextclade output with the metadata.
# If Nextclade configs are not included, we rename the subset metadata TSV
# to the final metadata TSV.
if "nextclade" in config:

include: "rules/nextclade.smk"

else:

rule create_final_metadata:
input:
metadata="results/subset_metadata.tsv"
output:
metadata="results/metadata.tsv"
shell:
"""
mv {input.metadata} {output.metadata}
"""

# Allow users to import custom rules provided via the config.
# This allows users to run custom rules that can extend or override the workflow.
# A concrete example of using custom rules is the extension of the workflow with
Expand Down
2 changes: 1 addition & 1 deletion ingest/rules/curate.smk
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ rule subset_metadata:
input:
metadata="results/all_metadata.tsv",
output:
subset_metadata="results/subset_metadata.tsv",
subset_metadata="results/metadata.tsv",
params:
metadata_fields=",".join(config["curate"]["metadata_columns"]),
shell:
Expand Down

0 comments on commit 3fb3e9e

Please sign in to comment.