Commit 1998065a authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion
Browse files

update extract of unmapped pairs with samtools

parent bca19306
......@@ -10,8 +10,7 @@ rule extract_unmapped_pairs:
__extract_unmapped_pairs_output
params:
exec_command = __extract_unmapped_pairs_samtools_exec_command,
modules = __extract_unmapped_pairs_modules,
options = __extract_unmapped_pairs_options
modules = __extract_unmapped_pairs_modules
run:
command = []
if params.modules:
......@@ -22,4 +21,5 @@ rule extract_unmapped_pairs:
command.append(
"{params.exec_command} merge -u - {output}.tmps[123].bam | {params.exec_command} sort -n > {output}"
)
command.append("rm {output}.tmps[123].bam")
shell(" && ".join(command))
......@@ -10,12 +10,9 @@ SAMPLES = config.get('samples')
__input_dir = config.get('input_dir', 'data')
# ==== Extract unmapped pairs ====
__extract_unmapped_pairs_input = expand(
"{dir}/{{sample}}.bam".format(dir=__input_dir), sample=SAMPLES
)
__extract_unmapped_pairs_output = expand(
"{dir}/{{sample}}_unmapped.bam".format(dir=__input_dir), sample=SAMPLES
)
__extract_unmapped_pairs_output_dir = f"{__main_output_dir}/extract_unmapped_pairs"
__extract_unmapped_pairs_input = "{dir}/{{sample}}.bam".format(dir=__input_dir, sample="{sample}")
__extract_unmapped_pairs_output = "{dir}/{{sample}}_unmapped.bam".format(dir=__extract_unmapped_pairs_output_dir, sample="{sample}")
include: __extract_unmapped_pairs_rules
rule all:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment