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

Standardize conversion workflow #369

Merged
merged 114 commits into from
Dec 2, 2024
Merged

Standardize conversion workflow #369

merged 114 commits into from
Dec 2, 2024

Conversation

fmalmeida
Copy link
Contributor

@fmalmeida fmalmeida commented Sep 16, 2024

Summary

Hi,
This work relates to #310 and discussion that is happening in slack.

Currently, the implementation as been done only for Star aligner so I am opening the PR so we can have a proper discussion and alignment over what the code should look like, before I can apply the same for the other aligners.

PoC overview

  • Aligners
    • star
    • alevin
    • cellranger
    • kallisto
  • Make mtx_to_h5ad module have aligner-specific template to avoid having a gigantic single module with multiple conditions
  • added a copy of cellbender subworkflow from scdownstream to perform a more straightforward empty drops filter that keeps format of h5ad input
    • Thus, not requiring further work after filter, since it will keep the format of its input, which should be the standardized h5ad
  • Moved h5ad to Rds conversion to use anndataR package so to keep it simple

TODOs summary

  • Define where (and what) h5ad format standardization should happen
    • Should it happen directly in the aligner-specific template script (would be the most straightforward) or should it be in a separate (maybe the anndataR conversion) module that will perform the standardization and generate a new h5ad for all aligners?
  • Create the anndataR docker container within nf-core (currently is using my personal repo)
  • Define what is the desired standardization for h5ad
    • which commands should be executed?
  • Cleanup repo (remove old modules currently as backup, documentation, etc.)
  • Do we want to keep emptydrops? Or only cellbender?
  • output SingleCellExperiment in addition to Seurat object via anndataR
  • Use AnnData.layers to store spliced/unspliced matrices where they are available.
  • Don't use params in modules: Standardize conversion workflow #369 (comment)
  • TODO CONCAT h5ad and MTX to h5ad should also have versions.yaml output
  • update tests (at least snapshots of generated h5ad and rds objects)
    • alevin
    • star
    • cellranger
    • kallisto
    • cellrangermulti

Addressed issues

Close #310
Close #330
Close #366
Close #370
Close #385

@fmalmeida fmalmeida requested a review from grst September 16, 2024 08:46
@fmalmeida fmalmeida self-assigned this Sep 16, 2024
@fmalmeida fmalmeida linked an issue Sep 16, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Sep 16, 2024

nf-core pipelines lint overall result: Passed ✅ ⚠️

Posted for pipeline commit b498ddc

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

❗ Test warnings:

  • pipeline_todos - TODO string in nextflow.config: Optionally, you can add a pipeline-specific nf-core config at https://github.com/nf-core/configs
  • 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 3.0.2
  • Run at 2024-12-02 14:04:20

@fmalmeida fmalmeida requested a review from apeltzer September 19, 2024 12:06
zxBIB Almeida,Felipe (GCBDS) EXTERNAL added 2 commits September 26, 2024 09:25
@fmalmeida fmalmeida linked an issue Nov 28, 2024 that may be closed by this pull request
@fmalmeida fmalmeida marked this pull request as ready for review November 28, 2024 12:32
@fmalmeida
Copy link
Contributor Author

fmalmeida commented Nov 28, 2024

Hi @grst ,
I have now merged dev into this branch, and resolved the conflicts.
From them, there are two I have to highlight:

  1. I had to update the lines here because the workflow was trying to load the igenomes data by overwritting the params. inside the workflow, which is ultimately not possible in nextflow.
  2. The new STAR version that has been added to the pipeline in dev cannot use the star index from igenomes because it is from a different version
    • Thus the changes here

Also already updated the documentation.

Copy link
Member

@grst grst left a comment

Choose a reason for hiding this comment

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

some more tiny things, everything else is great!

@grst grst merged commit d3d8a6f into dev Dec 2, 2024
14 checks passed
@grst grst deleted the standardize-conversion-workflow branch December 2, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

test_full-profile not running out-of-the-box Clean up mtx conversion code
3 participants