diff --git a/panpipes/python_scripts/batch_correct_scvi.py b/panpipes/python_scripts/batch_correct_scvi.py index 083d5912..fe853319 100644 --- a/panpipes/python_scripts/batch_correct_scvi.py +++ b/panpipes/python_scripts/batch_correct_scvi.py @@ -149,14 +149,17 @@ ) scvi_model_args = {k: v for k, v in params['rna']['scvi']['model_args'].items() if v is not None} +print(scvi_model_args) scvi_training_args = {k: v for k, v in params['rna']['scvi']['training_args'].items() if v is not None} +print(scvi_training_args) scvi_training_plan = {k: v for k, v in params['rna']['scvi']['training_plan'].items() if v is not None} +print(scvi_training_plan) L.info("Defining model") vae = scvi.model.SCVI(rna, **scvi_model_args) L.info("Running scVI") vae.train(**scvi_training_args, plan_kwargs=scvi_training_plan) - +L.info("Finished Training now saving model") vae.save(os.path.join("batch_correction", "scvi_model"), anndata=False) diff --git a/panpipes/python_scripts/batch_correct_totalvi.py b/panpipes/python_scripts/batch_correct_totalvi.py index 45d5bfa4..f497aa08 100644 --- a/panpipes/python_scripts/batch_correct_totalvi.py +++ b/panpipes/python_scripts/batch_correct_totalvi.py @@ -219,6 +219,10 @@ else: totalvi_training_plan = {k: v for k, v in params['multimodal']['totalvi']['training_plan'].items() if v is not None} +print(totalvi_model_args) +print(totalvi_training_args) +print(totalvi_training_plan) + L.info("Defining model") vae = scvi.model.TOTALVI(rna, **totalvi_model_args) L.info("Running totalVI") @@ -252,6 +256,7 @@ mdata.obsm["X_totalVI"] = vae.get_latent_representation() if batch_categories is not None: + L.debug(batch_categories) if type(batch_categories) is not list: batch_categories = [batch_categories] normX, protein = vae.get_normalized_expression( diff --git a/panpipes/python_scripts/batch_correct_wnn.py b/panpipes/python_scripts/batch_correct_wnn.py index befbd2a3..78b5860e 100644 --- a/panpipes/python_scripts/batch_correct_wnn.py +++ b/panpipes/python_scripts/batch_correct_wnn.py @@ -91,6 +91,7 @@ else: dict_graph[x]["obsm"] = None +L.info(dict_graph) if dict_graph["rna"]["obsm"] == "X_scvi": dict_graph["rna"]["obsm"] = "X_scVI" diff --git a/panpipes/python_scripts/make_mudataspatial_from_csv.py b/panpipes/python_scripts/make_mudataspatial_from_csv.py index 21c043b7..06453411 100644 --- a/panpipes/python_scripts/make_mudataspatial_from_csv.py +++ b/panpipes/python_scripts/make_mudataspatial_from_csv.py @@ -132,7 +132,7 @@ def check_dir_transform(infile_path, transform_file): L.info("Resulting AnnData is:") L.info(adata) -L.info("Creating MuData") +L.info("Creating MuData with .mod['spatial']") mdata = MuData({"spatial": adata}) diff --git a/panpipes/python_scripts/plot_custom_markers_umap.py b/panpipes/python_scripts/plot_custom_markers_umap.py index aba00db1..6ecbda1e 100644 --- a/panpipes/python_scripts/plot_custom_markers_umap.py +++ b/panpipes/python_scripts/plot_custom_markers_umap.py @@ -101,6 +101,7 @@ def main(adata, mod, layer_choice, df, basis): else: # we have multimodal object for mod in modalities: + print(mod) df_sub = df[df['mod'] == mod] mdata.update_obs() try: @@ -113,6 +114,7 @@ def main(adata, mod, layer_choice, df, basis): bb = [] if len(bb) > 0 : for basis, layer in product(bb, ll): + print(basis,layer) main(adata=mdata[mod], mod=mod, layer_choice = layer, diff --git a/panpipes/python_scripts/refmap_scvitools.py b/panpipes/python_scripts/refmap_scvitools.py index 67eeebbc..a858df47 100644 --- a/panpipes/python_scripts/refmap_scvitools.py +++ b/panpipes/python_scripts/refmap_scvitools.py @@ -144,6 +144,7 @@ max_epochs = 200 train_kwargs = {'weight_decay': 0.0} +print(train_kwargs) if reference_architecture=="scvi": L.info("Running scVI") diff --git a/panpipes/python_scripts/run_filter_spatial.py b/panpipes/python_scripts/run_filter_spatial.py index ff26ecda..980f7070 100644 --- a/panpipes/python_scripts/run_filter_spatial.py +++ b/panpipes/python_scripts/run_filter_spatial.py @@ -101,6 +101,7 @@ def test_matching_df_ignore_cat(new_df, old_df): # this will go through the modalities one at a time, # then the categories max, min and bool for mod in mdata.mod.keys(): + L.info(mod) if mod in filter_dict.keys(): for marg in filter_dict[mod].keys(): if marg == "obs": diff --git a/panpipes/python_scripts/run_scanpyQC_spatial.py b/panpipes/python_scripts/run_scanpyQC_spatial.py index a3c70830..3e3059c6 100644 --- a/panpipes/python_scripts/run_scanpyQC_spatial.py +++ b/panpipes/python_scripts/run_scanpyQC_spatial.py @@ -150,7 +150,7 @@ sys.exit("The path of the cell cycle genes tsv file '%s' could not be found" % args.ccgenes) -# Aug 2023: we now need to update the mdata object to pick the calc proportion outputs made on +#TODO: we now need to update the mdata object to pick the calc proportion outputs made on # spatial = mdata['spatial'] mdata.update()