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

Fix star index issues #350

Merged
merged 3 commits into from
Aug 12, 2024
Merged

Fix star index issues #350

merged 3 commits into from
Aug 12, 2024

Conversation

grst
Copy link
Member

@grst grst commented Aug 8, 2024

Close #277
Close #327

PR checklist

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

@grst grst changed the base branch from master to dev August 8, 2024 09:07
@nf-core nf-core deleted a comment from github-actions bot Aug 8, 2024
Copy link

github-actions bot commented Aug 8, 2024

nf-core lint overall result: Passed ✅ ⚠️

Posted for pipeline commit ed25fd5

+| ✅ 204 tests passed       |+
#| ❔   4 tests were ignored |#
!| ❗   3 tests had warnings |!

❗ Test warnings:

  • 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!

❔ Tests ignored:

✅ Tests passed:

Run details

  • nf-core/tools version 2.14.1
  • Run at 2024-08-12 09:55:44

@grst grst requested a review from fmalmeida August 8, 2024 09:32
Copy link
Contributor

@nictru nictru left a comment

Choose a reason for hiding this comment

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

You can do it like this, but alternatively you can use the getGenomeAttribute function and assign the igenomes star index directly to params.star_index like it is done here. This way, you could leave line 70 as it is and params.star_index will always have the correct content.

My proposed approach does not overwrite params.star_index with an igenomes index if it has already been set manually, because nextflow does not allow overwriting parameters.

Will leave this up to you

@grst
Copy link
Member Author

grst commented Aug 8, 2024

That's great, wasn't aware of that tooling. I should probably do the same for gtf/fasta then.

@grst grst merged commit 23fcbdb into dev Aug 12, 2024
13 checks passed
@grst grst deleted the fix-star-index branch August 12, 2024 10:02
Comment on lines +70 to +71
star_index = params.star ? file(params.star_index, checkIfExists: true) : ( params.genome ? file( getGenomeAttribute('star'), checkIfExists: true ) : [] )
ch_star_index = [[id: star_index.baseName], star_index]
Copy link
Contributor

@nictru nictru Aug 12, 2024

Choose a reason for hiding this comment

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

I meant it like this:

params.star_index = getGenomeAttribute('star')
ch_star_index = [[id: star_index.baseName], file(params.star_index, checkIfExists: true)]

You are utilizing params.star which I have not seen elsewhere in the pipeline

Copy link
Member Author

Choose a reason for hiding this comment

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

dammit, good catch

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll fix it in a separate PR

Copy link
Member Author

@grst grst Aug 12, 2024

Choose a reason for hiding this comment

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

params.star_index = getGenomeAttribute('star')

But that logic seems to overwrite params.star_index with the one from iGenomes even when star_index is explicitly set. I find that a bit strange... or am I overlooking something here?

Copy link
Member Author

Choose a reason for hiding this comment

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

ah, just saw your edit above now

Copy link
Member Author

Choose a reason for hiding this comment

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

That simplifies things

Copy link
Contributor

Choose a reason for hiding this comment

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

💯

Copy link
Contributor

Choose a reason for hiding this comment

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

Feel free to request my review on a new PR

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