Skip to content

Split reference atlas preprocessing out of setup_reference #5

Description

@robinfallegger

Hi @earmingol!

Following up to issue #4, I was thinking about some restructuring that makes it easier on the user to tweak the preprocessing steps in setup_reference().

Currently, this function does the following steps:

  1. Atlas QC
  2. MT/HLA/RPL gene removal
  3. Highly variable gene selection
  4. Aggregate and subcluster
  5. Select DE genes
  6. Return dict

This is in line with the way it was structured in the R version of the package as well. However, I believe that steps 1-3 should be left up to the user as these steps should be consistent with the rest of the analysis project. For example, it might make more sense to keep the same HVG / gene space as was used for integration and cell type annotation to stay consistent.

Therefore, I am working on moving those steps out of the setup_reference() function and raise errors for 1./3. and issue a warning for 2. This would be a breaking change and not backwards compatible. But it would have the advantage of not being dependent on scanpy anymore.

If you think this is useful, I can open a PR here as well. I am open to discuss actual implementation too. (I also have similar thoughts about exposing more internal parameters of the fitting step too)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions