Skip to content
Snippets Groups Projects
Commit a67cbb48 authored by Blaise Li's avatar Blaise Li
Browse files

Trying another way to dynamically set params.

parent fc26a485
Branches
No related tags found
No related merge requests found
...@@ -55,12 +55,12 @@ echo -e "${{rate}}\\t{snakemake.params.these_settings}" >> {snakemake.params.rat ...@@ -55,12 +55,12 @@ echo -e "${{rate}}\\t{snakemake.params.these_settings}" >> {snakemake.params.rat
return shell_commands return shell_commands
with NamedTemporaryFile() as fastq, NamedTemporaryFile() as rates_record: with NamedTemporaryFile() as fastq, NamedTemporaryFile() as rates_record:
snakemake.params["fastq"] = fastq.name snakemake.params.fastq = fastq.name
# Take the first 10000 reads from the input # Take the first 10000 reads from the input
shell(f"zcat {snakemake.input.fastq} | head -40000 | gzip > {fastq.name}") shell(f"zcat {snakemake.input.fastq} | head -40000 | gzip > {fastq.name}")
snakemake.params["rates_record"] = rates_record.name snakemake.params.rates_record = rates_record.name
for settings in snakemake.params.settings: for settings in snakemake.params.settings:
snakemake.params["these_settings"] = settings snakemake.params.these_settings = settings
shell(mapping_command(snakemake.params.aligner)) shell(mapping_command(snakemake.params.aligner))
rates_record.seek(0) rates_record.seek(0)
(best_rate, best_settings) = max( (best_rate, best_settings) = max(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment