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

Check to ensure sample IDs match MLST.JSON keys #9

Merged
merged 23 commits into from
May 22, 2024

Conversation

kylacochrane
Copy link
Contributor

@kylacochrane kylacochrane commented May 8, 2024

This PR verifies that the sample IDs in the input samplesheet align correctly with their corresponding keys in the MLST JSON file.

  • INPUT_CHECK - verifies the sample ID and JSON key matches; outputs and maps the boolean value to the sample metadata; generates error_report.csv if applicable

NOTE: See #10 for the addition of integration tests

Copy link

github-actions bot commented May 8, 2024

nf-core lint overall result: Passed ✅ ⚠️

Posted for pipeline commit 131af6f

+| ✅ 149 tests passed       |+
#| ❔  22 tests were ignored |#
!| ❗  15 tests had warnings |!

❗ Test warnings:

  • schema_lint - Schema $id should be https://raw.githubusercontent.com/phac-nml/gasnomenclature/master/nextflow_schema.json
    Found https://raw.githubusercontent.com/phac-nml/gasnomenclature/main/nextflow_schema.json
  • schema_description - No description provided in schema for parameter: gm_thresholds
  • schema_description - No description provided in schema for parameter: gm_delimiter
  • schema_description - No description provided in schema for parameter: ref_clusters
  • schema_description - No description provided in schema for parameter: pd_outfmt
  • schema_description - No description provided in schema for parameter: pd_distm
  • schema_description - No description provided in schema for parameter: pd_missing_threshold
  • schema_description - No description provided in schema for parameter: pd_sample_quality_threshold
  • schema_description - No description provided in schema for parameter: pd_match_threshold
  • schema_description - No description provided in schema for parameter: pd_file_type
  • schema_description - No description provided in schema for parameter: pd_mapping_file
  • schema_description - No description provided in schema for parameter: pd_force
  • schema_description - No description provided in schema for parameter: pd_skip
  • schema_description - No description provided in schema for parameter: pd_columns
  • schema_description - No description provided in schema for parameter: pd_count_missing

❔ Tests ignored:

  • files_exist - File is ignored: assets/nf-core-gasnomenclature_logo_light.png
  • files_exist - File is ignored: docs/images/nf-core-gasnomenclature_logo_dark.png
  • files_exist - File is ignored: docs/images/nf-core-gasnomenclature_logo_light.png
  • files_exist - File is ignored: .github/workflows/awstest.yml
  • files_exist - File is ignored: .github/workflows/awsfulltest.yml
  • nextflow_config - Config variable ignored: manifest.name
  • nextflow_config - Config variable ignored: manifest.homePage
  • files_unchanged - File ignored due to lint config: LICENSE or LICENSE.md or LICENCE or LICENCE.md
  • files_unchanged - File ignored due to lint config: .github/CONTRIBUTING.md
  • files_unchanged - File ignored due to lint config: .github/ISSUE_TEMPLATE/bug_report.yml
  • files_unchanged - File ignored due to lint config: .github/PULL_REQUEST_TEMPLATE.md
  • files_unchanged - File ignored due to lint config: .github/workflows/branch.yml
  • files_unchanged - File ignored due to lint config: assets/email_template.html
  • files_unchanged - File ignored due to lint config: assets/email_template.txt
  • files_unchanged - File ignored due to lint config: assets/sendmail_template.txt
  • files_unchanged - File does not exist: assets/nf-core-gasnomenclature_logo_light.png
  • files_unchanged - File does not exist: docs/images/nf-core-gasnomenclature_logo_light.png
  • files_unchanged - File does not exist: docs/images/nf-core-gasnomenclature_logo_dark.png
  • files_unchanged - File ignored due to lint config: docs/README.md
  • actions_awstest - 'awstest.yml' workflow not found: /home/runner/work/gasnomenclature/gasnomenclature/.github/workflows/awstest.yml
  • actions_awsfulltest - actions_awsfulltest
  • pipeline_name_conventions - pipeline_name_conventions

✅ Tests passed:

Run details

  • nf-core/tools version 2.14.1
  • Run at 2024-05-21 15:56:18

@kylacochrane kylacochrane marked this pull request as ready for review May 15, 2024 22:15
@kylacochrane kylacochrane requested a review from apetkau May 15, 2024 22:16
Copy link
Member

@apetkau apetkau left a comment

Choose a reason for hiding this comment

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

This is amazing. Thanks so much @kylacochrane 😄 .

In addition to what we talked about I had a few other comments.

bin/check_samplesheet.py Show resolved Hide resolved
bin/error_report.py Outdated Show resolved Hide resolved
modules/local/filter_query/main.nf Outdated Show resolved Hide resolved
modules/local/filter_query/main.nf Outdated Show resolved Hide resolved
bin/error_report.py Outdated Show resolved Hide resolved
workflows/gas_nomenclature.nf Show resolved Hide resolved
@kylacochrane
Copy link
Contributor Author

Additional changes:
Combined INPUT_CHECK and ERROR_REPORT into a single process: cf37bfe
Filtered out samples using Groovy logic in workflow (instead of a separate process): 5456aa7

Copy link
Member

@apetkau apetkau left a comment

Choose a reason for hiding this comment

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

This looks great. Thanks so much for your work @kylacochrane 😄 . Just two smaller comments.

workflows/gas_nomenclature.nf Outdated Show resolved Hide resolved
Copy link
Member

@apetkau apetkau left a comment

Choose a reason for hiding this comment

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

This looks great. Thanks so much for all your hard work on this @kylacochrane 😄

sample,mlst_alleles,address
sampleQ,https://raw.githubusercontent.com/phac-nml/gasnomenclature/add_tests/tests/data/reports/sampleF.mlst.json,
sample1,https://raw.githubusercontent.com/phac-nml/gasnomenclature/dev/tests/data/reports/sample1.mlst.json,1.1.1
sample2,https://raw.githubusercontent.com/phac-nml/gasnomenclature/add_tests/tests/data/reports/sample7.mlst.json,1.1.1
Copy link
Member

Choose a reason for hiding this comment

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

As a note, once this PR is merged you'll have to update the URL here to point to dev. You can just directly commit that to the dev branch.

@kylacochrane kylacochrane merged commit 16901d1 into filter-new-addresses May 22, 2024
4 checks passed
@kylacochrane kylacochrane deleted the input_check branch May 27, 2024 17:53
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