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

start Snakefile to extract unmapped pairs

parent deffb1dd
__extract_unmapped_pairs_samtools_exec_command = config.get(
'extract_unmapped_pairs', {}
).get('samtools_exec_command', 'samtools')
__extract_unmapped_pairs_modules = config.get('extract_unmapped_pairs', {}).get('modules')
rule extract_unmapped_pairs:
input:
__extract_unmapped_pairs_input
output:
__extract_unmapped_pairs_output
params:
exec_command = __extract_unmapped_pairs_samtools_exec_command,
modules = __extract_unmapped_pairs_modules,
options = __extract_unmapped_pairs_options
run:
command = []
if params.modules:
command.append("module load {params.modules}")
command.append("{params.exec_command} view -u -f 4 -F 264 {input} > {output}.tmps1.bam")
command.append("{params.exec_command} view -u -f 8 -F 260 {input} > {output}.tmps2.bam")
command.append("{params.exec_command} view -u -f 12 -F 256 {input} > {output}.tmps3.bam")
command.append(
"{params.exec_command} merge -u - {output}.tmps[123].bam | {params.exec_command} sort -n > {output}"
)
shell(" && ".join(command))
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