Skip to content
Snippets Groups Projects
Commit c7cb5e46 authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion :recycle:
Browse files

start Snakefile to extract unmapped pairs

parent deffb1dd
No related branches found
No related tags found
1 merge request!7Resolve "get unmapped reads"
__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))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment