I am very sorry to bring this up again. Has anything changed to the format of cs files in the last 3-4 weeks? I cannot convert them back to relion anymore.
This used to work just fine:
csparc2star.py --copy-micrograph-coordinates particles.star cryosparc_P116_J670_001_particles.cs cryosparc_P116_J670_001_particles.star
But now it prints out a bunch of errors:
/Software/linux/64bit/pyem/pyem-20210614/pyem/pyem/star.py:536: FutureWarning: Columnar iteration over characters will be deprecated in future releases.
df[UCSF.IMAGE_INDEX], df[UCSF.IMAGE_PATH] =
/Software/linux/64bit/pyem/pyem-20210614/pyem/pyem/star.py:544: FutureWarning: Columnar iteration over characters will be deprecated in future releases.
df[UCSF.IMAGE_ORIGINAL_INDEX], df[UCSF.IMAGE_ORIGINAL_PATH] =
Traceback (most recent call last):
File “/Software/linux/64bit/pyem/pyem-20210614/pyem/csparc2star.py”, line 120, in
sys.exit(main(parser.parse_args()))
File “/Software/linux/64bit/pyem/pyem-20210614/pyem/csparc2star.py”, line 71, in main
df = star.smart_merge(df, coord_star, fields=fields, key=key)
File “/Software/linux/64bit/pyem/pyem-20210614/pyem/pyem/star.py”, line 146, in smart_merge
s2 = s2.set_index(key, drop=False)
File “/Software/linux/64bit/pyem/pyem-20210614/Miniconda/envs/pyem-20210614/lib/python3.9/site-packages/pandas/core/frame.py”, line 4727, in set_index
raise KeyError(f"None of {missing} are in the columns")
KeyError: ‘None of [None] are in the columns’
omitting --copy-micrograph-coordinates switch produces a star file, but the particle mrcs file names are modified with prefixes. I will try to remove them with a script, but there must be a better way…
Peter