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
11a919a4
Commit
11a919a4
authored
May 09, 2019
by
Kenzo-Hugo Hillion
♻
Browse files
add example of workflow for metaphlan2
parent
9b792513
Changes
4
Hide whitespace changes
Inline
Side-by-side
tools/metaphlan2/metaphlan2_heatmap/metaphlan2_heatmap.rules
View file @
11a919a4
__metaphlan2_heatmap_exec_command = config['metaphlan2_heatmap']
[
'exec_command'
]
__metaphlan2_heatmap_exec_command = config['metaphlan2_heatmap']
.get(
'exec_command'
, "metaphlan_hclust_heatmap.py")
__metaphlan2_heatmap_options = config['metaphlan2_heatmap'].get('options', "")
rule heatmap:
...
...
workflows/simple_metaphlan2/README.md
0 → 100644
View file @
11a919a4
# Simple metaphlan2 workflow
This is a simple example of a workflow using metaphlan2.
## Example
An example is provided and is based on the
`config.yaml`
file. Singularity images are necessary for this example as well as the samples in the appropriate folder.
\ No newline at end of file
workflows/simple_metaphlan2/SnakeFile
0 → 100644
View file @
11a919a4
configfile: "config.yaml"
# ==== Rule paths ====
__metaphlan2_rules = "../../tools/metaphlan2/metaphlan2/metaphlan2.rules"
__metaphlan2_merge_rules = "../../tools/metaphlan2/metaphlan2_merge/metaphlan2_merge.rules"
__metaphlan2_heatmap_rules = "../../tools/metaphlan2/metaphlan2_heatmap/metaphlan2_heatmap.rules"
__input_dir = config['input_dir']
__main_output_dir = config.get('output_dir', 'output')
# ---- Metaphlan2
__metaphlan2_output_dir = __main_output_dir + "/metaphlan2"
__metaphlan2_input_type = config['metaphlan2'].get('input_type', 'fastq')
__metaphlan2_input = "{dir}/{sample}.{ext}".format(dir=__input_dir,
sample="{sample}",
ext=__metaphlan2_input_type + ".gz")
__metaphlan2_output = "{dir}/{sample}.txt".format(dir=__metaphlan2_output_dir,
sample="{sample}")
include: __metaphlan2_rules
# ---- 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=__metaphlan2_output_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
# ---- 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 = __metaphlan2_merge_output
__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
workflows/simple_metaphlan2/config.yaml
0 → 100644
View file @
11a919a4
samples
:
-
SRS014459-Stool
-
SRS014464-Anterior_nares
-
SRS014470-Tongue_dorsum
-
SRS014472-Buccal_mucosa
-
SRS014476-Supragingival_plaque
-
SRS014494-Posterior_fornix
input_dir
:
/pasteur/homes/kehillio/Atm/kenzo/repo/workflow-benchmarking/data
output_dir
:
20190509_simplecase
metaphlan2
:
threads
:
4
input_type
:
fasta
exec_command
:
singularity run --bind /pasteur/ /pasteur/gaia/projets/p01/Atm/singularity/metaphlan2/metaphlan2.simg
metaphlan2_merge
:
exec_command
:
singularity run --app merge --bind /pasteur/ /pasteur/gaia/projets/p01/Atm/singularity/metaphlan2/metaphlan2.simg
metaphlan2_heatmap
:
exec_command
:
singularity run --app heatmap --bind /pasteur/ /pasteur/gaia/projets/p01/Atm/singularity/metaphlan2/metaphlan2.simg
output_name
:
snakemake_heatmap.png
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