Skip to content

Commit

Permalink
Used hardcoded numbers of helper threads for samtools
Browse files Browse the repository at this point in the history
  • Loading branch information
bede committed Jul 6, 2023
1 parent dd5714e commit a733b7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hostile/aligner.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,13 @@ def gen_paired_clean_cmd(
# Count reads in stream before filtering (2048 + 256 = 2304)
f" | tee >(samtools view -F 2304 -c - > '{count_before_path}')"
# Discard mapped reads and reads with mapped mates
f" | samtools view --threads {int(threads/2)} -f 12 -"
f" | samtools view -f 12 -"
# Count reads in stream after filtering
f" | tee >(samtools view -F 256 -c - > '{count_after_path}')"
# Replace paired read headers with integers
f' | awk \'BEGIN{{FS=OFS="\\t"}} {{$1=int((NR+1)/2)" "; print $0}}\''
# Stream remaining records into fastq files
f" | samtools fastq --threads {int(threads/2)} -c 6 -N -1 '{fastq1_out_path}' -2 '{fastq2_out_path}'"
f" | samtools fastq --threads 2 -c 6 -N -1 '{fastq1_out_path}' -2 '{fastq2_out_path}'"
)
logging.debug(f"{cmd}")
return cmd

0 comments on commit a733b7a

Please sign in to comment.