Skip to content

Commit

Permalink
initial downsample work
Browse files Browse the repository at this point in the history
  • Loading branch information
dpark01 committed Nov 25, 2024
1 parent b8bb70b commit edd3027
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion pipes/WDL/tasks/tasks_assembly.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@ task refine_assembly_with_aligned_reads {
Boolean mark_duplicates = false
Float major_cutoff = 0.5
Int min_coverage = 3
Int? max_coverage
Int machine_mem_gb = 15
String docker = "quay.io/broadinstitute/viral-assemble:2.3.6.1"
Expand Down Expand Up @@ -757,9 +758,20 @@ task refine_assembly_with_aligned_reads {
assembly.py --version | tee VERSION
if [[ ~{default="0" max_coverage} -gt 0 ]]; then
rasusa aln -O sam \
--step-size 200 \
--coverage ~{max_coverage} \
"~{reads_aligned_bam}" \
| samtools sort -o temp_maxcov.bam -@ $(nproc) -l 1
else
ln -s "~{reads_aligned_bam}" temp_maxcov.bam
fi
samtools index -@ $(nproc) temp_maxcov.bam temp_maxcov.bai
if [ ~{true='true' false='false' mark_duplicates} == "true" ]; then
read_utils.py mkdup_picard \
~{reads_aligned_bam} \
temp_maxcov.bam \
temp_markdup.bam \
--JVMmemory "$mem_in_mb"m \
--loglevel=DEBUG
Expand Down

0 comments on commit edd3027

Please sign in to comment.