File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -453,7 +453,17 @@ process {
453453 }
454454
455455 withName: '.*:BAM_BEDGRAPH_BIGWIG_BEDTOOLS_UCSC:BEDTOOLS_GENOMECOV' {
456- ext.args = { (meta.single_end && params.fragment_size > 0) ? "-fs ${params.fragment_size}" : '' }
456+ ext.args = {
457+ def args = []
458+ // Include fragment size only for single-end data
459+ if (meta.single_end && params.fragment_size > 0) {
460+ args << "-fs ${params.fragment_size}"
461+ }
462+ // Use -bga instead of -bg to include zero-coverage bins
463+ // This results in lower background levels and better IGV visualization
464+ args << "-bga"
465+ return args.join(' ')
466+ }
457467 ext.prefix = { "${meta.id}.mLB.clN" }
458468 publishDir = [
459469 [
Original file line number Diff line number Diff line change @@ -26,13 +26,9 @@ process BEDTOOLS_GENOMECOV {
2626 SCALE_FACTOR=\$ (grep '[0-9] mapped (' $flagstat | awk '{print 1000000/\$ 1}')
2727 echo \$ SCALE_FACTOR > ${ prefix} .scale_factor.txt
2828
29- # Use --bga instead of -bg to include zero-coverage bins in output
30- # This results in lower background levels and better visualization in IGV
31- # Users can override this by specifying -bg in ext.args if needed
3229 bedtools \\
3330 genomecov \\
3431 -ibam $bam \\
35- --bga \\
3632 -scale \$ SCALE_FACTOR \\
3733 $pe \\
3834 $args \\
You can’t perform that action at this time.
0 commit comments