-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use subworkflows/local/bam_bedgraph_bigwig_bedtools_ucsc from nf-core…
…/atacseq
- Loading branch information
Bjorn Langer
authored and
Bjorn Langer
committed
Jul 4, 2024
1 parent
50915a7
commit f170418
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
// | ||
// Convert BAM to normalised bigWig via bedGraph using BEDTools and UCSC | ||
// | ||
|
||
include { BEDTOOLS_GENOMECOV } from '../../modules/local/bedtools_genomecov' | ||
include { UCSC_BEDGRAPHTOBIGWIG } from '../../modules/nf-core/ucsc/bedgraphtobigwig/main' | ||
|
||
workflow BAM_BEDGRAPH_BIGWIG_BEDTOOLS_UCSC { | ||
take: | ||
ch_bam_flagstat // channel: [ val(meta), [bam], [flagstat] ] | ||
ch_chrom_sizes // channel: [ bed ] | ||
|
||
main: | ||
|
||
ch_versions = Channel.empty() | ||
|
||
// | ||
// Create bedGraph coverage track | ||
// | ||
BEDTOOLS_GENOMECOV ( | ||
ch_bam_flagstat | ||
) | ||
ch_versions = ch_versions.mix(BEDTOOLS_GENOMECOV.out.versions.first()) | ||
|
||
// | ||
// Create bigWig coverage tracks | ||
// | ||
UCSC_BEDGRAPHTOBIGWIG ( | ||
BEDTOOLS_GENOMECOV.out.bedgraph, | ||
ch_chrom_sizes | ||
) | ||
ch_versions = ch_versions.mix(UCSC_BEDGRAPHTOBIGWIG.out.versions.first()) | ||
|
||
emit: | ||
bedgraph = BEDTOOLS_GENOMECOV.out.bedgraph // channel: [ val(meta), [ bedgraph ] ] | ||
scale_factor = BEDTOOLS_GENOMECOV.out.scale_factor // channel: [ val(meta), [ txt ] ] | ||
|
||
bigwig = UCSC_BEDGRAPHTOBIGWIG.out.bigwig // channel: [ val(meta), [ bigwig ] ] | ||
|
||
versions = ch_versions // channel: [ versions.yml ] | ||
} |