Commit 9b792513 authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion
Browse files

add rules for metaphlan2 heatmap

parent 44756d39
samples:
- S1
- S2
input: data/table.txt
metaphlan2_merge:
options: ""
exec_command: metaphlan_hclust_heatmap.py
\ No newline at end of file
__metaphlan2_heatmap_exec_command = config['metaphlan2_heatmap']['exec_command']
__metaphlan2_heatmap_options = config['metaphlan2_heatmap'].get('options', "")
rule heatmap:
input:
__metaphlan2_heatmap_input
output:
__metaphlan2_heatmap_output
params:
exec_command = __metaphlan2_heatmap_exec_command,
options = __metaphlan2_heatmap_options
shell:
"{params.exec_command} {params.options} --in {input} --out {output}"
"""
This example would be used as followed:
$ snakemake --snakefile metaphlan2_heatmap.rules
It requires the presence of input files within data/table.txt to work based on config file
"""
configfile: "config.yaml"
__input = config['input']
__main_output_dir = config.get('output_dir', 'output')
# ---- Metaphlan2 heatmap
__metaphlan2_heatmap_output_dir = __main_output_dir + "/metaphlan2_heatmap"
__metaphlan2_heatmap_output_file_name = config['metaphlan2_heatmap'].get('output_name',"heatmap.png")
__metaphlan2_heatmap_input = __input
__metaphlan2_heatmap_output = "{dir}/{file_name}".format(dir=__metaphlan2_heatmap_output_dir,
file_name=__metaphlan2_heatmap_output_file_name)
include: "metaphlan2_heatmap.rules"
rule all:
input:
__metaphlan2_heatmap_output
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment