Skip to content

Commit

Permalink
refactor: scaffolds samplesshet ica CDCgov#149
Browse files Browse the repository at this point in the history
  • Loading branch information
slsevilla committed Apr 3, 2024
1 parent 7720ec4 commit c22897c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions modules/local/scaffolds_samplesheet_check.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,19 @@ process SCAFFOLDS_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_assembly_samplesheet.py" : "check_assembly_samplesheet.py"
"""
${ica}check_assembly_samplesheet.py \\
${script} \\
$samplesheet \\
samplesheet.valid.csv
cat <<-END_VERSIONS > versions.yml
"${task.process}":
python: \$(python --version | sed 's/Python //g')
check_assembly_samplesheet.py: \$(${ica}check_assembly_samplesheet.py --version )
check_assembly_samplesheet.py: \$(${script} --version )
phoenix_base_container_tag: ${container_version}
phoenix_base_container: ${container}
END_VERSIONS
Expand Down

0 comments on commit c22897c

Please sign in to comment.