How to import particles from relion

Hi everyone,
I am trying to import particles from relion. But I’m confused about what should the inputs are.


Like-
What should be the source micrographs? Should it be CTF estimated?
What should be the “particle meta” and the “particle data”?

And could anyone also help explain what is the “Ignore raw data” “Length of mic. path suffix to cut” “Length of part. path suffix to cut”

Thanks a lot!

2 Likes

Hi Rui, if you are importing a particle star file from relion, typically you will only need to select it in the “particle meta path” field - no other inputs are necessary.

Cheers
Oli

2 Likes

Hi Oli,

Importing the particles by only specifying the “particle meta path” works for me however, I’m wondering if there is a method to import particles from RELION3 that allows one to link imported particles to their original motion&ctf corrected micrographs in RELION such that one could perform local motion correction in cryoSPARC?

Many thanks,

Christopher

I’m not sure - I don’t think so but perhaps one of the devs can comment? @apunjani @stephan?

Hi @Chris, @olibclarke,

It is possible to do this, though a bit trickier than just the standard particle import.
You must first import the micrographs (this can be before or after CTF estimation). Then import the particles, connecting the imported micrographs as the “Source Micrographs”. Then set the “Length of Mic. path suffix to cut” and “Length of part. path suffix to cut” (you may have to run the job and have it fail a couple times to get it right) so that the particles and micrographs can be corresponded (the matching is based on the remaining path string from the particle and micrograph after the suffix is cut from each). The output of this import job will contain particles that are linked to the imported micrographs/movies, so you can do local motion correction in cryoSPARC.

Hope this helps!

2 Likes

Aha, “Length of part. path suffix to cut”, now I understand what it means. Very cool.

Hi @apunjani,
I am having trouble importing the coordinate files. I keep on getting ‘OtherError: could not convert string to float: [mrc] [command-req-error]’ whenever I try to enter anything into “Length of Mic. path suffix to cut” and “Length of part. path suffix to cut”.
Perhaps I am doing something wrong?
When I continue regardless of the error I find that after the job runs but in parameters the values I place in are no longer there a(nd nothing comes out of local motion).

Thank you!
Kellie

I finally figured this out, and wanted to clarify on here for anyone encountering this problem in the future.

here’s how to import particle coordinates only, then map them to your micrographs within cryosparc.

  • either import your micrographs or do your alignments within cryosparc.
  • import particle stack (leave the mrc field blank) and click “ignore raw data”. At the top, drag and drop from cryosparc the micrographs that you will be linking those particles to.
  • Open up your particles.star file on your computer and look at the micrograph filenames for each particle. Take note here the suffix of each.
  • Do the same as above except now with your micrographs: either the ones that have been aligned in cryosparc or the ones that you have aligned and imported elsewhere.
  • Figure out how many characters need to be removed from the end of each in order for them to match perfectly. This includes the file extension and any punctuation each counting as one character.
  • The above two integers need to be inputted when you are importing your particle positions under the fields " mic path suffix to cut" (for the aligned images) and “particle path suffix to cut” (for the paths within your particles.star file).
  • for example your particles contains entries such as “…micrograph01_A.mrc” and the cryosparc aligned images outputs files such as “…micrograph01_rigid_aligned.mrc” then the integers to put in the above fields are 6 for “particles path suffix to cut” and 18 for “mic path suffix to cut”.

hope this helps someone!

11 Likes

hi again, I ended up getting the coordinates imported, then realized that my original picks were from 2x binned images (collected in super-res), while the image alignment in cryosparc apparently cannot do binning? So my idea to fix it was simply edit my input particles star file so that the X and Y coordinates are twice their value (using awk and simple 2*$1). Now the coordinates make sense on an unbinned super-res image. However when I try importing as described above (with everything working fine before) I get the error below. Actually I guess I also need to multiply the relion origin x/y. Hmm.

anyways, here’s the error:

Attributeerror: ‘float’ object has no attribute ‘rFind’.

Example of a particle before and after my modification (where columns 1 & 2 are X/Y coords). Main difference is the number of decimals.

before:
1688.778408 1939.250000 0.070000 101.200316 1 0.121375 19.670000 10938.519531 11022.889648 1.050000 032511@stacks/fromrelion.mrcs 10000.000000 image01.mrc 0.000000 2.700000 300.000000 1961 139.397835 89.142762 0.501717 4.281999e+05 0.442032 2 -0.44262 -4.52012 0.000000 1.000000 3.302000 2

after:
3377.56 3878.5 0.070000 101.200316 1 0.121375 19.670000 10938.519531 11022.889648 1.050000 032511@stacks/fromrelion.mrcs 10000.000000 image01.mrc 0.000000 2.700000 300.000000 1961 139.397835 89.142762 0.501717 4.281999e+05 0.442032 2 -0.44262 -4.52012 0.000000 1.000000 3.302000 2

3 Likes

for future reference, I solved the problem. I had a space in the header of the input particles file introduced through my awk command.

Leaving this here for the info on my workaround of the pixel size / binning problem.

1 Like

last update, be sure when importing your star file that you have made a simplified version of the .star file for import, containing just the micrograph name and X/Y coords. eg:

data_images

loop_
_rlnCoordinateX #1
_rlnCoordinateY #2
_rlnMicrographName #3

Hello,
I’ve been having issues importing particles from relion into cryosparc. I am trying import a particle set extracted in relion into cryosparc, linking these particles to imported micrographs that were motion corrected in relion.
Essentially what is happening is cryosparc is inverting the imported micrographs so when I import the particles, whatever is taken from the micrographs is junk.
Can anyone help with this? why are micrographs inverted between cryosparc and relion?


image on the left is from relion and image from the right is the same micrograph imported into cryosparc.
Thanks
Becca

Hi @lr001,

cryoSPARC reads TIFF images in their native byte order on disk (positive x fast axis, positive y slow axis) whereas other programs including Relion read the y-axis in the opposite order. This means that if you import movies (rather than micrographs which would be in MRC format and don’t have this issue), cryoSPARC and Relion would read them flipped relative to eachother.

If you are trying to extract particles from pre-motion-corrected micrographs, you should be able to do so by importing the particles .star file (with particle locations) and importing the micrographs (in MRC format) rather than the TIFF movies. Then there should not be any discrepancy.

Hope that helps!

3 Likes