Skip to content

Trouble converting exported .cs file #124

Open

Description

@SI18

Hello! I have an issue with using csparc2star. I enter the following commands:

conda activate pyem

(pyem) csparc2star.py --boxsize 150 --copy-micrograph-coordinates path J26_particles_exported.cs J26_particles_exported.star

Traceback (most recent call last):
File "/home/sofia.ievleva/miniconda3/bin/csparc2star.py", line 33, in
sys.exit(load_entry_point('pyem', 'console_scripts', 'csparc2star.py')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sofia.ievleva/pyem/pyem/cli/csparc2star.py", line 185, in main
sys.exit(main(parser.parse_args()))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sofia.ievleva/pyem/pyem/cli/csparc2star.py", line 122, in main
df = star.smart_merge(df, coord_star, fields=fields, key=key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sofia.ievleva/pyem/pyem/star/star.py", line 209, in smart_merge
s2 = s2.set_index(key, drop=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sofia.ievleva/miniconda3/lib/python3.12/site-packages/pandas/core/frame.py", line 6122, in set_index
raise KeyError(f"None of {missing} are in the columns")
KeyError: 'None of [None] are in the columns'

I have downloaded everything including miniforge3 in hopes that it can help but this error still occurs. What can be done to fix this error? Thank you.

Activity

  1. changed the title [-]Downloaded pyem and miniconda3 but csparc2star.py still is not working[/-] [+]Downloaded pyem and miniconda3 but csparc2star.py still not working[/+] on Oct 16, 2024
  2. asarnow commented on Oct 17, 2024

    @asarnow
    Owner

    Looks like the image names don't match between the star file and the exported particles.

  3. SI18 commented on Oct 17, 2024

    @SI18
    Author

    Thank you for your response! Could you please share what image names I need to change and how I can do that? I currently have .cs file and micrograph coordinates extracted from Relion as particles.star but I cannot seem to open .cs file and no matter what I do, I cannot convert it to .star.

  4. changed the title [-]Downloaded pyem and miniconda3 but csparc2star.py still not working[/-] [+]Trouble converting exported .cs file[/+] on Oct 17, 2024
  5. asarnow commented on Oct 17, 2024

    @asarnow
    Owner

    Start by converting the .cs file on its own and take a look. Then you can see if there is some mismatch in the image file names such that the ones in your old star file don't match anymore.

  6. andreanans commented on Nov 22, 2024

    @andreanans

    You probably need to add --strip-uid to your command. Try this:
    csparc2star.py --strip-uid --boxsize 150 --copy-micrograph-coordinates path J26_particles_exported.cs J26_particles_exported.star

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions