Skip to content

Commit

Permalink
Fix bedtiools coverage in DSL1
Browse files Browse the repository at this point in the history
Remove the `-sorted` flag so `bedtools` won't assume that the reference genome file is sorted.
  • Loading branch information
IdoBar authored Dec 12, 2023
1 parent a2c9f87 commit 3aa2ecc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2068,8 +2068,8 @@ process bedtools {
samtools view -H ${bam} | grep '@SQ' | sed 's#@SQ\tSN:\\|LN:##g' > genome.txt
## Run bedtools
bedtools coverage -nonamecheck -g genome.txt -sorted -a ${anno_file} -b ${bam} | pigz -p ${task.cpus - 1} > "${bam.baseName}".breadth.gz
bedtools coverage -nonamecheck -g genome.txt -sorted -a ${anno_file} -b ${bam} -mean | pigz -p ${task.cpus - 1} > "${bam.baseName}".depth.gz
bedtools coverage -nonamecheck -g genome.txt -a ${anno_file} -b ${bam} | pigz -p ${task.cpus - 1} > "${bam.baseName}".breadth.gz
bedtools coverage -nonamecheck -g genome.txt -a ${anno_file} -b ${bam} -mean | pigz -p ${task.cpus - 1} > "${bam.baseName}".depth.gz
"""
}

Expand Down

0 comments on commit 3aa2ecc

Please sign in to comment.