-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update all modules + fix path to subworkflows
- Loading branch information
Showing
20 changed files
with
861 additions
and
757 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
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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,43 @@ | ||
// | ||
// MARKDUPLICATES AND QC after mapping | ||
// | ||
// For all modules here: | ||
// A when clause condition is defined in the conf/modules.config to determine if the module should be run | ||
|
||
include { CRAM_QC_MOSDEPTH_SAMTOOLS } from '../cram_qc_mosdepth_samtools/main' | ||
include { GATK4_MARKDUPLICATES } from '../../../modules/nf-core/gatk4/markduplicates/main' | ||
|
||
workflow BAM_MARKDUPLICATES { | ||
take: | ||
bam // channel: [mandatory] [ meta, bam ] | ||
fasta // channel: [mandatory] [ fasta ] | ||
fasta_fai // channel: [mandatory] [ fasta_fai ] | ||
intervals_bed_combined // channel: [optional] [ intervals_bed ] | ||
|
||
main: | ||
versions = Channel.empty() | ||
reports = Channel.empty() | ||
|
||
// RUN MARKDUPLICATES | ||
GATK4_MARKDUPLICATES(bam, fasta, fasta_fai) | ||
|
||
// Join with the crai file | ||
cram = GATK4_MARKDUPLICATES.out.cram.join(GATK4_MARKDUPLICATES.out.crai, failOnDuplicate: true, failOnMismatch: true) | ||
|
||
// QC on CRAM | ||
CRAM_QC_MOSDEPTH_SAMTOOLS(cram, fasta, intervals_bed_combined) | ||
|
||
// Gather all reports generated | ||
reports = reports.mix(GATK4_MARKDUPLICATES.out.metrics) | ||
reports = reports.mix(CRAM_QC_MOSDEPTH_SAMTOOLS.out.reports) | ||
|
||
// Gather versions of all tools used | ||
versions = versions.mix(GATK4_MARKDUPLICATES.out.versions) | ||
versions = versions.mix(CRAM_QC_MOSDEPTH_SAMTOOLS.out.versions) | ||
|
||
emit: | ||
cram | ||
reports | ||
|
||
versions // channel: [ versions.yml ] | ||
} |
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
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
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,38 @@ | ||
// | ||
// QC on CRAM | ||
// | ||
// For all modules here: | ||
// A when clause condition is defined in the conf/modules.config to determine if the module should be run | ||
|
||
include { SAMTOOLS_STATS } from '../../../modules/nf-core/samtools/stats/main' | ||
include { MOSDEPTH } from '../../../modules/nf-core/mosdepth/main' | ||
|
||
workflow CRAM_QC_MOSDEPTH_SAMTOOLS { | ||
take: | ||
cram // channel: [mandatory] [ meta, cram, crai ] | ||
fasta // channel: [mandatory] [ fasta ] | ||
intervals | ||
|
||
main: | ||
versions = Channel.empty() | ||
reports = Channel.empty() | ||
|
||
// Reports run on cram | ||
SAMTOOLS_STATS(cram, fasta.map{ it -> [ [ id:'fasta' ], it ] }) | ||
|
||
MOSDEPTH(cram.combine(intervals.map{ meta, bed -> [ bed?:[] ] }), fasta.map{ it -> [ [ id:'fasta' ], it ] }) | ||
|
||
// Gather all reports generated | ||
reports = reports.mix(SAMTOOLS_STATS.out.stats) | ||
reports = reports.mix(MOSDEPTH.out.global_txt) | ||
reports = reports.mix(MOSDEPTH.out.regions_txt) | ||
|
||
// Gather versions of all tools used | ||
versions = versions.mix(MOSDEPTH.out.versions) | ||
versions = versions.mix(SAMTOOLS_STATS.out.versions.first()) | ||
|
||
emit: | ||
reports | ||
|
||
versions // channel: [ versions.yml ] | ||
} |
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
Oops, something went wrong.