Export particles to relion

Hi All,
I have an issue with csparc2star.py after the new update to cryosparc v3.31. I extracted particles in Relion, then imported them in Cryosparc where I did 2D classification. I would like to convert selected particles back into .star file, but I get the an error (copied below). I have done the same pipeline before the new cryosparc update and it worked fine.

Coordinates merge key: None
Traceback (most recent call last):
  File "./csparc2star.py", line 120, in <module>
    sys.exit(main(parser.parse_args()))
  File "./csparc2star.py", line 71, in main
    df = star.smart_merge(df, coord_star, fields=fields, key=key)
  File "/home/rsarsam/Scripts/pyem-master-oct2020/pyem/star.py", line 143, in smart_merge
    s2 = s2.set_index(key, drop=False)
  File "/home/rsarsam/anaconda3/lib/python3.8/site-packages/pandas/core/frame.py", line 4727, in set_index
    raise KeyError(f"None of {missing} are in the columns")

Any ideas or help how to fix this issue?
Thanks!

1 Like

Hi Reta,

I think it would be useful to check what the header of the star file is. How many columns are described?

Best,

Jean-Paul

Hi Reta,

What command did you use for csparc2star? If you are using --copy-micrograph-coordinates it will not work anymore since all the rlnMicrographName and rlnImageName paths now have a bunch of random numbers in them. Here is my workaround if that is your issue. https://github.com/ryanfeathers/CryoEM_Scripts/blob/d71957b7f2463d819aac1757688565114ff6e59e/replacepaths.py

Best,

Ryan

@retasarsam A related fix has been submitted to the pyem developer for review.

1 Like