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: ...@@ -10,8 +10,7 @@ rule extract_unmapped_pairs:
__extract_unmapped_pairs_output __extract_unmapped_pairs_output
params: params:
exec_command = __extract_unmapped_pairs_samtools_exec_command, exec_command = __extract_unmapped_pairs_samtools_exec_command,
modules = __extract_unmapped_pairs_modules, modules = __extract_unmapped_pairs_modules
options = __extract_unmapped_pairs_options
run: run:
command = [] command = []
if params.modules: if params.modules:
...@@ -22,4 +21,5 @@ rule extract_unmapped_pairs: ...@@ -22,4 +21,5 @@ rule extract_unmapped_pairs:
command.append( command.append(
"{params.exec_command} merge -u - {output}.tmps[123].bam | {params.exec_command} sort -n > {output}" "{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)) shell(" && ".join(command))
...@@ -10,12 +10,9 @@ SAMPLES = config.get('samples') ...@@ -10,12 +10,9 @@ SAMPLES = config.get('samples')
__input_dir = config.get('input_dir', 'data') __input_dir = config.get('input_dir', 'data')
# ==== Extract unmapped pairs ==== # ==== Extract unmapped pairs ====
__extract_unmapped_pairs_input = expand( __extract_unmapped_pairs_output_dir = f"{__main_output_dir}/extract_unmapped_pairs"
"{dir}/{{sample}}.bam".format(dir=__input_dir), sample=SAMPLES __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}")
__extract_unmapped_pairs_output = expand(
"{dir}/{{sample}}_unmapped.bam".format(dir=__input_dir), sample=SAMPLES
)
include: __extract_unmapped_pairs_rules include: __extract_unmapped_pairs_rules
rule all: rule all:
......
Supports Markdown
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