Skip to content

Commit

Permalink
update all modules + fix path to subworkflows
Browse files Browse the repository at this point in the history
  • Loading branch information
maxulysse committed Sep 18, 2023
1 parent 64a3dcd commit 519f412
Show file tree
Hide file tree
Showing 20 changed files with 861 additions and 757 deletions.
5 changes: 5 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@
"git_sha": "e06548bfa36ee31869b81041879dd6b3a83b1d57",
"installed_by": ["modules"]
},
"mosdepth": {
"branch": "master",
"git_sha": "ebb27711cd5f4de921244bfa81c676504072d31c",
"installed_by": ["modules"]
},
"multiqc": {
"branch": "master",
"git_sha": "a6e11ac655e744f7ebc724be669dd568ffdc0e80",
Expand Down
File renamed without changes.
31 changes: 0 additions & 31 deletions modules/local/samplesheet_check.nf

This file was deleted.

80 changes: 80 additions & 0 deletions modules/nf-core/mosdepth/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

109 changes: 109 additions & 0 deletions modules/nf-core/mosdepth/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Alignment with STAR
//

include { STAR_ALIGN } from '../../modules/nf-core/star/align/main'
include { BAM_SORT_SAMTOOLS } from './bam_sort_samtools'
include { STAR_ALIGN } from '../../../modules/nf-core/star/align/main'
include { BAM_SORT_SAMTOOLS } from '../bam_sort_samtools/main'

workflow ALIGN_STAR {
take:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// ANNOTATION
//

include { SNPEFF_ANNOTATE } from '../nf-core/snpeff_annotate'
include { ENSEMBLVEP_ANNOTATE as MERGE_ANNOTATE } from '../nf-core/ensemblvep_annotate'
include { ENSEMBLVEP_ANNOTATE } from '../nf-core/ensemblvep_annotate'
include { SNPEFF_ANNOTATE } from '../snpeff_annotate/main'
include { ENSEMBLVEP_ANNOTATE as MERGE_ANNOTATE } from '../ensemblvep_annotate/main'
include { ENSEMBLVEP_ANNOTATE } from '../ensemblvep_annotate/main'

workflow ANNOTATE {
take:
Expand Down
43 changes: 43 additions & 0 deletions subworkflows/local/bam_markduplicates/main.nf
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 ]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// Sort, index BAM file and run samtools stats, flagstat and idxstats
//

include { SAMTOOLS_SORT } from '../../modules/nf-core/samtools/sort/main'
include { SAMTOOLS_INDEX } from '../../modules/nf-core/samtools/index/main'
include { BAM_STATS_SAMTOOLS } from './bam_stats_samtools'
include { SAMTOOLS_SORT } from '../../../modules/nf-core/samtools/sort/main'
include { SAMTOOLS_INDEX } from '../../../modules/nf-core/samtools/index/main'
include { BAM_STATS_SAMTOOLS } from '../bam_stats_samtools/main'

workflow BAM_SORT_SAMTOOLS {
take:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// Run SAMtools stats, flagstat and idxstats
//

include { SAMTOOLS_STATS } from '../../modules/nf-core/samtools/stats/main'
include { SAMTOOLS_IDXSTATS } from '../../modules/nf-core/samtools/idxstats/main'
include { SAMTOOLS_FLAGSTAT } from '../../modules/nf-core/samtools/flagstat/main'
include { SAMTOOLS_STATS } from '../../../modules/nf-core/samtools/stats/main'
include { SAMTOOLS_IDXSTATS } from '../../../modules/nf-core/samtools/idxstats/main'
include { SAMTOOLS_FLAGSTAT } from '../../../modules/nf-core/samtools/flagstat/main'

workflow BAM_STATS_SAMTOOLS {
take:
Expand Down
38 changes: 38 additions & 0 deletions subworkflows/local/cram_qc_mosdepth_samtools/main.nf
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 ]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Run VEP to annotate VCF files
//

include { ENSEMBLVEP_VEP } from '../../modules/nf-core/ensemblvep/vep/main'
include { TABIX_BGZIPTABIX } from '../../modules/nf-core/tabix/bgziptabix/main'
include { ENSEMBLVEP_VEP } from '../../../modules/nf-core/ensemblvep/vep/main'
include { TABIX_BGZIPTABIX } from '../../../modules/nf-core/tabix/bgziptabix/main'

workflow ENSEMBLVEP_ANNOTATE {
take:
Expand Down
Loading

0 comments on commit 519f412

Please sign in to comment.