Commit cea050cc authored by Chris Cheshire's avatar Chris Cheshire
Browse files

Removed custom seacr module

parent b70cb3d4
Loading
Loading
Loading
Loading

modules/local/seacr_no_igg.nf

deleted100644 → 0
+0 −42
Original line number Diff line number Diff line
include { initOptions; saveFiles; getSoftwareName } from './functions'

params.options = [:]
options        = initOptions(params.options)

def VERSION = '1.3'

process SEACR_CALLPEAK {
    tag "$meta.id"
    label 'process_medium'
    publishDir "${params.outdir}",
        mode: params.publish_dir_mode,
        saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }

    conda (params.enable_conda ? "bioconda::seacr=1.3 conda-forge::r-base=4.0.2 bioconda::bedtools=2.30.0" : null)
    if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
        container "https://depot.galaxyproject.org/singularity/mulled-v2-03bfeb32fe80910c231f630d4262b83677c8c0f4:5bb5ed4307a8187a7f34730b00431de93688fa59-0"
    } else {
        container 'quay.io/biocontainers/mulled-v2-03bfeb32fe80910c231f630d4262b83677c8c0f4:5bb5ed4307a8187a7f34730b00431de93688fa59-0'
    }

    input:
    tuple val(meta), path(bedgraph)
    val (threshold)

    output:
    tuple val(meta), path("*.bed"), emit: bed
    path "*.version.txt"          , emit: version

    script:
    def software = getSoftwareName(task.process)
    def prefix   = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
    """
    SEACR_1.3.sh \\
        $bedgraph \\
        $threshold \\
        $options.args \\
        $prefix

    echo $VERSION > ${software}.version.txt
    """
}
+16 −11
Original line number Diff line number Diff line
@@ -295,7 +295,6 @@ multiqc_options.args += params.multiqc_title ? " --title \"$params.multiqc_title
include { INPUT_CHECK                     } from "../subworkflows/local/input_check"                          addParams( options: [:]                                        )
include { CAT_FASTQ                       } from "../modules/nf-core/modules/cat/fastq/main"                  addParams( options: cat_fastq_options                          )
include { BEDTOOLS_GENOMECOV_SCALE        } from "../modules/local/bedtools_genomecov_scale"                  addParams( options: modules["bedtools_genomecov_bedgraph"]     )
include { SEACR_CALLPEAK as SEACR_NO_IGG  } from "../modules/local/seacr_no_igg"                              addParams( options: modules["seacr"]                           )
include { AWK as AWK_NAME_PEAK_BED        } from "../modules/local/awk"                                       addParams( options: modules["awk_name_peak_bed"]               )
include { IGV_SESSION                     } from "../modules/local/igv_session"                               addParams( options: modules["igv"]                             )
include { AWK as AWK_EDIT_PEAK_BED        } from "../modules/local/awk"                                       addParams( options: modules["awk_edit_peak_bed"]               )
@@ -336,6 +335,7 @@ include { ANNOTATE_META_CSV as ANNOTATE_PEAK_REPRO_META } from "../subworkflows
include { UCSC_BEDCLIP                                             } from "../modules/nf-core/modules/ucsc/bedclip/main"            addParams( options: modules["ucsc_bedclip"]          )
include { UCSC_BEDGRAPHTOBIGWIG                                    } from "../modules/nf-core/modules/ucsc/bedgraphtobigwig/main"   addParams( options: modules["ucsc_bedgraphtobigwig"] )
include { SEACR_CALLPEAK                                           } from "../modules/nf-core/modules/seacr/callpeak/main"          addParams( options: modules["seacr"]                 )
include { SEACR_CALLPEAK as SEACR_CALLPEAK_NOIGG                   } from "../modules/nf-core/modules/seacr/callpeak/main"          addParams( options: modules["seacr"]                 )
include { DEEPTOOLS_COMPUTEMATRIX as DEEPTOOLS_COMPUTEMATRIX_GENE  } from "../modules/nf-core/modules/deeptools/computematrix/main" addParams( options: modules["dt_compute_mat_gene"]   )
include { DEEPTOOLS_COMPUTEMATRIX as DEEPTOOLS_COMPUTEMATRIX_PEAKS } from "../modules/nf-core/modules/deeptools/computematrix/main" addParams( options: modules["dt_compute_mat_peaks"]  )
include { DEEPTOOLS_PLOTHEATMAP as DEEPTOOLS_PLOTHEATMAP_GENE      } from "../modules/nf-core/modules/deeptools/plotheatmap/main"   addParams( options: modules["dt_plotheatmap_gene"]   )
@@ -684,28 +684,33 @@ workflow CUTANDRUN {
             * MODULE: Call peaks with IgG control
             */
            SEACR_CALLPEAK (
                ch_bedgraph_paired
                ch_bedgraph_paired,
                params.peak_threshold
            )
            ch_seacr_bed = SEACR_CALLPEAK.out.bed
            ch_software_versions = ch_software_versions.mix(SEACR_CALLPEAK.out.version.first().ifEmpty(null))
            //ch_software_versions = ch_software_versions.mix(SEACR_CALLPEAK.out.version.first().ifEmpty(null))
            // EXAMPLE CHANNEL STRUCT: [[META], BED]
            //SEACR_CALLPEAK.out.bed | view
        }
        else {
            /*
             * CHANNEL: Load peak threshold into channel
            * CHANNEL: Add fake control channel
            */
            ch_peak_threshold = Channel.value(params.peak_threshold)
            ch_bedgraph_split.target
                .map{ row-> [ row[0], row[1], [] ] }
                .set { ch_bedgraph_target_fctrl }
            // EXAMPLE CHANNEL STRUCT: [[META], BED, FAKE_CTRL]
            // ch_bedgraph_target_fctrl | view

            /*
            * MODULE: Call peaks without IgG Control
            */
            SEACR_NO_IGG (
                ch_bedgraph_split.target,
                ch_peak_threshold
            SEACR_CALLPEAK_NOIGG (
                ch_bedgraph_target_fctrl,
                params.peak_threshold
            )
            ch_seacr_bed = SEACR_NO_IGG.out.bed
            ch_software_versions = ch_software_versions.mix(SEACR_NO_IGG.out.version.first().ifEmpty(null))
            ch_seacr_bed = SEACR_CALLPEAK_NOIGG.out.bed
            //ch_software_versions = ch_software_versions.mix(SEACR_NO_IGG.out.version.first().ifEmpty(null))
            // EXAMPLE CHANNEL STRUCT: [[META], BED]
            //SEACR_NO_IGG.out.bed | view
        }