Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script to run Nextflow configuration regression tests locally #23

Merged
merged 6 commits into from
Mar 8, 2024

Conversation

nwiltsie
Copy link
Member

@nwiltsie nwiltsie commented Mar 8, 2024

Description

This PR adds a new nfconfigtest script that allows users to run the regression tests locally:

$ ./nfconfigtest --dev --path ~/src/pipeline-recalibrate-BAM/
Looking for tests in pipeline-recalibrate-BAM
#1/2: test/configtest-F16.json
  Failure
  Compare these files and copy any expected changes:
  Original: /Users/nwiltsie/src/pipeline-recalibrate-BAM/test/configtest-F16.json
  Output:   /Users/nwiltsie/src/pipeline-recalibrate-BAM/test/configtest-F16-out.json
#2/2: test/configtest-F32.json
  Success!
1/2 tests passed

The script automatically cleans up any of the -out.json files that do match the expected results, leaving only the files that a user needs to review.

In addition to the script itself, I changed the sed command in the Dockerfile to be a little more robust. The launcher script for Nextflow 24.01.0-edge no longer has double quotes (I'm assuming just to thwart me specifically), so this is just a bit of future-proofing.

$ docker run -it --entrypoint /bin/bash nextflow/nextflow:23.10.0 -c 'grep -o ".\{30\}$" /.nextflow/tmp/launcher/nextflow-one_*/buildkitsandbox/classpath-*' 2>/dev/null
.jar" "nextflow.cli.Launcher"
$ docker run -it --entrypoint /bin/bash nextflow/nextflow:24.01.0-edge -c 'grep -o ".\{30\}$" /.nextflow/tmp/launcher/nextflow-one_*/buildkitsandbox/classpath-*' 2>/dev/null
3.0.jar nextflow.cli.Launcher

Checklist

  • This PR does NOT contain Protected Health Information (PHI). A repo may need to be deleted if such data is uploaded.
    Disclosing PHI is a major problem1 - Even a small leak can be costly2.

  • This PR does NOT contain germline genetic data3, RNA-Seq, DNA methylation, microbiome or other molecular data4.

  • This PR does NOT contain other non-plain text files, such as: compressed files, images (e.g. .png, .jpeg), .pdf, .RData, .xlsx, .doc, .ppt, or other output files.

  To automatically exclude such files using a .gitignore file, see here for example.

  • I have read the code review guidelines and the code review best practice on GitHub check-list.

  • I have set up or verified the main branch protection rule following the github standards before opening this pull request.

  • The name of the branch is meaningful and well formatted following the standards, using [AD_username (or 5 letters of AD if AD is too long)]-[brief_description_of_branch].

  • I have added the major changes included in this pull request to the CHANGELOG.md under the next release version or unreleased, and updated the date.

Footnotes

  1. UCLA Health reaches $7.5m settlement over 2015 breach of 4.5m patient records

  2. The average healthcare data breach costs $2.2 million, despite the majority of breaches releasing fewer than 500 records.

  3. Genetic information is considered PHI.
    Forensic assays can identify patients with as few as 21 SNPs

  4. RNA-Seq, DNA methylation, microbiome, or other molecular data can be used to predict genotypes (PHI) and reveal a patient's identity.

@nwiltsie nwiltsie requested a review from a team March 8, 2024 18:24
@nwiltsie
Copy link
Member Author

nwiltsie commented Mar 8, 2024

I forgot to add - the script can be downloaded and run independently of this repository (although it won't work properly until f8bf034 is merged, as that changes the exit code).

Copy link
Contributor

@yashpatel6 yashpatel6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Tested it out and works as expected

run-nextflow-tests/nfconfigtest Show resolved Hide resolved
@nwiltsie nwiltsie merged commit 5e4e51d into main Mar 8, 2024
1 check passed
@nwiltsie nwiltsie deleted the nwiltsie-add-local-script branch March 11, 2024 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants