Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/images/nf-core-methylseq-dark.png">
<img alt="nf-core/methylseq" src="docs/images/nf-core-methylseq-light.png">
<source media="(prefers-color-scheme: dark)" srcset="docs/images/nf-core-methylseq_logo_dark.png">
<img alt="nf-core/methylseq" src="docs/images/nf-core-methylseq_logo_light.png">
</picture>
</h1>

Expand Down
Binary file modified assets/nf-core-methylseq_logo_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions conf/modules/bwamem_align.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
process {
withName: BWA_MEM {
ext.args = ''
publishDir = [
path: { "${params.outdir}/${params.aligner}/alignments" },
pattern: "*.bam",
mode: params.publish_dir_mode,
enabled: params.save_align_intermeds
]
}
}
1 change: 0 additions & 1 deletion conf/modules/bwameth_align.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
process {
withName: BWAMETH_ALIGN {
cache = 'lenient' // This is set because in the module command the index files are touched so as to have bwameth not complain
ext.args = ''
publishDir = [
path: { "${params.outdir}/${params.aligner}/alignments" },
Expand Down
21 changes: 2 additions & 19 deletions conf/modules/samtools_sort.config
Original file line number Diff line number Diff line change
@@ -1,29 +1,12 @@
process {
withName: SAMTOOLS_SORT {
ext.prefix = params.skip_deduplication ? { "${meta.id}.sorted" } : { "${meta.id}.deduplicated.sorted" }
ext.prefix = { "${meta.id}.sorted" }
publishDir = [
[
path: { "${params.outdir}/${params.aligner}/deduplicated/" },
mode: params.publish_dir_mode,
pattern: "*.deduplicated.sorted.bam"
],
[
path: { "${params.outdir}/${params.aligner}/alignments/" },
mode: params.publish_dir_mode,
pattern: "*.sorted.bam",
enabled: params.skip_deduplication
],
[
path: { "${params.outdir}/${params.aligner}/deduplicated/" },
mode: params.publish_dir_mode,
pattern: "*markdup*.bam",
enabled: params.save_align_intermeds
],
[
path: { "${params.outdir}/${params.aligner}/alignments/" },
mode: params.publish_dir_mode,
pattern: "*.bam",
enabled: params.save_align_intermeds
enabled: params.skip_deduplication || params.save_align_intermeds
]
]
}
Expand Down
22 changes: 22 additions & 0 deletions conf/subworkflows/fastq_align_dedup_bismark.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,25 @@ includeConfig "../modules/bismark_methylationextractor.config"
includeConfig "../modules/bismark_coverage2cytosine.config"
includeConfig "../modules/bismark_report.config"
includeConfig "../modules/bismark_summary.config"

// Override SAMTOOLS_SORT for bismark workflow
// In bismark, deduplication (BISMARK_DEDUPLICATE) happens BEFORE sorting,
// so the BAM input to SAMTOOLS_SORT is already deduplicated when skip_deduplication is false
process {
withName: SAMTOOLS_SORT {
ext.prefix = params.skip_deduplication ? { "${meta.id}.sorted" } : { "${meta.id}.deduplicated.sorted" }
publishDir = [
[
path: { "${params.outdir}/${params.aligner}/deduplicated/" },
mode: params.publish_dir_mode,
pattern: "*.deduplicated.sorted.bam"
],
[
path: { "${params.outdir}/${params.aligner}/alignments/" },
mode: params.publish_dir_mode,
pattern: "*.sorted.bam",
enabled: params.skip_deduplication
]
]
}
}
4 changes: 3 additions & 1 deletion conf/subworkflows/fastq_align_dedup_bwamem.config
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
includeConfig "../modules/bwamem_align.config"
includeConfig "../modules/picard_addorreplacereadgroups.config"
includeConfig "../modules/picard_removeduplicates.config"
includeConfig "../modules/picard_markduplicates.config"
includeConfig "../modules/samtools_index.config"
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ manifest {
name: 'Eduard Casas',
affiliation: 'Watchmaker Genomics',
email: '[email protected]',
github: 'https://github.com/',
github: 'https://github.com/eduard-watchmaker',
contribution: ['contributor', 'maintainer'], // List of contribution types ('author', 'maintainer' or 'contributor')
orcid: '0000-0002-6001-1276'
]
Expand Down
57 changes: 31 additions & 26 deletions workflows/methylseq/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

include { paramsSummaryMap } from 'plugin/nf-schema'
include { FASTQC } from '../../modules/nf-core/fastqc/main'
include { TRIMGALORE } from '../../modules/nf-core/trimgalore/main'
include { QUALIMAP_BAMQC } from '../../modules/nf-core/qualimap/bamqc/main'
include { PRESEQ_LCEXTRAP } from '../../modules/nf-core/preseq/lcextrap/main'
include { MULTIQC } from '../../modules/nf-core/multiqc/main'
include { CAT_FASTQ } from '../../modules/nf-core/cat/fastq/main'
include { FASTQ_ALIGN_DEDUP_BISMARK } from '../../subworkflows/nf-core/fastq_align_dedup_bismark/main'
include { FASTQ_ALIGN_DEDUP_BWAMETH } from '../../subworkflows/nf-core/fastq_align_dedup_bwameth/main'
include { FASTQ_ALIGN_DEDUP_BWAMEM } from '../../subworkflows/nf-core/fastq_align_dedup_bwamem/main'
include { PICARD_MARKDUPLICATES } from '../../modules/nf-core/picard/markduplicates/main'
include { paramsSummaryMap } from 'plugin/nf-schema'
include { FASTQC } from '../../modules/nf-core/fastqc/main'
include { TRIMGALORE } from '../../modules/nf-core/trimgalore/main'
include { QUALIMAP_BAMQC } from '../../modules/nf-core/qualimap/bamqc/main'
include { PRESEQ_LCEXTRAP } from '../../modules/nf-core/preseq/lcextrap/main'
include { MULTIQC } from '../../modules/nf-core/multiqc/main'
include { CAT_FASTQ } from '../../modules/nf-core/cat/fastq/main'
include { FASTQ_ALIGN_DEDUP_BISMARK } from '../../subworkflows/nf-core/fastq_align_dedup_bismark/main'
include { FASTQ_ALIGN_DEDUP_BWAMETH } from '../../subworkflows/nf-core/fastq_align_dedup_bwameth/main'
include { FASTQ_ALIGN_DEDUP_BWAMEM } from '../../subworkflows/nf-core/fastq_align_dedup_bwamem/main'
include { PICARD_MARKDUPLICATES } from '../../modules/nf-core/picard/markduplicates/main'
include { PICARD_ADDORREPLACEREADGROUPS } from '../../modules/nf-core/picard/addorreplacereadgroups/main'
include { SAMTOOLS_INDEX } from '../../modules/nf-core/samtools/index/main'
include { paramsSummaryMultiqc } from '../../subworkflows/nf-core/utils_nfcore_pipeline'
include { softwareVersionsToYAML } from '../../subworkflows/nf-core/utils_nfcore_pipeline'
include { methodsDescriptionText } from '../../subworkflows/local/utils_nfcore_methylseq_pipeline'
include { validateInputSamplesheet } from '../../subworkflows/local/utils_nfcore_methylseq_pipeline'
include { BAM_TAPS_CONVERSION } from '../../subworkflows/nf-core/bam_taps_conversion'
include { BAM_METHYLDACKEL } from '../../subworkflows/nf-core/bam_methyldackel/main'
include { TARGETED_SEQUENCING } from '../../subworkflows/local/targeted_sequencing'
include { SAMTOOLS_INDEX } from '../../modules/nf-core/samtools/index/main'
include { paramsSummaryMultiqc } from '../../subworkflows/nf-core/utils_nfcore_pipeline'
include { softwareVersionsToYAML } from '../../subworkflows/nf-core/utils_nfcore_pipeline'
include { methodsDescriptionText } from '../../subworkflows/local/utils_nfcore_methylseq_pipeline'
include { validateInputSamplesheet } from '../../subworkflows/local/utils_nfcore_methylseq_pipeline'
include { BAM_TAPS_CONVERSION } from '../../subworkflows/nf-core/bam_taps_conversion'
include { BAM_METHYLDACKEL } from '../../subworkflows/nf-core/bam_methyldackel/main'
include { TARGETED_SEQUENCING } from '../../subworkflows/local/targeted_sequencing'

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -52,6 +52,10 @@ workflow METHYLSEQ {
ch_gzi = channel.empty()
ch_bedgraph = channel.empty()
ch_aligner_mqc = channel.empty()
ch_rastair_mbias = channel.empty()
ch_rastair_call = channel.empty()
ch_methylkit = channel.empty()
ch_mbias = channel.empty()
ch_qualimap = channel.empty()
ch_preseq = channel.empty()
ch_multiqc_files = channel.empty()
Expand Down Expand Up @@ -108,9 +112,8 @@ workflow METHYLSEQ {
// SUBWORKFLOW: Align reads, deduplicate and extract methylation with Bismark
//

if (params.taps & params.aligner != 'bwamem') {
if (params.taps && params.aligner != 'bwamem') {
log.info "TAPS protocol detected and aligner is not 'bwamem'. We recommend using bwa-mem for TAPS protocol as it is optimized for this type of data."
// params.aligner = 'bwamem'
}

// Aligner: bismark or bismark_hisat
Expand Down Expand Up @@ -187,10 +190,7 @@ workflow METHYLSEQ {
ch_bwamem_inputs.fasta,
ch_bwamem_inputs.fasta_index,
ch_bwamem_inputs.bwamem_index,
params.skip_deduplication,
workflow.profile.tokenize(',').intersect(['gpu']).size() >= 1,
// [[],[]], // interval file
// [[],[]] // known sites file
params.skip_deduplication
)

ch_bam = FASTQ_ALIGN_DEDUP_BWAMEM.out.bam
Expand Down Expand Up @@ -233,7 +233,7 @@ workflow METHYLSEQ {
//
// Subworkflow: Count negative C->T conversion rates as a readout for DNA methylation
//
else if (!params.taps && (params.aligner == 'bwameth' || (params.aligner == 'bwamem'))) {
else if (!params.taps && params.aligner == 'bwameth') {

ch_bam_bai = ch_bam.join(ch_bai)
ch_methyldackel_inputs = ch_bam_bai
Expand Down Expand Up @@ -400,6 +400,11 @@ workflow METHYLSEQ {
emit:
bam = ch_bam // channel: [ val(meta), path(bam) ]
bai = ch_bai // channel: [ val(meta), path(bai) ]
rastair_mbias = ch_rastair_mbias // channel: [ val(meta), path(rastair_mbias) ]
rastair_call = ch_rastair_call // channel: [ val(meta), path(rastair_call) ]
methylkit = ch_methylkit // channel: [ val(meta), path(methylkit) ]
mbias = ch_mbias // channel: [ val(meta), path(mbias) ]
bedgraph = ch_bedgraph // channel: [ val(meta), path(bedgraph) ]
qualimap = ch_qualimap // channel: [ val(meta), path(qualimap) ]
preseq = ch_preseq // channel: [ val(meta), path(preseq) ]
multiqc_report = ch_multiqc_report // channel: [ path(multiqc_report.html ) ]
Expand Down
Loading