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

start snakemake for samtools view

parent 05042bc7
__samtools_view_exec_command = config.get('samtools_view', {}).get('exec_command', 'samtools view')
__samtools_view_modules = config.get('samtools_view', {}).get('modules')
__samtools_view_options = config.get('samtools_view', {}).get('options', "")
rule samtools_view:
input:
__samtools_view_input
output:
__samtools_view_output
params:
exec_command = __samtools_view_exec_command,
modules = __samtools_view_modules,
options = __samtools_view_options
run:
command = []
if params.modules:
command.append("module load {params.modules}")
command.append("{params.exec_command} {params.options} {input} > {output}")
shell(" && ".join(command))
\ No newline at end of file
configfile: "config.yaml"
# ==== Snakefile path ====
__samtools_view_rules = config.get("snakefiles", {}).get("samtools_view")
__main_output_dir = config.get('output_dir', 'output')
# ==== Main config ====
SAMPLES = config.get('samples')
__input_dir = config.get('input_dir', 'data')
# ==== Samtools view ====
__samtools_view_input =
__samtools_view_output =
__samtools_view_input = expand("{dir}/{{sample}}.emapper.seed_orthologs".format(dir=__input_dir), sample=SAMPLES)
__samtools_view_output = "{dir}/{file_name}".format(dir=__samtools_view_output_dir, file_name=__samtools_view_merged_name)
include: __samtools_view_rules
rule all:
input: "{dir}/{file_name}".format(dir=__samtools_view_output_dir, file_name=__samtools_view_merged_name)
snakefiles:
samtools_view: /pasteur/zeus/projets/p02/metasig/gitlab/snakemake/tools/samtools/view/Snakefile
input_dir: /some/input/directory
output_dir: /some/output/directory
samples:
- test_00000
- test_00001
- test_00002
samtools_view:
exec_command: samtools view
modules: samtools
options: "-b -f 4"
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