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

Add methods generation in mapping wrapper.

The goal is to help writing methods by associating a methods file to
some worflow outputs. Methods from one rule may copy methods from
upstream before appending their part.
parent ab4bdff4
No related branches found
No related tags found
No related merge requests found
......@@ -50,3 +50,11 @@ eval ${{cmd}} 1>> {snakemake.log.log} 2> {snakemake.log.err}
return shell_commands
shell(mapping_command(snakemake.params.aligner))
if hasattr(snakemake.output, "methods"):
shell(f"cp {snakemake.input.methods} {snakemake.output.methods}")
methods = f"The {params.read_name} were mapped on the {params.genome_name} using {aligner} (version ${{{{v}}}}) with options {snakemake.params.settings}"
shell(f"""
v=$({aligner} --version | head -1 | awk '{{print $3}}')
echo "{methods}" >> {snakemake.output.methods}
""")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment