diff --git a/README.md b/README.md index 85ce8bd1..477e8725 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ curl -L https://osf.io/4n3m5/download -o gtdb-r95.nucleotide-k31-scaled1000.sbt. Put the following in a config file named `conf-tutorial.yml`: ``` sample: -- HSMA33MX +- SRR5950647 outdir: outputs.tutorial/ metagenome_trim_memory: 1e9 sourmash_database_glob_pattern: gtdb-r95.nucleotide-k31-scaled1000.sbt.zip diff --git a/genome_grist/conf/Snakefile b/genome_grist/conf/Snakefile index 95385d83..d3fdc758 100755 --- a/genome_grist/conf/Snakefile +++ b/genome_grist/conf/Snakefile @@ -776,29 +776,29 @@ rule make_combined_info_csv: # download actual genomes! rule download_matching_genome_wc: - input: - csvfile = ancient('genbank_genomes/{acc}.info.csv') - output: - genome = "genbank_genomes/{acc}_genomic.fna.gz" - run: - with open(input.csvfile, 'rt') as infp: - r = csv.DictReader(infp) - rows = list(r) - assert len(rows) == 1 - row = rows[0] - acc = row['acc'] - assert wildcards.acc.startswith(acc) - url = row['genome_url'] - name = row['ncbi_tax_name'] - - print(f"downloading genome for acc {acc}/{name} from NCBI...", - file=sys.stderr) - with open(output.genome, 'wb') as outfp: - with urllib.request.urlopen(url) as response: - content = response.read() - outfp.write(content) - print(f"...wrote {len(content)} bytes to {output.genome}", - file=sys.stderr) + input: + csvfile = ancient('genbank_genomes/{acc}.info.csv') + output: + genome = "genbank_genomes/{acc}_genomic.fna.gz" + run: + with open(input.csvfile, 'rt') as infp: + r = csv.DictReader(infp) + rows = list(r) + assert len(rows) == 1 + row = rows[0] + acc = row['acc'] + assert wildcards.acc.startswith(acc) + url = row['genome_url'] + name = row['ncbi_tax_name'] + + print(f"downloading genome for acc {acc}/{name} from NCBI...", + file=sys.stderr) + with open(output.genome, 'wb') as outfp: + with urllib.request.urlopen(url) as response: + content = response.read() + outfp.write(content) + print(f"...wrote {len(content)} bytes to {output.genome}", + file=sys.stderr) # summarize_reads_info