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

Optional bowtie build #6

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

mahesh-panchal
Copy link
Collaborator

@mahesh-panchal mahesh-panchal commented Jul 10, 2024

PR checklist

Partially resolves #4.
Writes out the bowtie2 indices (and versions.yml) to the same directory as the fasta input. If this directory is used again in another run, the cached index will be used instead of rerunning the process.

The same cannot be done for samtools faidx (yet) because it's a separate process which writes it's own versions.yml. These
versions.yml are used later on for collecting versions information. Over the summer, the nf-core modules will go through a restructure making the versions.yml obsolete meaning the storeDir solution can then be used. It's currently included as a comment.

  • 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/ameta 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>).
  • 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).

@mahesh-panchal mahesh-panchal requested a review from ZoePochon July 10, 2024 09:15
Copy link

github-actions bot commented Jul 10, 2024

nf-core lint overall result: Passed ✅ ⚠️

Posted for pipeline commit 58a5bdd

+| ✅ 213 tests passed       |+
!| ❗  18 tests had warnings |!

❗ Test warnings:

  • readme - README contains the placeholder zenodo.XXXXXXX. This should be replaced with the zenodo doi (after the first release).
  • pipeline_todos - TODO string in README.md: Include a figure that guides the user through the major workflow steps. Many nf-core
  • pipeline_todos - TODO string in README.md: Fill in short bullet-pointed list of the default steps in the pipeline
  • pipeline_todos - TODO string in README.md: Describe the minimum required steps to execute the pipeline, e.g. how to prepare samplesheets.
  • pipeline_todos - TODO string in README.md: update the following command to include all required parameters for a minimal example
  • pipeline_todos - TODO string in README.md: If applicable, make list of people who have also contributed
  • pipeline_todos - TODO string in README.md: Add citation for pipeline after first release. Uncomment lines below and update Zenodo doi and badge at the top of this file.
  • pipeline_todos - TODO string in README.md: Add bibliography of tools and data used in your pipeline
  • pipeline_todos - TODO string in main.nf: Optionally add in-text citation tools to this list.
  • pipeline_todos - TODO string in main.nf: Optionally add bibliographic entries to this list.
  • pipeline_todos - TODO string in main.nf: Only uncomment below if logic in toolCitationText/toolBibliographyText has been filled!
  • pipeline_todos - TODO string in methods_description_template.yml: #Update the HTML below to your preferred methods description, e.g. add publication citation for this pipeline
  • pipeline_todos - TODO string in awsfulltest.yml: You can customise AWS full pipeline tests as required
  • pipeline_todos - TODO string in ci.yml: You can customise CI pipeline run tests as required
  • pipeline_todos - TODO string in usage.md: Add documentation about anything specific to running your pipeline. For general topics, please point to (and add to) the main nf-core website.
  • pipeline_todos - TODO string in output.md: Write this documentation describing your workflow's output
  • pipeline_todos - TODO string in test_full.config: Specify the paths to your full test data ( on nf-core/test-datasets or directly in repositories, e.g. SRA)
  • pipeline_todos - TODO string in test_full.config: Give any required params for the test so that command line flags are not needed

✅ Tests passed:

Run details

  • nf-core/tools version 2.14.1
  • Run at 2024-07-10 09:16:48

@mahesh-panchal
Copy link
Collaborator Author

While not as elegant as the storeDir solution, I can add another pipeline parameter for the samtools index and add some conditional logic to skip samtools faidx if this is present. What are your thoughts?

@@ -62,8 +62,13 @@ process {
publishDir = [ enabled: false ]
}
withName: 'BOWTIE2_BUILD' {
// Check if the Bowtie2 index exists and skip if it does
process.when = !new File(params.bowtie2_db + '.1.bt2').exists()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This doesn't work. process.when is not a directive. Also conditional execution should be included in the code to make it transparent.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Okay, I see. I still received an error about bowtie2-build when trying to run with the suggestions you made in this PR, that's why I came up with another suggestion.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If you have something I can test on, I can make sure it works.

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.

BOWTIE2_BUILD should only run when the output files don't already exist
2 participants