Skip to content

Commit

Permalink
fix: separates contrast and contrastsheet params #196
Browse files Browse the repository at this point in the history
  • Loading branch information
slsevilla committed Mar 1, 2024
1 parent 0d8dc36 commit 105dd26
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 6 deletions.
3 changes: 2 additions & 1 deletion conf/full_mm10.config
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion conf/test_human.config
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion conf/test_mm10.config
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 4 additions & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion subworkflows/local/input_check.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 ]
Expand Down

0 comments on commit 105dd26

Please sign in to comment.