Skip to content

Conversation

@vinisalazar
Copy link
Contributor

Summary of changes:

  • rgi/bwt: add draft
  • rgi/bwt: editing input channel

cc @nickp60

  - Use template from rgi/main
  - Use fastq pair instead of single fasta file
@vinisalazar vinisalazar marked this pull request as draft December 18, 2025 01:31
  - add fastq extensions to 'pattern'
  - Trying to pass linter
  - build KMA/BWT index in workdir instead of program executable dir
  - update test snapshot
  - Don't check temp/ directory on snapshot, is different every time
  - Update snapshot
  - provide input.reads as list
  - don't check tsv snapshot (it's different every time)
  - json files are in random order so snapshot differs every time (I think)
@vinisalazar vinisalazar marked this pull request as ready for review December 18, 2025 06:08
@vinisalazar
Copy link
Contributor Author

@nickp60 we might want to adjust the output channels a little bit, looks to me as though these are the main files:

test.allele_mapping_data.txt
test.artifacts_mapping_stats.txt
test.gene_mapping_data.txt
test.overall_mapping_stats.txt
test.reference_mapping_stats.txt

@vinisalazar
Copy link
Contributor Author

@SPPearce thank you for the review, addressed your comments.

  - Use '--local' flag as default
@nickp60
Copy link

nickp60 commented Dec 31, 2025

@vinisalazar Thanks for doing all this! I agree with changing the output to specify those 5 outputs; that seems in line with the description in the docs

@vinisalazar
Copy link
Contributor Author

@SPPearce could this be merged as is, and I can have a go at @nickp60's suggestion on a later PR (along with updates to rgi/main, perhaps)?

@SPPearce
Copy link
Contributor

Sorry, missed your message last week.
This module looks a bit ugh, but I see it is based on the rgi/main module which has apparently been in nf-core/modules for years. I also see that @jfy133 has been updating that recently, so I'll just ping him to take a look too.
It would be useful for you to swap to using a topic channel for the version: https://nf-co.re/blog/2025/version_topics before we merge it in.

  - Create topics field in meta.yml
@vinisalazar
Copy link
Contributor Author

@nf-core-bot fix linting

@github-actions
Copy link

Nothing for me to do here! 🤷
This is probably because the linting errors come from nf-core lint and have to be fixed manually (or with nf-core lint --fix).

Copy link
Member

@jfy133 jfy133 left a comment

Choose a reason for hiding this comment

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

Ok first pass, some general things:

  • please remove unnecessary whitespace
  • If you don't want to EMIT the DB_VERSION etc., you can remove them entirely. I seem to remember we exported for downstream usage (e.g. hAMRonization, which may still be useful here!)


rgi \\
bwt \\
${args} \\
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
${args} \\
${args2} \\

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, where exactly would this args2 come from?

Copy link
Member

Choose a reason for hiding this comment

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

So the ext.args variables are defined in pipelines' modules.config file. You need one args variable for each command/section of a piped command 1, so you don't duplicate the same argument for two diffren tools/subcommands

Footnotes

  1. https://nf-co.re/docs/guidelines/components/modules#each-command-must-have-an-args-variable

Copy link
Member

Choose a reason for hiding this comment

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

i.e., in this case you don't use it for anything (even if it has to be there) but it would be defined in the pipeline logic :)

Comment on lines 28 to 29
def read_one = reads instanceof List ? reads[0] : reads
def read_two = reads instanceof List && reads.size() > 1 ? reads[1] : null
Copy link
Member

Choose a reason for hiding this comment

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

Please use the nf-core convention of using meta.single to decide how to inject single or paired end reads

Copy link
Member

Choose a reason for hiding this comment

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

An example:

input = meta.single_end ? "in=${fastq.join(',')}" : "in=${fastq[0]} in2=${fastq[1]}"

Copy link
Contributor

Choose a reason for hiding this comment

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

Don't rush on that one, let me discuss with James ;)

Comment on lines +100 to +106
"content": [
null,
[
"test.temp.sam.temp.fsa"
],
null,
null
Copy link
Member

Choose a reason for hiding this comment

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

This looks odd, is it epected all the output to be null?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nickp60 would you be able to clarify this one? I'm not super familiar with rgi output.

Copy link
Contributor

@prototaxites prototaxites left a comment

Choose a reason for hiding this comment

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

Little thought about arity :)

Co-authored-by: Jim Downie <[email protected]>
Co-authored-by: James A. Fellows Yates <[email protected]>
@vinisalazar
Copy link
Contributor Author

@jfy133 @prototaxites thanks heaps for the review! I merged some of the suggestions and left comments in others.

@jfy133
Copy link
Member

jfy133 commented Jan 19, 2026

Responded - linting is failing though!

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.

5 participants