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
93e24e41
Commit
93e24e41
authored
Aug 02, 2021
by
Kenzo-Hugo Hillion
♻
Browse files
start bedtools bamtofastq
parent
1998065a
Changes
4
Hide whitespace changes
Inline
Side-by-side
tools/bedtools/bamtofastq_pairs/Snakefile
0 → 100644
View file @
93e24e41
__bedtools_bamtofastq_pairs_bedtools_exec_command = config.get(
'bedtools_bamtofastq_pairs', {}
).get('bedtools_exec_command', 'bedtools')
__bedtools_bamtofastq_pairs_modules = config.get('bedtools_bamtofastq_pairs', {}).get('modules')
rule bedtools_bamtofastq_pairs:
input:
__bedtools_bamtofastq_pairs_input
output:
forward = __bedtools_bamtofastq_pairs_output_forward,
reverse = __bedtools_bamtofastq_pairs_output_reverse
params:
exec_command = __bedtools_bamtofastq_pairs_bedtools_exec_command,
modules = __bedtools_bamtofastq_pairs_modules
run:
command = []
if params.modules:
command.append("module load {params.modules}")
command.append(
"{params.exec_command} bamtofastq -i {input} -fq {output.forward}.fastq -fq2 {output.reverse}.fastq"
)
command.append("gunzip {output}_1.fastq")
command.append("gunzip {output}_2.fastq")
shell(" && ".join(command))
\ No newline at end of file
tools/bedtools/bamtofastq_pairs/example_usage/Snakefile
0 → 100644
View file @
93e24e41
configfile: "config.yaml"
# ==== Snakefile path ====
__bedtools_bamtofastq_pairs_rules = config.get("snakefiles", {}).get("bedtools_bamtofastq_pairs")
__main_output_dir = config.get('output_dir', 'output')
# ==== Main config ====
SAMPLES = config.get('samples')
__input_dir = config.get('input_dir', 'data')
# ==== Bedtools bamtofastq ====
__bedtools_bamtofastq_pairs_output_dir = f"{__main_output_dir}/bedtools_bamtofastq_pairs"
__bedtools_bamtofastq_pairs_input = "{dir}/{{sample}}.bam".format(dir=__input_dir, sample="{sample}")
__bedtools_bamtofastq_pairs_output = "{dir}/{{sample}}".format(dir=__bedtools_bamtofastq_pairs_output_dir, sample="{sample}")
include: __bedtools_bamtofastq_pairs_rules
rule all:
input: expand("{dir}/{{sample}}_unmapped.bam".format(dir=__bedtools_bamtofastq_pairs_output_dir), sample=SAMPLES)
tools/bedtools/bamtofastq_pairs/example_usage/config.yaml
0 → 100644
View file @
93e24e41
snakefiles
:
bedtools_bamtofastq_pairs
:
/pasteur/zeus/projets/p02/metasig/gitlab/snakemake/tools/bedtools/bamtofastq_pairs/Snakefile
input_dir
:
/some/input/directory
output_dir
:
/some/output/directory
samples
:
-
test_00000
-
test_00001
-
test_00002
bedtools_bamtofastq_pairs
:
bedtools_exec_command
:
bedtools
modules
:
bedtools
tools/samtools/extract_unmapped_pairs/example_usage/Snakefile
View file @
93e24e41
...
...
@@ -16,4 +16,4 @@ __extract_unmapped_pairs_output = "{dir}/{{sample}}_unmapped.bam".format(dir=__e
include: __extract_unmapped_pairs_rules
rule all:
input: expand("{dir}/{{sample}}_unmapped.bam".format(dir=__
in
put_dir), sample=SAMPLES)
input: expand("{dir}/{{sample}}_unmapped.bam".format(dir=__
extract_unmapped_pairs_out
put_dir), sample=SAMPLES)
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