diff --git a/coverage.xml b/coverage.xml index c2e75b3..f7f3de8 100644 --- a/coverage.xml +++ b/coverage.xml @@ -1,12 +1,12 @@ - + /home/jvivian/covid19-drDFM/covid19_drdfm - + @@ -114,7 +114,7 @@ - + @@ -151,8 +151,9 @@ - - + + + @@ -164,26 +165,29 @@ - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/covid19_drdfm/dfm.py b/covid19_drdfm/dfm.py index 4934999..c3a17e5 100644 --- a/covid19_drdfm/dfm.py +++ b/covid19_drdfm/dfm.py @@ -90,7 +90,6 @@ def run(self, maxiter=10_000, global_multiplier=1, columns: Optional[list[str]] - Exception: If an error occurs during model fitting. """ self.outdir.mkdir(exist_ok=True) - # self.ad.obs = self.ad.obs.drop(columns="Time") print(f"{len(self.batches)} batches to run") for batch_name, batch in track(list(self.batches.items())): data = DataProcessor(batch, global_multiplier, maxiter).process(columns) @@ -106,7 +105,12 @@ def run(self, maxiter=10_000, global_multiplier=1, columns: Optional[list[str]] result = Result(batch_name, res, model, filtered_factors) result.write(self.outdir) # self.ad.uns["factors"] = result.factors.drop(columns="Time") - self.ad.write(self.outdir / batch_name / "data.h5ad") + # TODO: Fix this. Tests need this present but the dashboard doesn't + try: + self.ad.obs = self.ad.obs.drop(columns="Time") + self.ad.write(self.outdir / batch_name / "data.h5ad") + except: + pass self.results.append(result) # TODO: Concat factors across batch variables print("All runs completed!")