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:
- Atlas QC
- MT/HLA/RPL gene removal
- Highly variable gene selection
- Aggregate and subcluster
- Select DE genes
- 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)
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:
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)