You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi !
I want to use H5AD as input format to use scaden simulate as it is indicated in the help comand, but here is the error I get :
(/CONDAS/users/username/scaden) [username@gknwwd2 example]$ scaden simulate -n 100 -d ./example_data/ -f h5ad --pattern "*.h5ad"
____ _
/ ___| ___ __ _ __|| ___ _ __
\___ \ / __/ _`|/ _`|/ _ \ '_ \ ___) | (_| (_| | (_| | __/ | | | |____/ \___\__,_|\__,_|\___|_| |_|INFO Datasets: ['reference'] bulk_simulator.py:84INFO Simulating data from reference bulk_simulator.py:89INFO Loading reference dataset ... bulk_simulator.py:141Traceback (most recent call last): File "/CONDAS/users/username/scaden/bin/scaden", line 10, in <module> sys.exit(main()) File "/CONDAS/users/username/scaden/lib/python3.8/site-packages/scaden/__main__.py", line 48, in main cli() File "/CONDAS/users/username/scaden/lib/python3.8/site-packages/click/core.py", line 1157, in __call__ return self.main(*args, **kwargs) File "/CONDAS/users/username/scaden/lib/python3.8/site-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) File "/CONDAS/users/username/scaden/lib/python3.8/site-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/CONDAS/users/username/scaden/lib/python3.8/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) File "/CONDAS/users/username/scaden/lib/python3.8/site-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs) File "/CONDAS/users/username/scaden/lib/python3.8/site-packages/scaden/__main__.py", line 207, in simulate simulation( File "/CONDAS/users/username/scaden/lib/python3.8/site-packages/scaden/simulate.py", line 22, in simulation bulk_simulator.simulate() File "/CONDAS/users/username/scaden/lib/python3.8/site-packages/scaden/simulation/bulk_simulator.py", line 90, in simulate self.simulate_dataset(dataset) File "/CONDAS/users/username/scaden/lib/python3.8/site-packages/scaden/simulation/bulk_simulator.py", line 104, in simulate_dataset data_x, data_y = self.load_dataset(dataset) File "/CONDAS/users/username/scaden/lib/python3.8/site-packages/scaden/simulation/bulk_simulator.py", line 201, in load_dataset x = pd.DataFrame(data_h5ad.X.todense()) AttributeError: 'numpy.ndarray' object has no attribute 'todense'
The reason of this is that I write my H5AD file at the end of preprocessing provided in Jupyter Notebooks available in paper_data.tar.gz on figshare (version 1).
The thing is, after the preprocessing, the data is stored in the anndata.X as numpy array with dense data (obtained throug preprocessing with regress_out() function) and cannot be handled by the simulate function. I suppose that the simulate function aimed to process sparse data, even in H5AD format, with a sparse matrix (see Scipy sparse formats).
Maybe it would be a good idea to add a warning in the documentation and/or add a verification in the code to handle this case.
Hope it will be useful for someone !
WanderingHedgie
The text was updated successfully, but these errors were encountered:
Hi !
I want to use H5AD as input format to use
scaden simulate
as it is indicated in the help comand, but here is the error I get :The reason of this is that I write my H5AD file at the end of preprocessing provided in Jupyter Notebooks available in paper_data.tar.gz on figshare (version 1).
The thing is, after the preprocessing, the data is stored in the anndata.X as numpy array with dense data (obtained throug preprocessing with
regress_out()
function) and cannot be handled by the simulate function. I suppose that the simulate function aimed to process sparse data, even in H5AD format, with a sparse matrix (see Scipy sparse formats).Maybe it would be a good idea to add a warning in the documentation and/or add a verification in the code to handle this case.
Hope it will be useful for someone !
WanderingHedgie
The text was updated successfully, but these errors were encountered: