Commit 30d47964 authored by Chris Cheshire's avatar Chris Cheshire
Browse files

Switching to nf-core bedtools genomecov

parent 4a3c148d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -141,7 +141,13 @@ params {
        */

        "bedtools_genomecov_bedgraph" {
            //publish_dir   = "03_peak_calling/01_bam_to_bedgraph"
            publish_files = false
        }

        "sort_bedgraph" {
            publish_dir   = "03_peak_calling/01_bam_to_bedgraph"
            suffix        = ".sorted"
        }

        "ucsc_bedclip" {
+3 −0
Original line number Diff line number Diff line
@@ -15,6 +15,9 @@
            "bedtools/merge": {
                "git_sha": "e937c7950af70930d1f34bb961403d9d2aa81c7d"
            },
            "bedtools/sort": {
                "git_sha": "3aacd46da2b221ed47aaa05c413a828538d2c2ae"
            },
            "bowtie2/align": {
                "git_sha": "e937c7950af70930d1f34bb961403d9d2aa81c7d"
            },
+40 −29
Original line number Diff line number Diff line
@@ -293,8 +293,6 @@ multiqc_options.args += params.multiqc_title ? " --title \"$params.multiqc_title
 * MODULES
 */
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 { AWK as AWK_NAME_PEAK_BED        } from "../modules/local/linux/awk"                          addParams( options: modules["awk_name_peak_bed"] )
include { IGV_SESSION                     } from "../modules/local/python/igv_session"                 addParams( options: modules["igv"]               )
include { AWK as AWK_EDIT_PEAK_BED        } from "../modules/local/linux/awk"                          addParams( options: modules["awk_edit_peak_bed"] )
@@ -332,6 +330,9 @@ include { ANNOTATE_META_CSV as ANNOTATE_PEAK_REPRO_META } from "../subworkflows
/*
 * MODULES
 */
include { CAT_FASTQ                                                } from "../modules/nf-core/modules/cat/fastq/main"               addParams( options: cat_fastq_options                      )
include { BEDTOOLS_GENOMECOV                                       } from "../modules/nf-core/modules/bedtools/genomecov/main"      addParams( options: modules["bedtools_genomecov_bedgraph"] )
include { BEDTOOLS_SORT                                            } from "../modules/nf-core/modules/bedtools/sort/main"           addParams( options: modules["sort_bedgraph"]               )
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"]                       )
@@ -613,17 +614,27 @@ workflow CUTANDRUN {
        /*
        * MODULE: Convert bam files to bedgraph
        */
        BEDTOOLS_GENOMECOV_SCALE (
            ch_samtools_bam_scale
        BEDTOOLS_GENOMECOV (
            ch_samtools_bam_scale,
            ch_dummy_file,
            "bedgraph"
        )
        //EXAMPLE CHANNEL STRUCT: [META], BEDGRAPH]
        //BEDTOOLS_GENOMECOV_SCALE.out.bedgraph | view
        //BEDTOOLS_GENOMECOV.out.genomecov | view

        /*
        * MODULE: Sort bedgraph
        */
        BEDTOOLS_SORT (
            BEDTOOLS_GENOMECOV.out.genomecov,
            "bedgraph"
        )

        /*
        * MODULE: Clip off bedgraphs so none overlap beyond chromosome edge
        */
        UCSC_BEDCLIP (
            BEDTOOLS_GENOMECOV_SCALE.out.bedgraph,
            BEDTOOLS_SORT.out.sort,
            PREPARE_GENOME.out.chrom_sizes
        )
        //EXAMPLE CHANNEL STRUCT: [META], BEDGRAPH]
@@ -643,7 +654,7 @@ workflow CUTANDRUN {
        /*
         * CHANNEL: Separate bedgraphs into target/control
         */
        BEDTOOLS_GENOMECOV_SCALE.out.bedgraph.branch { it ->
        BEDTOOLS_SORT.out.sort.branch { it ->
            target: it[0].group != "igg"
            control: it[0].group == "igg"
        }