Skip to content

Commit

Permalink
Merge pull request #454 from broadinstitute/dp-reports
Browse files Browse the repository at this point in the history
samtools ampliconstats needs bed in certain order
  • Loading branch information
dpark01 authored Mar 9, 2023
2 parents 6642d26 + 3ae61d3 commit 1256728
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pipes/WDL/tasks/tasks_reports.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@ task alignment_metrics {
echo -e "sample_sanitized\tbam\tamplicon_set\tamplicon_idx\tamplicon_left\tamplicon_right\tFREADS\tFDEPTH\tFPCOV\tFAMP" > "~{out_basename}.ampliconstats_parsed.txt"
if [ -n "~{primers_bed}" ]; then
# samtools ampliconstats
cat "~{primers_bed}" | sort -k 4 -t $'\t' > primers-sorted_for_samtools.bed
samtools ampliconstats -s -@ $(nproc) \
~{'-d ' + min_coverage} \
~{'-l ' + max_amp_len} \
~{'-a ' + max_amplicons} \
-o "~{out_basename}".ampliconstats.txt "~{primers_bed}" "~{aligned_bam}"
-o "~{out_basename}".ampliconstats.txt primers-sorted_for_samtools.bed "~{aligned_bam}"

# parse into our own tsv to facilitate tsv joining later
if [ -n "~{default='' amplicon_set}" ]; then
Expand Down

0 comments on commit 1256728

Please sign in to comment.