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

new module: PERBASE #7457

Merged
merged 9 commits into from
Feb 18, 2025
Merged

new module: PERBASE #7457

merged 9 commits into from
Feb 18, 2025

Conversation

camlloyd
Copy link
Contributor

@camlloyd camlloyd commented Feb 10, 2025

PR checklist

Closes #7456 by adding new module: PERBASE

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the module conventions in the contribution docs
  • If necessary, include test data in your PR.
  • Remove all TODO statements.
  • Emit the versions.yml file.
  • Follow the naming conventions.
  • Follow the parameters requirements.
  • Follow the input/output options guidelines.
  • Add a resource label
  • Use BioConda and BioContainers if possible to fulfil software requirements.
  • Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
    • For modules:
      • nf-core modules test <MODULE> --profile docker
      • nf-core modules test <MODULE> --profile singularity
      • nf-core modules test <MODULE> --profile conda
    • For subworkflows:
      • nf-core subworkflows test <SUBWORKFLOW> --profile docker
      • nf-core subworkflows test <SUBWORKFLOW> --profile singularity
      • nf-core subworkflows test <SUBWORKFLOW> --profile conda

@camlloyd
Copy link
Contributor Author

camlloyd commented Feb 10, 2025

NB: matching Singularity container is not available for latest version 0.10.2.
Perhaps downgrade all to 0.10.1.

EDIT: actually, it is available for 0.10.2, but it doesn't appear on biocontainers.pro

@camlloyd camlloyd marked this pull request as draft February 10, 2025 09:46
Copy link
Contributor

@itrujnara itrujnara left a comment

Choose a reason for hiding this comment

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

Very nice work, it's almost good to go, just a handful of small questions

modules/nf-core/perbase/main.nf Outdated Show resolved Hide resolved
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`
Copy link
Contributor

Choose a reason for hiding this comment

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

Please confirm that single_end is relevant here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is from the nf-core module template, but I believe it's still relevant here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Alright, thanks

@itrujnara
Copy link
Contributor

I've merged master for you and all irrelevant CI issues are gone. There is still some nf-test linting issue, unfortunately I can't determine what's wrong.

@camlloyd
Copy link
Contributor Author

I've merged master for you and all irrelevant CI issues are gone. There is still some nf-test linting issue, unfortunately I can't determine what's wrong.

╭─ [✗] 1 Module Test Failed ───────────────────────────────────────────────────╮
│              ╷                               ╷                               │
│ Module name  │ File path                     │ Test message                  │
│╶─────────────┼───────────────────────────────┼──────────────────────────────╴│
│ perbase      │ modules/nf-core/perbase/test… │ md5sum for empty file found:  │
│              │                               │ d41d8cd98f00b204e9800998ecf84 │
│              │                               │ 27e                           │
│              ╵                               ╵                               │
╰──────────────────────────────────────────────────────────────────────────────╯
╭───────────────────────╮
│ LINT RESULTS SUMMARY  │
├───────────────────────┤
│ [✔]  45 Tests Passed  │
│ [!]   0 Test Warnings │
│ [✗]   1 Test Failed   │
╰───────────────────────╯
Error: Process completed with exit code 1.

test("homo_sapiens - illumina - cram") is failing because it is trying to read the following URI in the CRAM header:

UR:/home/AD/gmackenz/nf-core_test_datasets/test-datasets/data/genomics/homo_sapiens/illumina/cram/../../genome/chr21/sequence/genome.fasta

See .command.log

[E::easy_errno] Libcurl reported error 60 (SSL peer certificate or SSH remote key was not OK)
[W::find_file_url] Failed to open reference "https://www.ebi.ac.uk/ena/cram/md5/974dc7aec0b755b19f031418fdedf293": Input/output error
[E::fai_build3_core] Failed to open the file /home/AD/gmackenz/nf-core_test_datasets/test-datasets/data/genomics/homo_sapiens/illumina/cram/../../genome/chr21/sequence/genome.fasta : No such file or directory
[E::refs_load_fai] Failed to open reference file '/home/AD/gmackenz/nf-core_test_datasets/test-datasets/data/genomics/homo_sapiens/illumina/cram/../../genome/chr21/sequence/genome.fasta'
[W::cram_get_ref] Failed to populate reference for id 0
[E::cram_decode_slice] Unable to fetch reference #0:5011214-6457162

[E::cram_next_slice] Failure to decode slice
thread '<unnamed>' panicked at src/commands/base_depth.rs:252:32:
Extracted a pileup: BamPileup
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Therefore the output test.tsv.gz is empty.
I'll look at adding a reference fasta input.

@camlloyd camlloyd marked this pull request as ready for review February 16, 2025 16:28
Copy link
Contributor

@itrujnara itrujnara left a comment

Choose a reason for hiding this comment

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

It looks very nice now, I've left a few mostly aesthetic remarks

task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
Copy link
Contributor

Choose a reason for hiding this comment

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

Harshil alignment here would be great

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should this be applied in the module template upstream?
https://github.com/nf-core/tools/blob/main/nf_core/module-template/main.nf


stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
Copy link
Contributor

Choose a reason for hiding this comment

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

And here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should this be applied in the module template upstream?
https://github.com/nf-core/tools/blob/main/nf_core/module-template/main.nf

Copy link
Contributor

Choose a reason for hiding this comment

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

Possibly, I need to discuss this with core

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I can look at opening a PR if needed.

type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`
Copy link
Contributor

Choose a reason for hiding this comment

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

Alright, thanks

- index:
type: file
description: BAI/CRAI file
pattern: "*.{bai,crai}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there no suitable index format on EDAM?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is for BAI: https://edamontology.github.io/edam-browser/#format_3327
CRAI is still to be added: edamontology/edamontology#835
It looks like there are more general index entries too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please add the best fit for each entry? It will make life easier for some people

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have added the ontology for BAI.

The parent Data index format sounded the most appropriate, but has the notRecommendedForAnnotation attribute as it is a placeholder concept, rather than a specific file format.

Copy link
Contributor

@itrujnara itrujnara left a comment

Choose a reason for hiding this comment

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

Nice work, good to go. I'll have a look into the module template about the alignment.

@camlloyd
Copy link
Contributor Author

Thank you for being an excellent reviewer @itrujnara 🌟

@camlloyd camlloyd added this pull request to the merge queue Feb 18, 2025
Merged via the queue into nf-core:master with commit be5b197 Feb 18, 2025
67 checks passed
@camlloyd camlloyd deleted the perbase branch February 18, 2025 09:46
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.

new module: PERBASE
2 participants