Skip to content
GitLab
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
4134975f
Commit
4134975f
authored
Nov 19, 2020
by
Kenzo-Hugo Hillion
♻
Browse files
start metaphlan3 rules
parent
8932d738
Changes
4
Hide whitespace changes
Inline
Side-by-side
tools/metaphlan3/metaphlan/paired/Snakefile
0 → 100644
View file @
4134975f
__metaphlan3_exec_command = config.get('metaphlan3', {}).get('exec_command', 'metaphlan')
__metaphlan3_modules = config.get('metaphlan3', {}).get('modules')
__metaphlan3_input_type = config['metaphlan3'].get('input_type', 'fastq')
__metaphlan3_options = config.get('metaphlan3', {}).get('options', "")
__metaphlan3_threads = config.get('metaphlan3', {}).get('threads', 1)
rule metaphlan3_paired:
"""
MetaPhlAn 3 can also natively handle paired-end metagenomes (but does not use the paired-end information),
and, more generally, metagenomes stored in multiple files (but you need to specify the --bowtie2out parameter):
$ metaphlan metagenome_1.fastq,metagenome_2.fastq --bowtie2out metagenome.bowtie2.bz2 --nproc 5
--input_type fastq > profiled_metagenome.txt
"""
input:
r1 = __metaphlan3_input_r1,
r2 = __metaphlan3_input_r2
output:
__metaphlan3_output
params:
exec_command = __metaphlan3_exec_command,
modules = __metaphlan3_modules,
input_type = __metaphlan3_input_type,
bowtie2out = "{output_dir}/{sample}.bowtie2.bz2".format(output_dir=__metaphlan3_output_dir, sample="{sample}"),
options = __metaphlan3_options
threads:
__metaphlan3_threads
run:
command = []
if params.modules:
command.append("module load {params.modules}")
command.append("{params.exec_command} --nproc {threads} --input_type {params.input_type} --bowtie2out {params.bowtie2out} {params.options} {input.r1},{input.r2} {output}")
shell(" && ".join(command))
tools/metaphlan3/metaphlan/paired/config_example.yaml
0 → 100644
View file @
4134975f
input_dir
:
data
metaphlan3
:
threads
:
1
input_type
:
fastq
options
:
"
"
pair_suffix
:
"
"
exec_command
:
metaphlan
tools/metaphlan3/metaphlan/single/Snakefile
0 → 100644
View file @
4134975f
__metaphlan3_exec_command = config.get('metaphlan3', {}).get('exec_command', 'metaphlan')
__metaphlan3_modules = config.get('metaphlan3', {}).get('modules')
__metaphlan3_input_type = config['metaphlan3'].get('input_type', 'fastq')
__metaphlan3_options = config.get('metaphlan3', {}).get('options', "")
__metaphlan3_threads = config.get('metaphlan3', {}).get('threads', 1)
rule metaphlan3:
input:
__metaphlan3_input
output:
__metaphlan3_output
params:
exec_command = __metaphlan3_exec_command,
modules = __metaphlan3_modules,
input_type = __metaphlan3_input_type,
bowtie2out = "{output_dir}/{sample}.bowtie2.bz2".format(output_dir=__metaphlan3_output_dir, sample="{sample}"),
options = __metaphlan3_options
threads:
__metaphlan3_threads
run:
command = []
if params.modules:
command.append("module load {params.modules}")
command.append("{params.exec_command} --nproc {threads} --input_type {params.input_type} --bowtie2out {params.bowtie2out} {params.options} {input} {output}")
shell(" && ".join(command))
tools/metaphlan3/metaphlan/single/config_example.yaml
0 → 100644
View file @
4134975f
input_dir
:
data
metaphlan3
:
threads
:
1
input_type
:
fastq
options
:
"
--bowtie2db
/pasteur/projets/policy01/Atm/DBs/metaphlan/metaphlan3bowtie2db/"
exec_command
:
metaphlan
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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