diff --git a/panpipes/funcs/plotting.py b/panpipes/funcs/plotting.py index 77496302..0fd248b3 100644 --- a/panpipes/funcs/plotting.py +++ b/panpipes/funcs/plotting.py @@ -79,7 +79,7 @@ def batch_scatter_two_var(plot_df, method, batch, palette_choice=None): colour=palette_choice[i], title=str(method_choice) + "|" + str(group_choice)) idx+=1 - logging.info(idx) + logging.debug(idx) return fig, axs diff --git a/panpipes/python_scripts/batch_correct_bbknn.py b/panpipes/python_scripts/batch_correct_bbknn.py index d05900cf..1585af77 100644 --- a/panpipes/python_scripts/batch_correct_bbknn.py +++ b/panpipes/python_scripts/batch_correct_bbknn.py @@ -61,24 +61,10 @@ # make sure that batch is a categorical adata.obs["comb_columns"] = adata.obs["comb_columns"].astype("category") - # test the minimum number of neighbours needed for the function to not break, - # the safe point is 40 in my tests - nn_test = nnb * len(adata.obs["comb_columns"].unique()) - if nn_test > 40: - nnb = nnb - 1 - L.info("reducing the numbers within batch to %i as the number of batches is high, \ - and bbknn will likely crash" % nnb) - if nnb < 1: - sys.exit("can't work with 0 neighbors_within_batch") # run bbknn adata = sc.external.pp.bbknn(adata, batch_key="comb_columns", copy=True, neighbors_within_batch=nnb) else: adata.obs[args.integration_col] = adata.obs[args.integration_col].astype("category") - nn_test = nnb * len(adata.obs[args.integration_col].unique()) - if nn_test > 40: - nnb = nnb - 1 - if nnb < 1: - sys.exit("can't work with 0 neighbors_within_batch") # run bbknn adata = sc.external.pp.bbknn(adata, batch_key=args.integration_col,