Skip to content

changing remotes for nf-core modules in reads_bwamem2_decontamination#119

Merged
vagkaratzas merged 3 commits intomainfrom
update/reads_bwamem2_decontamination
Dec 17, 2025
Merged

changing remotes for nf-core modules in reads_bwamem2_decontamination#119
vagkaratzas merged 3 commits intomainfrom
update/reads_bwamem2_decontamination

Conversation

@vagkaratzas
Copy link
Contributor

I removed the two local modules since they are not used in any other subworkflow here.

A couple of things. The bwamem nf-core module declares 4 inputs instead of the local one which declared 2. Should the subworkflow take 4 now as well? Or should we give empty stuff in the nf-tests @Ales-ibt ?

Which takes me to my next observation. The test folder is >10MB, and we could potentially remove everything and use the test files from the respective nf-core modules:
Example bwamem2_mem test:

input[0] = Channel.of([
                    [ id:'test', single_end:true ], // meta map
                    [file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)]
                ])
                input[1] = BWAMEM2_INDEX.out.index
                input[2] = Channel.of([[:], [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]])
                input[3] = false

Let me know your thought

@vagkaratzas vagkaratzas requested a review from Ales-ibt October 21, 2025 09:34
@vagkaratzas vagkaratzas marked this pull request as draft October 21, 2025 09:34
@vagkaratzas vagkaratzas requested a review from chrisAta October 21, 2025 09:35
@Ales-ibt
Copy link
Contributor

Hello there! Nice you are revisiting this subwf. However, I think we are not using it anymore, I am not sure. Instead, we should be using the bwamem2decontnobams module, that write down the decontaminated reads on the fly without generating intermediate bam files

@vagkaratzas
Copy link
Contributor Author

Hello there! Nice you are revisiting this subwf. However, I think we are not using it anymore, I am not sure. Instead, we should be using the bwamem2decontnobams module, that write down the decontaminated reads on the fly without generating intermediate bam files

raw-reads-analysis-pipeline is using it according to https://ebi-metagenomics.github.io/nf-modules/subworkflows/ebi-metagenomics/reads_bwamem2_decontamination/.
@timrozday-mgnify , I will need your input for this one. Are you still using it? Should you switch to bwamem2decontnobams which Ales suggested? Or would you prefer me updating the subworkflow here with 4 inputs as in nf-core?

Copy link
Contributor

@Ales-ibt Ales-ibt 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 good, I think we can make the change to use the four inputs as in nf-core module and use their tests.

ch_versions = Channel.empty()

BWAMEM2_MEM(ch_reads, ch_reference)
BWAMEM2_MEM(ch_reads, ch_reference) // TODO needs 4 inputs
Copy link
Contributor

Choose a reason for hiding this comment

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

The other two inputs are:

    tuple val(meta3), path(fasta)  // This is the reference genome in fasta format 
    val   sort_bam                 // This is a boolean: use samtools sort (true) or samtools view (false)

Fasta is required for cram output, so as far as we don't use cram as extension for the output format arg, we could pass an empty tuple.

@timrozday-mgnify
Copy link
Contributor

It looks like the module in raw-reads pipeline can be swapped for bwamem2decontnobams, however I just need to check that the samtools view flags are suitable.

@vagkaratzas
Copy link
Contributor Author

It looks like the module in raw-reads pipeline can be swapped for bwamem2decontnobams, however I just need to check that the samtools view flags are suitable.

Let me know so I can completely remove this subworkflow from the repo, along with the modules

@timrozday-mgnify
Copy link
Contributor

Yes it can be deleted, I will start a PR for modifying the sam flags in bwamem2decontnobams

@vagkaratzas vagkaratzas requested a review from Ales-ibt October 23, 2025 08:21
@vagkaratzas vagkaratzas marked this pull request as ready for review October 23, 2025 08:24
@Ales-ibt
Copy link
Contributor

Let's delete this module. Thanks @vagkaratzas

Copy link
Contributor

@Ales-ibt Ales-ibt left a comment

Choose a reason for hiding this comment

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

After discussion with @timrozday-mgnify, this module is going to be removed due to lack of use and the availability of an option that don't write bam files

@vagkaratzas vagkaratzas merged commit 5d7802f into main Dec 17, 2025
8 checks passed
@vagkaratzas vagkaratzas deleted the update/reads_bwamem2_decontamination branch December 17, 2025 12: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.

3 participants