-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ingest: Add rules to run Nextclade on curated data
Using `community/moncla-lab/iav-h5/ha/all-clades` as the default Nextclade dataset since it works across fauna and NCBI data. Subsequent commits will join these rules with the full ingest workflows.
- Loading branch information
1 parent
f864158
commit b37234e
Showing
3 changed files
with
48 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
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,44 @@ | ||
""" | ||
This part of the workflow handles running Nextclade on the curated metadata | ||
and sequences. | ||
""" | ||
|
||
|
||
DATASET_NAME = config["nextclade"]["dataset_name"] | ||
|
||
|
||
rule get_nextclade_dataset: | ||
"""Download Nextclade dataset""" | ||
output: | ||
dataset=f"data/nextclade/{DATASET_NAME}.zip", | ||
benchmark: | ||
"benchmarks/get_nextclade_dataset.txt" | ||
params: | ||
dataset_name=DATASET_NAME | ||
shell: | ||
""" | ||
nextclade3 dataset get \ | ||
--name={params.dataset_name:q} \ | ||
--output-zip={output.dataset} \ | ||
--verbose | ||
""" | ||
|
||
|
||
rule run_nextclade: | ||
input: | ||
dataset=f"data/nextclade/{DATASET_NAME}.zip", | ||
# The H5NX datasets should only be for the HA segment | ||
sequences="{data_source}/results/sequences_ha.fasta", | ||
output: | ||
nextclade="{data_source}/results/nextclade.tsv", | ||
alignment="{data_source}/results/alignment.fasta", | ||
benchmark: | ||
"{data_source}/benchmarks/run_nextclade.txt" | ||
shell: | ||
""" | ||
nextclade3 run \ | ||
{input.sequences} \ | ||
--input-dataset {input.dataset} \ | ||
--output-tsv {output.nextclade} \ | ||
--output-fasta {output.alignment} | ||
""" |