Skip to content

Commit

Permalink
Revert to conditional include in main script
Browse files Browse the repository at this point in the history
  • Loading branch information
drpatelh committed Jun 10, 2021
1 parent 85bfd4e commit 40d520e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 18 deletions.
7 changes: 5 additions & 2 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,11 @@ WorkflowMain.initialise(workflow, params, log)
========================================================================================
*/

include { ILLUMINA } from './workflows/illumina'
include { NANOPORE } from './workflows/nanopore'
if (params.platform == 'illumina') {
include { ILLUMINA } from './workflows/illumina'
} else if (params.platform == 'nanopore') {
include { NANOPORE } from './workflows/nanopore'
}

workflow NFCORE_VIRALRECON {

Expand Down
12 changes: 4 additions & 8 deletions workflows/illumina.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ def valid_params = [
def summary_params = NfcoreSchema.paramsSummaryMap(workflow, params)

// Validate input parameters
if (params.platform == 'illumina') {
WorkflowIllumina.initialise(params, log, valid_params)
}
WorkflowIllumina.initialise(params, log, valid_params)

// Check input path parameters to see if they exist
def checkPathParamList = [
Expand Down Expand Up @@ -689,11 +687,9 @@ workflow ILLUMINA {
========================================================================================
*/

if (params.platform == 'illumina') {
workflow.onComplete {
NfcoreTemplate.email(workflow, params, summary_params, projectDir, log, multiqc_report, fail_mapped_reads)
NfcoreTemplate.summary(workflow, params, log, fail_mapped_reads, pass_mapped_reads)
}
workflow.onComplete {
NfcoreTemplate.email(workflow, params, summary_params, projectDir, log, multiqc_report, fail_mapped_reads)
NfcoreTemplate.summary(workflow, params, log, fail_mapped_reads, pass_mapped_reads)
}

/*
Expand Down
12 changes: 4 additions & 8 deletions workflows/nanopore.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ def valid_params = [
def summary_params = NfcoreSchema.paramsSummaryMap(workflow, params)

// Validate input parameters
if (params.platform == 'nanopore') {
WorkflowNanopore.initialise(params, log, valid_params)
}
WorkflowNanopore.initialise(params, log, valid_params)

def checkPathParamList = [
params.input, params.fastq_dir, params.fast5_dir,
Expand Down Expand Up @@ -503,11 +501,9 @@ workflow NANOPORE {
========================================================================================
*/

if (params.platform == 'nanopore') {
workflow.onComplete {
NfcoreTemplate.email(workflow, params, summary_params, projectDir, log, multiqc_report)
NfcoreTemplate.summary(workflow, params, log)
}
workflow.onComplete {
NfcoreTemplate.email(workflow, params, summary_params, projectDir, log, multiqc_report)
NfcoreTemplate.summary(workflow, params, log)
}

/*
Expand Down

0 comments on commit 40d520e

Please sign in to comment.