diff --git a/main.nf b/main.nf index 50b9daef..daf9b032 100755 --- a/main.nf +++ b/main.nf @@ -49,6 +49,7 @@ workflow PHOENIX { //input on command line if (params.input) { ch_input = file(params.input) } else { exit 1, 'For -entry PHOENIX: Input samplesheet not specified!' } ch_versions = Channel.empty() // Used to collect the software versions + if (params.ica != true && params.ica != false) {exit 1, "Please set params.ica to either \"true\" if running on ICA or \"false\" for all other methods."} main: PHOENIX_EXTERNAL ( ch_input, ch_versions, true ) diff --git a/modules/local/samplesheet_check.nf b/modules/local/samplesheet_check.nf index 952934ae..bc25439b 100644 --- a/modules/local/samplesheet_check.nf +++ b/modules/local/samplesheet_check.nf @@ -12,22 +12,19 @@ process SAMPLESHEET_CHECK { path("versions.yml"), emit: versions script: // This script is bundled with the pipeline, in cdcgov/phoenix/bin/ - // Adding if/else for if running on ICA it is a requirement to state where the script is, however, this causes CLI users to not run the pipeline from any directory. - if (params.ica==false) { ica = "" } - else if (params.ica==true) { ica = "python ${workflow.launchDir}/bin/" } - else { error "Please set params.ica to either \"true\" if running on ICA or \"false\" for all other methods." } // define variables def container_version = "base_v2.1.0" def container = task.container.toString() - "quay.io/jvhagey/phoenix@" + def script = params.ica ? "python ${params.ica_path}/check_samplesheet.py" : "check_samplesheet.py" """ - ${ica}check_samplesheet.py \\ + ${script} \\ $samplesheet \\ samplesheet.valid.csv cat <<-END_VERSIONS > versions.yml "${task.process}": python: \$(python --version | sed 's/Python //g') - check_samplesheet.py: \$(${ica}check_samplesheet.py --version ) + check_samplesheet.py: ${script} --version ) phoenix_base_container_tag: ${container_version} phoenix_base_container: ${container} END_VERSIONS diff --git a/nextflow.config b/nextflow.config index 687f8749..4c935260 100755 --- a/nextflow.config +++ b/nextflow.config @@ -41,6 +41,7 @@ params { // Terra and ICA specific options terra = false ica = false + ica_path = "${launchDir}/bin/" // Database paths //path2db = "${baseDir}/assets/databases" // need this for kraken2db if you place those files in the assets folder