mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-03 23:28:11 +08:00
fix for incorrect stats computation in diff exp t-test (#2318)
* 2211 fixes * lint * lint * add missing test and bug found by test * change terminology for count distribution * update scanpy requirement * update scanpy requirement
This commit is contained in:
@@ -44,6 +44,8 @@ class DatasetConfig(BaseConfig):
|
||||
self.diffexp__lfc_cutoff = default_config["diffexp"]["lfc_cutoff"]
|
||||
self.diffexp__top_n = default_config["diffexp"]["top_n"]
|
||||
|
||||
self.X_approx_distribution = default_config["X_approx_distribution"]
|
||||
|
||||
except KeyError as e:
|
||||
raise ConfigurationError(f"Unexpected config: {str(e)}")
|
||||
|
||||
@@ -58,6 +60,7 @@ class DatasetConfig(BaseConfig):
|
||||
self.handle_user_annotations(context)
|
||||
self.handle_embeddings()
|
||||
self.handle_diffexp(context)
|
||||
self.handle_X_approx_distribution()
|
||||
|
||||
def handle_app(self):
|
||||
self.validate_correct_type_of_configuration_attribute("app__scripts", list)
|
||||
@@ -199,3 +202,10 @@ class DatasetConfig(BaseConfig):
|
||||
"CAUTION: due to the size of your dataset, "
|
||||
"running differential expression may take longer or fail."
|
||||
)
|
||||
|
||||
def handle_X_approx_distribution(self):
|
||||
self.validate_correct_type_of_configuration_attribute("X_approx_distribution", str)
|
||||
if self.X_approx_distribution not in ["normal", "count"]:
|
||||
raise ConfigurationError(
|
||||
"X_approx_distribution has unknown value -- must be 'normal' or 'count'."
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user