-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds the default rule to rename the subset metadata TSV to the final metadata TSV if the Nextclade parameters are not defined in the config. This allows users to run the core ingest workflow with the simplest command of `nextstrain build .`
- Loading branch information
1 parent
645b26b
commit 63bc9bd
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,31 @@ | ||
# Use default configuration values. Override with Snakemake's --configfile/--config options. | ||
configfile: "config/defaults.yaml" | ||
|
||
rule all: | ||
input: | ||
"results/sequences.fasta", | ||
"results/metadata.tsv", | ||
|
||
|
||
include: "rules/fetch_from_ncbi.smk" | ||
include: "rules/curate.smk" | ||
|
||
|
||
# If included, the nextclade rules will create the final metadata TSV by | ||
# joining the Nextclade output with the metadata. | ||
# However, if not including nextclade, we have to 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} | ||
""" |