Snakefile 1.07 KB
Newer Older
Kenzo-Hugo Hillion's avatar
Kenzo-Hugo Hillion committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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}")
Kenzo-Hugo Hillion's avatar
Kenzo-Hugo Hillion committed
15
16
17
18
19
20
__bedtools_bamtofastq_pairs_output_forward_name = "{dir}/{{sample}}_1".format(
    dir=__bedtools_bamtofastq_pairs_output_dir, sample="{sample}"
)
__bedtools_bamtofastq_pairs_output_reverse_name = "{dir}/{{sample}}_2".format(
    dir=__bedtools_bamtofastq_pairs_output_dir, sample="{sample}"
)
Kenzo-Hugo Hillion's avatar
Kenzo-Hugo Hillion committed
21
22
23
include: __bedtools_bamtofastq_pairs_rules

rule all:
Kenzo-Hugo Hillion's avatar
Kenzo-Hugo Hillion committed
24
25
26
    input:
        forward = expand(f"{__bedtools_bamtofastq_pairs_output_forward_name}.fq.gz", sample=SAMPLES),
        reverse = expand(f"{__bedtools_bamtofastq_pairs_output_reverse_name}.fq.gz", sample=SAMPLES)