-
Notifications
You must be signed in to change notification settings - Fork 1
Description
I am writing to report an issue I encountered while using the mNSF package. When running the get_D function from process_multiSample.py, I consistently receive a TypeError related to the normalize_total()function. This occurs with both simulated and real datasets.
list_D = []
list_X = []
for ksample in range(nsample):
# Load data
sample_idx = ksample + 1
Y = pd.read_csv(f"synthetic_data/Y_sample{sample_idx}.csv", index_col=0)
X = pd.read_csv(f"synthetic_data/X_sample{sample_idx}.csv", index_col=0)
# Process data using mNSF's get_D function
D = process_multiSample.get_D(X, Y)
list_D.append(D)
list_X.append(D["X"])
TypeError Traceback (most recent call last)
Cell In[32], line 11
8 X = pd.read_csv(f"synthetic_data/X_sample{sample_idx}.csv", index_col=0)
10 # Process data using mNSF's get_D function
---> 11 D = process_multiSample.get_D(X, Y)
12 list_D.append(D)
13 list_X.append(D["X"])
File ~/Resource/Python_pkgs/mNSF/mNSF/process_multiSample.py:72, in get_D(X, Y, rescale_spatial_coords)
69 ad.layers = {"counts":ad.X.copy()}
71 # Normalize the total counts per cell
---> 72 pp.normalize_total(ad, inplace=True, layers=None, key_added="sizefactor")
74 # Log-transform the data
75 pp.log1p(ad)
File ~/miniconda3/envs/mnsf/lib/python3.10/site-packages/legacy_api_wrap/init.py:88, in legacy_api..wrapper..fn_compatible(*args_all, **kw)
85 tracebackhide = True
87 if len(args_all) <= n_positional:
---> 88 return fn(*args_all, **kw)
90 args_pos, args_rest = args_all[:n_positional], args_all[n_positional:]
92 if len(args_rest) > len(old_positionals):
TypeError: normalize_total() got an unexpected keyword argument 'layers'
Best regards,
xiaoqi wu