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

Bwafallback #551

Merged
merged 25 commits into from
May 20, 2024
Merged

Bwafallback #551

merged 25 commits into from
May 20, 2024

Conversation

ramprasadn
Copy link
Collaborator

PR checklist

This PR adds an option to use bwamem as a fallback for bwamem2.

  • 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 pipeline conventions in the contribution docs
  • If necessary, also make a PR on the nf-core/raredisease branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Ensure the test suite passes (nextflow run . -profile test_one_sample,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

Copy link

github-actions bot commented May 17, 2024

nf-core lint overall result: Passed ✅ ⚠️

Posted for pipeline commit 2d5c918

+| ✅ 183 tests passed       |+
#| ❔   7 tests were ignored |#
!| ❗   1 tests had warnings |!

❗ Test warnings:

  • pipeline_todos - TODO string in awsfulltest.yml: You can customise AWS full pipeline tests as required

❔ Tests ignored:

  • files_exist - File is ignored: conf/modules.config
  • files_unchanged - File ignored due to lint config: .github/CONTRIBUTING.md
  • files_unchanged - File ignored due to lint config: .github/PULL_REQUEST_TEMPLATE.md
  • files_unchanged - File ignored due to lint config: assets/nf-core-raredisease_logo_light.png
  • files_unchanged - File ignored due to lint config: docs/images/nf-core-raredisease_logo_light.png
  • files_unchanged - File ignored due to lint config: docs/images/nf-core-raredisease_logo_dark.png
  • modules_config - modules_config

✅ Tests passed:

Run details

  • nf-core/tools version 2.14.1
  • Run at 2024-05-17 20:21:35

@ramprasadn ramprasadn marked this pull request as ready for review May 17, 2024 11:43
@ramprasadn ramprasadn requested review from rannick and jemten May 17, 2024 11:43
Comment on lines 36 to 52

if (params.bwa_as_fallback.equals(true)) {
ch_reads_input
.join(BWAMEM2_MEM.out.bam, remainder: true)
.branch { it ->
ERROR: it[2].equals(null)
return [it[0], it[1]] // return reads
SUCCESS: !it[2].equals(null)
return [it[0], it[2]] // return bam
}
.set { ch_fallback }

BWAMEM_FALLBACK ( ch_fallback.ERROR, ch_bwa_index, true )
ch_align = ch_fallback.SUCCESS.mix(BWAMEM_FALLBACK.out.bam)
ch_versions = ch_versions.mix(BWAMEM_FALLBACK.out.versions.first())
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

very clever 🌟

Copy link
Collaborator

@jemten jemten left a comment

Choose a reason for hiding this comment

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

Looks good

@ramprasadn ramprasadn merged commit 5e7b87e into dev May 20, 2024
6 checks passed
@ramprasadn ramprasadn deleted the bwafallback branch May 20, 2024 10:17
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