Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Metagenomics
snakemake
Commits
44756d39
Commit
44756d39
authored
May 09, 2019
by
Kenzo-Hugo Hillion
♻
Browse files
add SnakeFile for metaphlan2 merge
parent
a35b74dd
Changes
4
Hide whitespace changes
Inline
Side-by-side
tools/metaphlan2/metaphlan2/config.yaml
View file @
44756d39
...
...
@@ -3,5 +3,5 @@ input_dir: data
metaphlan2
:
threads
:
1
input_type
:
fastq
options
:
"
COMMAND
LINE
OPTIONS
"
options
:
"
"
exec_command
:
metaphlan2.py
tools/metaphlan2/metaphlan2_merge/config.yaml
0 → 100644
View file @
44756d39
samples
:
-
S1
-
S2
input_dir
:
data
metaphlan2_merge
:
options
:
"
"
exec_command
:
merge_metaphlan_tables.py
\ No newline at end of file
tools/metaphlan2/metaphlan2_merge/metaphlan2_merge.rules
0 → 100644
View file @
44756d39
__metaphlan2_merge_exec_command = config['metaphlan2_merge'].get('exec_command', 'merge_metaphlan_tables.py')
__metaphlan2_merge_options = config['metaphlan2_merge'].get('options', "")
rule metaphlan2_merge:
input:
__metaphlan2_merge_input
output:
__metaphlan2_merge_output
params:
exec_command = __metaphlan2_merge_exec_command,
options = __metaphlan2_merge_options
shell:
"{params.exec_command} {params.options} {input} > {output}"
tools/metaphlan2/metaphlan2_merge/usage_example.rules
0 → 100644
View file @
44756d39
"""
This example would be used as followed:
$ snakemake --snakefile metaphlan2_merge.rules
It requires the presence of input files within data to work based on config file
e.g. : data/S1.txt
data/S2.txt
"""
configfile: "config.yaml"
__input_dir = config['input_dir']
__main_output_dir = config.get('output_dir', 'output')
# ---- Metaphlan2 merge
__metaphlan2_merge_output_dir = __main_output_dir + "/metaphlan2_merge"
__metaphlan2_merge_output_file_name = config['metaphlan2_merge'].get('output_file_name',"merged_taxonomic_profiles.txt")
__metaphlan2_merge_input = expand("{dir}/{sample}.txt".format(dir=__input_dir,
sample="{sample}"),
sample=config['samples'])
__metaphlan2_merge_output = "{dir}/{file_name}".format(dir=__metaphlan2_merge_output_dir,
file_name=__metaphlan2_merge_output_file_name)
include: "metaphlan2_merge.rules"
rule all:
input:
__metaphlan2_merge_output
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment