Hi,
I’m having this odd error while converting files using csparc2star.py.
I’m using this following command:
python3 /usr/local/pyem/csparc2star.py cryosparc_P24_J254_009_particles.cs P24_J254_passthrough_particles.cs test.star --micrograph-path /media/data4/micrograph --swapxy --boxsize 400
The error I’m getting is:
/usr/local/pyem/pyem/metadata.py:333: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
[cs[names[c]][i] for i, c in enumerate(cls)]))
Columns must be same length as key
Traceback (most recent call last):
File "/usr/local/pyem/csparc2star.py", line 42, in main
df = metadata.parse_cryosparc_2_cs(cs, passthroughs=args.input[1:], minphic=args.minphic, boxsize=args.boxsize, swapxy=args.swapxy)
File "/usr/local/pyem/pyem/metadata.py", line 403, in parse_cryosparc_2_cs
ptdf = cryosparc_2_cs_model_parameters(pt, ptdf, minphic=minphic)
File "/usr/local/pyem/pyem/metadata.py", line 333, in cryosparc_2_cs_model_parameters
[cs[names[c]][i] for i, c in enumerate(cls)]))
File "/usr/local/lib/python3.7/site-packages/pandas/core/frame.py", line 2935, in __setitem__
self._setitem_array(key, value)
File "/usr/local/lib/python3.7/site-packages/pandas/core/frame.py", line 2961, in _setitem_array
raise ValueError("Columns must be same length as key")
ValueError: Columns must be same length as key
Required fields could not be mapped. Are you using the right input file(s)?
Now the thing I don’t understand is this same command worked for me for another set of refined particles. When I changed the boxsize (and re-extracted in CS) and ran another NUrefinement and trying to convert, I’m getting this error.
Please suggest. I don’t understand why it worked once and not working again.
Thanks