diff --git a/conf/full_mm10.config b/conf/full_mm10.config index 5d5c7de..93e6c05 100644 --- a/conf/full_mm10.config +++ b/conf/full_mm10.config @@ -5,7 +5,8 @@ params { genome = 'mm10' outdir = "results/full_mm10" input = "${projectDir}/assets/samplesheet_full_mm10.csv" - contrasts = "${projectDir}/assets/contrasts_full_mm10.yml" + contrasts = 'true' + contrastsheet = "${projectDir}/assets/contrasts_full_mm10.yml" sicer { species = "mm10" // supported species https://github.com/zanglab/SICER2/blob/master/sicer/lib/GenomeData.py } diff --git a/conf/test_human.config b/conf/test_human.config index 2af4f0a..0ea1f6b 100644 --- a/conf/test_human.config +++ b/conf/test_human.config @@ -5,7 +5,7 @@ params { genome = 'hg38' outdir = "results/human" input = "assets/samplesheet_human.csv" - contrasts = null //'assets/contrasts_human.yml' + contrasts = false //'assets/contrasts_human.yml' //read_length = 50 sicer.species = "${params.genome}" // supported species https://github.com/zanglab/SICER2/blob/master/sicer/lib/GenomeData.py diff --git a/conf/test_mm10.config b/conf/test_mm10.config index 19f6670..421ff22 100644 --- a/conf/test_mm10.config +++ b/conf/test_mm10.config @@ -5,7 +5,8 @@ params { genome = 'mm10' outdir = "results/test_mm10" input = "${projectDir}/assets/samplesheet_test_mm10.csv" - contrasts = "${projectDir}/assets/contrasts_test_mm10.yml" + contrasts = 'true' + contrastsheet = "${projectDir}/assets/contrasts_test_mm10.yml" read_length = 50 sicer.species = "mm10" // supported species https://github.com/zanglab/SICER2/blob/master/sicer/lib/GenomeData.py diff --git a/main.nf b/main.nf index 8851dfa..5c7b6b4 100644 --- a/main.nf +++ b/main.nf @@ -36,6 +36,9 @@ include { PHANTOM_PEAKS PPQT_PROCESS MULTIQC } from "./modules/local/qc.nf" + +contrastsheet = params.contrastsheet ?: "/assets/contrast_test.ymls" + workflow.onComplete { if (!workflow.stubRun && !workflow.commandLine.contains('-preview')) { def message = Utils.spooker(workflow) @@ -64,7 +67,7 @@ workflow { } workflow CHIPSEQ { - INPUT_CHECK(file(params.input, checkIfExists: true), params.seq_center, file(params.contrasts, checkIfExists: true)) + INPUT_CHECK(file(params.input, checkIfExists: true), params.seq_center, file(contrastsheet)) INPUT_CHECK.out.reads.set { raw_fastqs } raw_fastqs | CUTADAPT diff --git a/nextflow.config b/nextflow.config index 8b66688..6c5829d 100644 --- a/nextflow.config +++ b/nextflow.config @@ -2,11 +2,14 @@ nextflow.enable.dsl = 2 params { input = null - contrasts = null + contrasts = false seq_center = null read_length = null genome = null + // manifest for contrasts + contrastsheet = null + // custom genome options genome_fasta = null genes_gtf = null diff --git a/subworkflows/local/input_check.nf b/subworkflows/local/input_check.nf index 47a1b44..2d5fdb8 100644 --- a/subworkflows/local/input_check.nf +++ b/subworkflows/local/input_check.nf @@ -19,6 +19,8 @@ workflow INPUT_CHECK { .map { create_fastq_channel(it, seq_center) } .set { reads } + // Run check on the contrast manifest + contrasts=Channel.empty() if (params.contrasts) { CHECK_CONTRASTS(valid_csv, contrastsheet) .csv @@ -33,7 +35,7 @@ workflow INPUT_CHECK { } emit: - reads // channel: [ val(meta), [ reads ] ] + reads = reads // channel: [ val(meta), [ reads ] ] csv = valid_csv contrasts = contrasts versions = SAMPLESHEET_CHECK.out.versions // channel: [ versions.yml ]