I would like to do easily reproducible analysis using publicly available data from NCBI, so I have chosen a snakemake
.
I would like to write a single rule, that would be able to download any genome given a species code name and separated table of species and their NCBI IDs. So I wrote a script scripts/download.sh
that takes a species code and download the genome to data/<species_code>/genome.fa.gz
. The script internally reads the table tables/download_table.tsv
, where are corresponding species code names and NCBI IDs.
So I tried to do a snakemake
like this :
species='Cbir Avag Fcan Lcla Dcor Dpac Pdav Psp62 Psp79 Minc1 Minc2 Mjav Mare Mflo Mhap Pant'
rule download:
input :
"tables/download_table.tsv"
output :
"data/{sp}/genome.fa.gz"
shell :
"scripts/download.sh {sp}"
However, snakemake
returned an error message I do not really understand :
Target rules may not contain wildcards. Please specify concrete files or a rule without wildcards.`.
Is there a way to write a single rule for downloading all the genomes?