-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: rule to download references * fix: undefined output * style. removed unnecessary dir creation * fix: rules for obtaining reference data work as intended now * fix: genome to transcriptome gets input from ref.smk downloads instead of local directory * test: added accesion no. to config to allow ref. data download
- Loading branch information
Showing
5 changed files
with
44 additions
and
2 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
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,37 @@ | ||
localrules: | ||
get_genome, | ||
get_annotation, | ||
|
||
|
||
rule get_genome: | ||
output: | ||
genome="references/genomic.fa", | ||
params: | ||
accession=config["accession"], | ||
log: | ||
"logs/refs/get_genome.log", | ||
conda: | ||
"../envs/env.yml" | ||
shell: | ||
""" | ||
curl -o data.zip https://api.ncbi.nlm.nih.gov/datasets/v2alpha/genome/accession/{params.accession}/download?include_annotation_type=GENOME_FASTA &> {log}; | ||
unzip -p data.zip ncbi_dataset/data/{params.accession}/*.fna > references/genomic.fa 2> {log}; | ||
rm data.zip &> {log} | ||
""" | ||
|
||
|
||
rule get_annotation: | ||
output: | ||
"references/genomic.gff", | ||
params: | ||
accession=config["accession"], | ||
log: | ||
"logs/refs/get_annotation.log", | ||
conda: | ||
"../envs/env.yml" | ||
shell: | ||
""" | ||
curl -o data.zip https://api.ncbi.nlm.nih.gov/datasets/v2alpha/genome/accession/{params.accession}/download?include_annotation_type=GENOME_GFF &> {log}; | ||
unzip -p data.zip ncbi_dataset/data/{params.accession}/*.gff > references/genomic.gff 2> {log}; | ||
rm data.zip &> {log} | ||
""" |