diff --git a/conf/modules.config b/conf/modules.config index 9eeb18147b19c714969e770b59102b98a87c11c6..6a5ccd5f19dfee8372954c388f64c103e10145a4 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -212,6 +212,7 @@ process { mode: 'copy' ] ext.args = '--force' + ext.prefix = { "${meta.id}_balanced" } } withName: 'COOLER_DUMP' { @@ -262,7 +263,7 @@ process { //******************************** // TADS - withName: 'COOLTOOS_INSULATION' { + withName: 'COOLTOOLS_INSULATION' { publishDir = [ path: { "${params.outdir}/tads/insulation/" }, saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, diff --git a/modules.json b/modules.json index 5d64e0f011b77c9222196542f0bf156f87d17cd9..7d1fc471f7b55fc00860edc5a89abe7d5027f23a 100644 --- a/modules.json +++ b/modules.json @@ -74,13 +74,6 @@ "installed_by": [ "modules" ] - }, - "multiqc": { - "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] } } }, diff --git a/modules/local/cooltools/eigscis.nf b/modules/local/cooltools/eigscis.nf index 9af2a4d09e1e47013eb10c2e4289f7f617b76eb4..29a099c4883d060f2fc551279f3edbd109ef5076 100644 --- a/modules/local/cooltools/eigscis.nf +++ b/modules/local/cooltools/eigscis.nf @@ -3,6 +3,7 @@ */ process COOLTOOLS_EIGSCIS { + tag "${meta.id}" label 'process_medium' conda (params.enable_conda ? "bioconda::cooltools=0.5.1 bioconda::ucsc-bedgraphtobigwig=377" : null) diff --git a/modules/local/cooltools/insulation.nf b/modules/local/cooltools/insulation.nf index 0d7f8be3108b7ddf2f4424fbc3e16b9c6958542d..6557b980d0c586c9168f7ca89eb0e646a2cbee90 100644 --- a/modules/local/cooltools/insulation.nf +++ b/modules/local/cooltools/insulation.nf @@ -2,7 +2,8 @@ * Cooltools - diamond-insulation */ -process COOLER_INSULATION { +process COOLTOOLS_INSULATION { + tag "${meta.id}" label 'process_medium' conda (params.enable_conda ? "bioconda::cooltools=0.5.1" : null) diff --git a/modules/local/hicexplorer/hicPlotDistVsCounts.nf b/modules/local/hicexplorer/hicPlotDistVsCounts.nf index 4c7d05f40a4d5cfb486b6ea3748f668d2e88398a..86e9e3382e86910f3ad35eae876196e5f01f6928 100644 --- a/modules/local/hicexplorer/hicPlotDistVsCounts.nf +++ b/modules/local/hicexplorer/hicPlotDistVsCounts.nf @@ -1,8 +1,9 @@ /* - * hicexplorer - hicPlotDistVsCounts + * hicexplorer - Genomic distance/counts plots */ process HIC_PLOT_DIST_VS_COUNTS { + tag "${meta.id}" label 'process_medium' conda (params.enable_conda ? "bioconda::hicexplorer=3.7.2" : null) diff --git a/modules/local/hicpro/get_restriction_fragments.nf b/modules/local/hicpro/get_restriction_fragments.nf index 055db6a3045dee93da371bdc2e2bbb0f8df65cae..7b6b6a4bb904dba3facd83755e79841007ece47d 100644 --- a/modules/local/hicpro/get_restriction_fragments.nf +++ b/modules/local/hicpro/get_restriction_fragments.nf @@ -8,11 +8,11 @@ process GET_RESTRICTION_FRAGMENTS { 'quay.io/biocontainers/mulled-v2-c6ff206325681cbb9c9ef890bb8de554172c0483:713df51cd897ceb893b9a6e6420f527d83c2ed95-0'}" input: - path fasta + tuple val(meta), path(fasta) val(res_site) output: - path "*.bed", emit: results + tuple val(meta), path("*.bed"), emit: results path("versions.yml"), emit: versions script: diff --git a/modules/local/hicpro/get_valid_interaction.nf b/modules/local/hicpro/get_valid_interaction.nf index 2709cdee3530c26820708ef9fd341c424ea14b9a..4fef34d81abb89f4b325f67fe472f6c500a0acbc 100644 --- a/modules/local/hicpro/get_valid_interaction.nf +++ b/modules/local/hicpro/get_valid_interaction.nf @@ -9,7 +9,7 @@ process GET_VALID_INTERACTION { input: tuple val(meta), path(bam) - path(resfrag) + tuple val(meta2), path(resfrag) output: tuple val(meta), path("*.validPairs"), emit:valid_pairs diff --git a/modules/local/hicpro/hicpro2pairs.nf b/modules/local/hicpro/hicpro2pairs.nf index aa475c23e150be45e0166ee21103750e5c0f66d6..08222af13c320a28b3ce082f01dc6020a612f3e8 100644 --- a/modules/local/hicpro/hicpro2pairs.nf +++ b/modules/local/hicpro/hicpro2pairs.nf @@ -9,7 +9,7 @@ process HICPRO2PAIRS { input: tuple val(meta), path(vpairs) - path chrsize + tuple val(meta2), path(chrsize) output: tuple val(meta), path("*.pairs.gz"), path("*.pairs.gz.px2"), emit: pairs diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf deleted file mode 100644 index 68f66bea74a65319549b9834af05cc9a38a1f30a..0000000000000000000000000000000000000000 --- a/modules/nf-core/multiqc/main.nf +++ /dev/null @@ -1,53 +0,0 @@ -process MULTIQC { - label 'process_single' - - conda "bioconda::multiqc=1.13" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.13--pyhdfd78af_0' : - 'quay.io/biocontainers/multiqc:1.13--pyhdfd78af_0' }" - - input: - path multiqc_files, stageAs: "?/*" - path(multiqc_config) - path(extra_multiqc_config) - path(multiqc_logo) - - output: - path "*multiqc_report.html", emit: report - path "*_data" , emit: data - path "*_plots" , optional:true, emit: plots - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def config = multiqc_config ? "--config $multiqc_config" : '' - def extra_config = extra_multiqc_config ? "--config $extra_multiqc_config" : '' - """ - multiqc \\ - --force \\ - $args \\ - $config \\ - $extra_config \\ - . - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) - END_VERSIONS - """ - - stub: - """ - touch multiqc_data - touch multiqc_plots - touch multiqc_report.html - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) - END_VERSIONS - """ -} diff --git a/modules/nf-core/multiqc/meta.yml b/modules/nf-core/multiqc/meta.yml deleted file mode 100644 index ebc29b279d565eb11d8923de0b87fd2fb14b1cbe..0000000000000000000000000000000000000000 --- a/modules/nf-core/multiqc/meta.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: MultiQC -description: Aggregate results from bioinformatics analyses across many samples into a single report -keywords: - - QC - - bioinformatics tools - - Beautiful stand-alone HTML report -tools: - - multiqc: - description: | - MultiQC searches a given directory for analysis logs and compiles a HTML report. - It's a general use tool, perfect for summarising the output from numerous bioinformatics tools. - homepage: https://multiqc.info/ - documentation: https://multiqc.info/docs/ - licence: ["GPL-3.0-or-later"] - -input: - - multiqc_files: - type: file - description: | - List of reports / files recognised by MultiQC, for example the html and zip output of FastQC - - multiqc_config: - type: file - description: Optional config yml for MultiQC - pattern: "*.{yml,yaml}" - - extra_multiqc_config: - type: file - description: Second optional config yml for MultiQC. Will override common sections in multiqc_config. - pattern: "*.{yml,yaml}" - - multiqc_logo: - type: file - description: Optional logo file for MultiQC - pattern: "*.{png}" - -output: - - report: - type: file - description: MultiQC report file - pattern: "multiqc_report.html" - - data: - type: dir - description: MultiQC data dir - pattern: "multiqc_data" - - plots: - type: file - description: Plots created by MultiQC - pattern: "*_data" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@abhi18av" - - "@bunop" - - "@drpatelh" - - "@jfy133" diff --git a/subworkflows/local/compartments.nf b/subworkflows/local/compartments.nf index 23d78ac0f3083a00224b130655d94070b1478228..fee68a5d5d8c3a061d02a6f698aff80186b8d7c3 100644 --- a/subworkflows/local/compartments.nf +++ b/subworkflows/local/compartments.nf @@ -1,4 +1,4 @@ -include { CALL_COMPARTMENTS } from '../../modules/local/cooltools/eigs-cis' +include { COOLTOOLS_EIGSCIS } from '../../modules/local/cooltools/eigscis' workflow COMPARTMENTS { @@ -10,14 +10,14 @@ workflow COMPARTMENTS { main: ch_versions = Channel.empty() - CALL_COMPARTMENTS ( + COOLTOOLS_EIGSCIS( cool, - fasta.collect(), - chrsize.collect() + fasta.map{it -> it[1]}.collect(), + chrsize.map{it -> it[1]}.collect() ) - ch_versions = ch_versions.mix(CALL_COMPARTMENTS.out.versions) + ch_versions = ch_versions.mix(COOLTOOLS_EIGSCIS.out.versions) emit: versions = ch_versions - compartments = CALL_COMPARTMENTS.out.results + compartments = COOLTOOLS_EIGSCIS.out.results } \ No newline at end of file diff --git a/subworkflows/local/cooler.nf b/subworkflows/local/cooler.nf index 7ce15de2065780d12154f1b9fa31044f33948c91..02f5945cf9a2711c9ef2d379b00b161638054f47 100644 --- a/subworkflows/local/cooler.nf +++ b/subworkflows/local/cooler.nf @@ -4,12 +4,11 @@ * OUTPUT : cooler files */ -include { COOLER_ZOOMIFY } from '../../modules/nf-core/modules/cooler/zoomify/main' - -include { COOLER_DUMP } from '../../modules/local/cooler/dump' -include { COOLER_CLOAD } from '../../modules/local/cooler/cload' -include { COOLER_BALANCE } from '../../modules/local/cooler/balance' -include { COOLER_MAKEBINS } from '../../modules/local/cooler/makebins' +include { COOLER_ZOOMIFY } from '../../modules/nf-core/cooler/zoomify/main' +include { COOLER_DUMP } from '../../modules/nf-core/cooler/dump/main' +include { COOLER_CLOAD } from '../../modules/nf-core/cooler/cload/main' +include { COOLER_BALANCE } from '../../modules/nf-core/cooler/balance/main' +include { COOLER_MAKEBINS } from '../../modules/nf-core/cooler/makebins/main' include { SPLIT_COOLER_DUMP } from '../../modules/local/split_cooler_dump' @@ -25,7 +24,7 @@ workflow COOLER { take: pairs // [meta, pairs, index] - chromsize + chromsize // [meta, chromsize] cool_bins main: @@ -34,6 +33,8 @@ workflow COOLER { //***************************************** // EXPORT BINS + chromsize.combine(cool_bins).view() + COOLER_MAKEBINS( chromsize.combine(cool_bins) ) @@ -45,7 +46,7 @@ workflow COOLER { COOLER_CLOAD( pairs.combine(cool_bins), - chromsize.collect() + chromsize.map{it -> it[1]}.collect() ) ch_versions = ch_versions.mix(COOLER_CLOAD.out.versions) @@ -86,10 +87,6 @@ workflow COOLER { ) ch_versions = ch_versions.mix(COOLER_DUMP.out.versions) - //COOLER_DUMP( - // COOLER_ZOOMIFY.out.mcool.combine(cool_bins).map{it->[it[0], it[1], it[2]]} - //) - SPLIT_COOLER_DUMP( COOLER_DUMP.out.bedpe ) diff --git a/subworkflows/local/hicpro_mapping.nf b/subworkflows/local/hicpro_mapping.nf index 3529f4ef247b5d9ad76d48a021e0023a8a948061..a5d31bd07b2a84f8a28d0f01b1b78adbfe20aefc 100644 --- a/subworkflows/local/hicpro_mapping.nf +++ b/subworkflows/local/hicpro_mapping.nf @@ -3,9 +3,9 @@ * From the raw sequencing reads to a paired-end bam file */ -include { BOWTIE2_ALIGN } from '../../modules/nf-core/modules/bowtie2/align/main' +include { BOWTIE2_ALIGN } from '../../modules/nf-core/bowtie2/align/main' include { TRIM_READS } from '../../modules/local/hicpro/trim_reads' -include { BOWTIE2_ALIGN as BOWTIE2_ALIGN_TRIMMED } from '../../modules/nf-core/modules/bowtie2/align/main' +include { BOWTIE2_ALIGN as BOWTIE2_ALIGN_TRIMMED } from '../../modules/nf-core/bowtie2/align/main' include { MERGE_BOWTIE2 } from '../../modules/local/hicpro/bowtie2_merge' include { COMBINE_MATES} from '../../modules/local/hicpro/combine_mates' include { MAPPING_STATS_DNASE } from '../../modules/local/hicpro/dnase_mapping_stats' @@ -35,7 +35,7 @@ workflow HICPRO_MAPPING { take: reads // [meta, read1, read2] - index // path + index // [meta, path] ligation_site // value main: @@ -50,7 +50,8 @@ workflow HICPRO_MAPPING { BOWTIE2_ALIGN( ch_reads, index.collect(), - Channel.value(true).collect() + true, + false ) ch_versions = ch_versions.mix(BOWTIE2_ALIGN.out.versions) @@ -66,7 +67,8 @@ workflow HICPRO_MAPPING { BOWTIE2_ALIGN_TRIMMED( TRIM_READS.out.fastq, index.collect(), - Channel.value(false).collect() + false, + false ) ch_versions = ch_versions.mix(BOWTIE2_ALIGN_TRIMMED.out.versions) diff --git a/subworkflows/local/prepare_genome.nf b/subworkflows/local/prepare_genome.nf index dd9dd291d864e66122e247f13e516f212ef445bb..a4a2399303570928d763612bd03d88bd4b485f3b 100644 --- a/subworkflows/local/prepare_genome.nf +++ b/subworkflows/local/prepare_genome.nf @@ -2,8 +2,8 @@ * Prepare Annotation Genome for Hi-C data analysis */ -include { BOWTIE2_BUILD } from '../../modules/nf-core/modules/bowtie2/build/main' -include { CUSTOM_GETCHROMSIZES } from '../../modules/nf-core/modules/custom/getchromsizes/main' +include { BOWTIE2_BUILD } from '../../modules/nf-core/bowtie2/build/main' +include { CUSTOM_GETCHROMSIZES } from '../../modules/nf-core/custom/getchromsizes/main' include { GET_RESTRICTION_FRAGMENTS } from '../../modules/local/hicpro/get_restriction_fragments' workflow PREPARE_GENOME { @@ -25,6 +25,7 @@ workflow PREPARE_GENOME { ch_versions = ch_versions.mix(BOWTIE2_BUILD.out.versions) }else{ Channel.fromPath( params.bwt2_index , checkIfExists: true) + .map { it -> [[:], it]} .ifEmpty { exit 1, "Genome index: Provided index not found: ${params.bwt2_index}" } .set { ch_index } } @@ -39,6 +40,7 @@ workflow PREPARE_GENOME { ch_versions = ch_versions.mix(CUSTOM_GETCHROMSIZES.out.versions) }else{ Channel.fromPath( params.chromosome_size , checkIfExists: true) + .map { it -> [[:], it]} .set {ch_chromsize} } @@ -53,6 +55,7 @@ workflow PREPARE_GENOME { ch_versions = ch_versions.mix(GET_RESTRICTION_FRAGMENTS.out.versions) }else if (!params.dnase){ Channel.fromPath( params.restriction_fragments, checkIfExists: true ) + .map{ it -> [[:], it] } .set {ch_resfrag} }else{ ch_resfrag = Channel.empty() diff --git a/workflows/hic.nf b/workflows/hic.nf index 3080227c58b6798fac494b0eddd9fe5695782e53..d5ba119a27e94424d993fd1082746fed62566214 100644 --- a/workflows/hic.nf +++ b/workflows/hic.nf @@ -131,9 +131,19 @@ include { TADS } from '../subworkflows/local/tads' // MODULE: Installed directly from nf-core/modules // include { FASTQC } from '../modules/nf-core/fastqc/main' -include { MULTIQC } from '../modules/nf-core/multiqc/main' include { CUSTOM_DUMPSOFTWAREVERSIONS } from '../modules/nf-core/custom/dumpsoftwareversions/main' +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CHANNELS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +Channel.fromPath( params.fasta ) + .ifEmpty { exit 1, "Genome index: Fasta file not found: ${params.fasta}" } + .map{it->[[:],it]} + .set { ch_fasta } + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ RUN MAIN WORKFLOW