Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't re-extract cryosparc particles #591

Closed
jhansen6 opened this issue Mar 23, 2020 · 5 comments
Closed

can't re-extract cryosparc particles #591

jhansen6 opened this issue Mar 23, 2020 · 5 comments

Comments

@jhansen6
Copy link

using relion 3.1b1-gnu

exported particles from cryosparc and hoping to process in relion. Has never been a problem until relion 3.1. The issue seems to be the extracted image stack.

cryosparc stacks are .mrc so I made a folder with symbolic links to the cryosparc stacks and renamed the symbolic links to .mrcs to keep relion happy. I then changed the particles star file to point to that folder.

This has worked in the past but relion 3.1 is now very picky for some reason about the rlnImageName data being accurate even if I want to simply re-extract X/Y coordinates from a micrograph.

The alternative is to use startools to separate out the micrograph particles and re-extract but then I would lose my particle alignments....

`in: /tmp/relion/src/jaz/obs_model.cpp, line 704
ERROR:
ObservationModel::getBoxSize: box sizes not available. Make sure particle images are available before converting/importing STAR files from earlier versions of RELION.

=== Backtrace ===
relion_preprocess_mpi(_ZN11RelionErrorC2ERKSsS1_l+0x41) [0x42ee91]
relion_preprocess_mpi(_ZNK16ObservationModel10getBoxSizeEi+0x69) [0x476399]
relion_preprocess_mpi(ZN13Preprocessing33extractParticlesFromOneMicrographER13MetaDataTable8FileNameiS2_S2_RllRdS4_S4_S4+0x369d) [0x45a5ad]
relion_preprocess_mpi(_ZN13Preprocessing31extractParticlesFromFieldOfViewE8FileNamel+0x697) [0x45cdf7]
relion_preprocess_mpi(_ZN16PreprocessingMpi19runExtractParticlesEv+0x3c6) [0x470476]
relion_preprocess_mpi(_ZN16PreprocessingMpi3runEv+0x12) [0x4708d2]
relion_preprocess_mpi(main+0x3b) [0x424a8b]
/lib64/libc.so.6(__libc_start_main+0xfd) [0x356061ed5d]
relion_preprocess_mpi() [0x4253d1]

ERROR:
ObservationModel::getBoxSize: box sizes not available. Make sure particle images are available before converting/importing STAR files from earlier versions of RELION.


MPI_ABORT was invoked on rank 5 in communicator MPI_COMM_WORLD
with errorcode 1.
`

`
data_optics

loop_
_rlnVoltage #1
_rlnSphericalAberration #2
_rlnAmplitudeContrast #3
_rlnOpticsGroup #4
_rlnImagePixelSize #5
_rlnImageDimensionality #6
300.000000 2.700000 0.100000 3 1.050000 2

data_particles

loop_
_rlnImageName #1
_rlnMicrographName #2
_rlnCoordinateX #3
_rlnCoordinateY #4
_rlnAngleRot #5
_rlnAngleTilt #6
_rlnAnglePsi #7
_rlnOriginXAngst #8
_rlnOriginYAngst #9
_rlnDefocusU #10
_rlnDefocusV #11
_rlnDefocusAngle #12
_rlnPhaseShift #13
_rlnCtfBfactor #14
_rlnOpticsGroup #15
_rlnRandomSubset #16
_rlnClassNumber #17
000066@cryosparc_stacks/exampleimage_particles.mrcs micrographs/image1.mrc 1951 751.5 11.107004 25.198326 -94.316772 20.212499 4.252500 7816.757812 2346.305176 265.678619 0.000000 0.000000 15 2 1
`

@biochem-fan
Copy link
Member

biochem-fan commented Mar 23, 2020

Where did this STAR file come from? Was it in the 3.0 format and then you converted it into 3.1 format? Did you change the path BEFORE you converted it into 3.1 format?

@jhansen6
Copy link
Author

the creators of cryosparc have made a python script to export the particles for use in relion. It exports as a relion 3.1 particle file as shown above. I did not convert it. The only change I made the the particle star file was pointed the path from the original cryosparc folder particle stacks to the newly generated symbolic links path. I wish there was a flag users could add that would ignore all the metadata except for X/Y coords and micrograph name and simply do the extraction (pulling CTF data from the micrographs file).

I tried using startool.py to separate out the particle picks by micrograph name while also keeping the Euler angles, but when I ran the extraction I got a segmentation fault. Ugh.

[emnode3:05274] *** Process received signal ***
[emnode3:05274] Signal: Segmentation fault (11)
[emnode3:05274] Signal code: Address not mapped (1)
[emnode3:05274] Failing at address: 0x2c
[emnode3:05274] [ 0] /lib64/libpthread.so.0[0x357040f790]
[emnode3:05274] [ 1] relion_preprocess_mpi(_ZNK16ObservationModel10getBoxSizeEi+0x13)[0x476343]
[emnode3:05274] [ 2] relion_preprocess_mpi(ZN13Preprocessing33extractParticlesFromOneMicrographER13MetaDataTable8FileNameiS2_S2_RllRdS4_S4_S4+0x369d)[0x45a5ad]
[emnode3:05274] [ 3] relion_preprocess_mpi(_ZN13Preprocessing31extractParticlesFromFieldOfViewE8FileNamel+0x697)[0x45cdf7]
[emnode3:05274] [ 4] relion_preprocess_mpi(_ZN16PreprocessingMpi19runExtractParticlesEv+0x3c6)[0x470476]
[emnode3:05274] [ 5] relion_preprocess_mpi(_ZN16PreprocessingMpi3runEv+0x12)[0x4708d2]
[emnode3:05274] [ 6] relion_preprocess_mpi(main+0x3b)[0x424a8b]
[emnode3:05274] [ 7] /lib64/libc.so.6(__libc_start_main+0xfd)[0x357001ed5d]
[emnode3:05274] [ 8] relion_preprocess_mpi[0x4253d1]
[emnode3:05274] *** End of error message ***

mpirun noticed that process rank 4 with PID 5274 on node emnode3 exited on signal 11 (Segmentation fault).

@biochem-fan
Copy link
Member

the creators of cryosparc have made a python script to export the particles for use in relion. It exports as a relion 3.1 particle file as shown above

Then the converter has a bug and they should repair it. The problem is that the optics table does not have the rlnImageSize column.

I wish there was a flag users could add that would ignore all the metadata except for X/Y coords and micrograph name and simply do the extraction (pulling CTF data from the micrographs file).

If you need CoordinateX/Y alone, you should split STAR files and mimic the result of AutoPick. If you want to keep Euler angles, you should use the re-extraction facility.

@jhansen6
Copy link
Author

thank you I will report the bug.

I got around the issue by extracting in relion 3.0.

@hugomh87
Copy link

Hi all, I have similar issue:

I have some good results from cryosparc (CS2). Now, I am trying to run relion 3.1 with-out loosing the info from CS2 like Euler angles, Optics group, aberrations correction...

When I try to run a Class2D or Class3D I always have same error:

ERROR:
ObservationModel::getBoxSize: box sizes not available. Make sure particle images are available before converting/importing STAR files from earlier versions of RELION.

Here what I did:
csparc2star.py P43_J294_passthrough_particles.cs P43_J294_passthrough_particles.star

data_optics

loop_
_rlnVoltage #1
_rlnSphericalAberration #2
_rlnAmplitudeContrast #3
_rlnOpticsGroup #4
_rlnImagePixelSize #5
_rlnImageDimensionality #6
300.000000 2.890161 0.100000 0 0.820000 2
300.000000 2.888689 0.100000 1 0.820000 2
300.000000 2.900845 0.100000 2 0.820000 2
300.000000 2.675320 0.100000 3 0.820000 2
300.000000 2.611613 0.100000 4 0.820000 2
300.000000 2.605872 0.100000 5 0.820000 2

data_particles

loop_
_rlnImageName #1
_rlnMicrographName #2
_rlnCoordinateX #3
_rlnCoordinateY #4
_rlnAnglePsi #5
_rlnOriginXAngst #6
_rlnOriginYAngst #7
_rlnDefocusU #8
_rlnDefocusV #9
_rlnDefocusAngle #10
_rlnPhaseShift #11
_rlnCtfBfactor #12
_rlnOpticsGroup #13
_rlnRandomSubset #14
_rlnClassNumber #15
000004@J94/extract/XXXXX31_14.27.48_patch_aligned_doseweighted_particles.mrcs J69/motioncorrected/XXXXX31_14.27.48_patch_aligne
d_doseweighted.mrc 989 2062 72.551018 1.332500 0.266500 27338.964844 27009.175781 -40.983135 -0.627789 0.000000 4 1 7

import job of the star file works. No errors.
Class3D:
which relion_refine --o Class3D/job009/run --i Import/job006/P43_J294_passthrough_particles.star --ref make_star_fromCS2relion/cryosparc_P43_J294_006_volume_map_sharp.mrc --firstiter_cc --ini_high 8 --dont_combine_weights_via_disc --pool 3 --pad 2 --skip_gridding --ctf --iter 25 --tau2_fudge 4 --particle_diameter 200 --K 4 --flatten_solvent --zero_mask --solvent_mask mask.mrc --skip_align --sym C1 --norm --scale --j 8 --pipeline_control Class3D/job009/
following error

ERROR:
ObservationModel::getBoxSize: box sizes not available. Make sure particle images are available before converting/importing STAR files from earlier versions of RELION.

Apparently, this is a csparc2star.py problem.

Can someone help me?
Best,
Hugo MH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants