dpeerlab / spectra

Supervised Pathway DEConvolution of InTerpretable Gene ProgRAms
MIT License
150 stars 17 forks source link

Clean up gene set dictionary in est_spectra #28

Closed wallet-maker closed 1 year ago

wallet-maker commented 1 year ago

Added two new parameters in est_spectra clean_gs = True and min_gs_num = 3 . If clean_gs is True est_spectra will clean up the gene set dictionary to:

  1. check that annotations dictionary cell type keys and adata cell types are identical.
  2. to contain only genes contained in the adata
  3. to contain only gene sets greater length min_gs_num

Fixes: ZeroDivisionError: float division by zero in est_spectra, comput_init_scores, mimno_coherence_2011