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
deffb1dd
Commit
deffb1dd
authored
Jul 20, 2021
by
Kenzo-Hugo Hillion
♻
Browse files
start snakemake for samtools view
parent
05042bc7
Changes
3
Hide whitespace changes
Inline
Side-by-side
tools/samtools/view/Snakefile
0 → 100644
View file @
deffb1dd
__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
tools/samtools/view/example_usage/Snakefile
0 → 100644
View file @
deffb1dd
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)
tools/samtools/view/example_usage/config.yaml
0 → 100644
View file @
deffb1dd
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"
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