barahona-research-group / RamanSPy

RamanSPy: An open-source Python package for integrative Raman spectroscopy data analysis
https://ramanspy.readthedocs.io
BSD 3-Clause "New" or "Revised" License
81 stars 17 forks source link

Can't load the Volumetric cell data #5

Open ShuleiWu opened 1 year ago

ShuleiWu commented 1 year ago

I would like to use the built-in functionramanspy.datasets.volumetric_cells(cell_type='THP-1', folder=None) from this Python package to load the dataset. However, the downloaded raw dataset files have the .wip file extension, while the provided function can only load .mat files. I'm unsure how to proceed. I have attempted to convert the .wip files to .mat format, but it was unsuccessful.

ShuleiWu commented 1 year ago
dir_ = r'E:\pyworkspace\test\rdata\Kallepitis-et-al-Raw-data\Figure 3'
cells_volume = rp.datasets.volumetric_cells(cell_type='THP-1', folder=dir_)

File C:\ProgramData\anaconda3\Lib\site-packages\ramanspy\core.py:291, in SpectralVolume.from_image_stack(cls, image_stack) 288 if not utils.is_aligned(image_stack): 289 ValueError("Cannot create a spectral volume out of unaligned spectral images. Spectral axes must match.") --> 291 return cls(np.dstack([image.spectral_data[..., np.newaxis, :] for image in image_stack]), 292 image_stack[0].spectral_axis)

File <__array_function__ internals>:200, in dstack(*args, **kwargs)

File C:\ProgramData\anaconda3\Lib\site-packages\numpy\lib\shape_base.py:723, in dstack(tup) 721 if not isinstance(arrs, list): 722 arrs = [arrs] --> 723 return _nx.concatenate(arrs, 2)

File <__array_function__ internals>:200, in concatenate(*args, **kwargs)

ValueError: need at least one array to concatenate

dgeorgiev21 commented 1 year ago

Thank you for reaching out!

Yes, the .wip file is a format that RamanSPy cannot parse directly. To load such files into RamanSPy, one needs to first convert them to MATLAB files, which can be done by using the manufacturer software. Unfortunately, this software is not freely available.

We are working with some of the authors of the original paper (Kallepitis, C. et al. Quantitative volumetric Raman imaging of three dimensional cell cultures. Nat. Commun. 8, 14843 doi: 10.1038/ncomms14843 (2017)) to make sure the corresponding MATLAB files are also provided in their Zenodo repository.

In the meantime, you may check out some of the other datasets available in RamanSPy.


If you find RamanSPy useful, please consider starring the project on GitHub! Your support means a lot!

ShuleiWu commented 1 year ago

OK, thank you for your response

lanery commented 9 months ago

Any update on this? I am running into the same issue. Would also be nice to add this in the documentation for this example until the .mat files are available and/or RamanSPy works with .wip files.

Presumably you have already converted the .wip files into .mat files given that you load the Kallepitis et al. dataset in the example notebook, no?