File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2054,8 +2054,12 @@ process bedtools {
20542054
20552055 script:
20562056 """
2057- bedtools coverage -nonamecheck -a ${ anno_file} -b $bam | pigz -p ${ task.cpus - 1} > "${ bam.baseName} ".breadth.gz
2058- bedtools coverage -nonamecheck -a ${ anno_file} -b $bam -mean | pigz -p ${ task.cpus - 1} > "${ bam.baseName} ".depth.gz
2057+ ## Create genome file from bam header
2058+ samtools view -H ${ bam} | grep @SQ | sed 's/@SQ\t SN:\| LN://g' > genome.txt
2059+
2060+ ## Run bedtools
2061+ bedtools coverage -nonamecheck -g genome.txt -sorted -a ${ anno_file} -b ${ bam} | pigz -p ${ task.cpus - 1} > "${ bam.baseName} ".breadth.gz
2062+ bedtools coverage -nonamecheck -g genome.txt -sorted -a ${ anno_file} -b ${ bam} -mean | pigz -p ${ task.cpus - 1} > "${ bam.baseName} ".depth.gz
20592063 """
20602064}
20612065
You can’t perform that action at this time.
0 commit comments