Skip to content

Conversation

@mberacochea
Copy link
Contributor

PR checklist

Closes #XXX

  • 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

Copy link
Contributor

@vagkaratzas vagkaratzas left a comment

Choose a reason for hiding this comment

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

Nice! A first round of comments

path(fastas, stageAs: "genomes/*")

output:
tuple val(meta), path("upload_output/*") , emit: upload_output_dir
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe rename to emit: results
This is the pattern I mostly see when outputting whole folders

"""
genome_upload \\
$args \\
--upload_study "${meta.study_accession}" \\
Copy link
Contributor

Choose a reason for hiding this comment

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

I like the use of meta here, but we will need a second opinion if that's preferred over additional input params


input:
tuple val(meta), path(metadata_tsv)
path(fastas, stageAs: "genomes/*")
Copy link
Contributor

Choose a reason for hiding this comment

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

would rename to fasta

description: |
Groovy Map containing sample information
e.g. `[ id:'test', study_accession:'ERP159782', center_name:'nf-core' ]`
- upload_output/*:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- upload_output/*:
- upload_output:

- upload_output/*:
type: directory
description: Directory containing all upload outputs
pattern: "upload_output/*"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
pattern: "upload_output/*"
pattern: "*"

@@ -0,0 +1,5 @@
process {
withName: 'GENOMEUPLOADER' {
ext.args = '--mags'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ext.args = '--mags'
ext.args = params.module_args


test("genome - fasta - gz") {

when {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
when {
when {
params {
module_args = '--mags'
}

],
metadata_file
]
input[1] = file('https://github.com/nf-core/test-datasets/raw/refs/heads/magmap/testdata/GCA_002688505.1_ASM268850v1_genomic.fna.gz', checkIfExists: true)
Copy link
Contributor

Choose a reason for hiding this comment

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

This file will probably need to be deposited in nf-core test-datasets as well

@@ -0,0 +1,29 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

I dont see the stub test in the snapshot

Comment on lines +94 to +95
{ assert process.success },
{ assert snapshot(process.out).match() }
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert process.success },
{ assert snapshot(
process.out.upload_output_dir,
process.out.registered_mags,
process.out.genome_samples,
process.out.manifests,
process.out.versions.collect{ path(it).yaml }
).match() }

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