-
Notifications
You must be signed in to change notification settings - Fork 403
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Demo prefilter rule for Nextstrain GISAID build
Adds a prefilter rule to reduce the size of the input metadata for the GISAID build before running the whole workflow.
- Loading branch information
Showing
2 changed files
with
28 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
rule download_metadata: | ||
params: | ||
metadata_url="s3://nextstrain-ncov-private/metadata.tsv.zst", | ||
output: | ||
metadata="data/metadata.tsv.zst", | ||
shell: | ||
""" | ||
aws s3 cp {params.metadata_url} {output.metadata} | ||
""" | ||
|
||
rule filter_metadata: | ||
input: | ||
metadata="data/metadata.tsv.zst", | ||
output: | ||
metadata="data/prefiltered_metadata.tsv", | ||
params: | ||
max_sequences=500000, | ||
group_by="division year month", | ||
shell: | ||
""" | ||
augur filter \ | ||
--metadata {input.metadata} \ | ||
--subsample-max-sequences {params.max_sequences} \ | ||
--group-by {params.group_by} \ | ||
--output-metadata {output.metadata} | ||
""" |