Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use subworkflows/local/bam_bedgraph_bigwig_bedtools_ucsc from nf-core… #399

Merged
merged 5 commits into from
Jul 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions subworkflows/local/bam_bedgraph_bigwig_bedtools_ucsc.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

bjlang marked this conversation as resolved.
Show resolved Hide resolved
//
// 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 ]
}
Loading