Possible to recover intermediate files?

Hello,

I am new to EM processing and did not realize I need half maps for submission until I had already erased the intermediate files (containing the half maps). I had already built a model into the full map and would really like to avoid fully reprocessing my data. Would it be possible to recover this data somehow or do I need to upload my raw data and reprocess?

Thank you all in advance!

Best,
Ty

The half maps are not intermediate files - they are present in the final set of files. Are you having trouble accessing them?

1 Like

Hi olibclarke,
Apologies for the confusion - I don’t have access to the intermediate files nor the final set of files (containing half maps). The files names are present under the respective cryosparc job in Terminal, but only available as .cs files which I cannot use (i.e. ‘cryosparc_[name]map_half_A.cs’ and 'cryosparc[name]_map_half_B.cs’).

Hi @tyoung,

Do you still have particles.cs available? A way to reconstruct the half-maps that I can think of:

  1. Convert the particles.cs to .star with csparc2star.py
  2. run relion_reconstruct --i your_particles.star --subset 1 --ctf --o blah_half1.mrc (change to --subset 2 for the second half-map (blah_half2.mrc). Add --sym flag if there was symmetry imposed during refinement. e.g. --sym c2

This assumes that you at least still have your particle stack. Otherwise, I’d re-extract and run homogeneous reconstruction. (just to stay in cryoSPARC without the conversion step + relion)

Thank you for the help kookjookeem. It does seem like this solution might work (a .star file was created) but I ran into an issue when running relion_reconstruct because my map was composed of particles from two separates collection that were combined into one. Is there a way to combine particle-set1.star and particle-set2.star?

Ok! Even if the .star was successfully created, as a sanity check, I would check the paths of the particle images written in the .star file. What was the relion_reconstruct error message, if you are getting any? If I understood correctly, what you asked was one set of half-maps from a homogeneous/NU-refinement that resulted your final 3D map (presumably a “homogeneous” set of particles for one single species of protein/protein conformation, regardless of which dataset the particles came from). In that case, the star file will retain GS split particle sets (subsets 1 and 2) used during the homogeneous (NU-) refinement. In other words, the particles were already “combined” when you ran homogeneous/NU-refinement.

If you would like to obtain two sets of half-maps, you could first split the star by particle paths or micrograph paths, then apply the same procedure. However, I am not sure if splitting a star from a single homo.refine job for two separate datasets to reconstruct their half-maps is a proper way to show the half-maps, since all the particles are processed to reconstruct a single output map.

Yes exactly. All I want is one set of half-maps from a NU-refinement that resulted in my final map. I do not need two sets of half maps. The NU-refinement job is in P306 along with ~ half of the particles. The other ~ half of the particles were imported from P295. Here is the error message:

[tyoung@**** ~/working]$ relion_reconstruct --i P306_J62_particles.star --subset 1 --ctf --o P306_J62_halfA.mrc
in: /tmp/sbgrid/spack-stage/spack-stage-relion-4.0.1-2orbjvmut3nz35g76te35djfkczeh3fg/spack-src/src/image.h, line 276
ERROR: 
Cannot read file imports/P295_J42_select_2D/P295_J42_particles_selected/J40/extract/000694206436401271645_220203_project-name_48-10_0003_patch_aligned_doseweighted_particles.mrc It does not exist
=== Backtrace  ===
/programs/x86_64-linux/relion/4.0.1_cu11.6/bin/relion_reconstruct(_ZN11RelionErrorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_l+0x5f) [0x458baf]
/programs/x86_64-linux/relion/4.0.1_cu11.6/bin/relion_reconstruct(_ZN13fImageHandler8openFileERK8FileNamei+0x81a) [0x482a1a]
/programs/x86_64-linux/relion/4.0.1_cu11.6/bin/relion_reconstruct(_ZN5ImageIdE4readERK8FileNameblbb+0xe3) [0x489013]
/programs/x86_64-linux/relion/4.0.1_cu11.6/bin/relion_reconstruct(_ZN13Reconstructor10initialiseEv+0x62f) [0x4759ff]
/programs/x86_64-linux/relion/4.0.1_cu11.6/bin/relion_reconstruct(_ZN13Reconstructor3runEv+0x35) [0x47d765]
/programs/x86_64-linux/relion/4.0.1_cu11.6/bin/relion_reconstruct(main+0x31) [0x44edc1]
/lib64/libc.so.6(__libc_start_main+0xf5) [0x7f82132eb555]
/programs/x86_64-linux/relion/4.0.1_cu11.6/bin/relion_reconstruct() [0x44f6ff]
==================
ERROR: 
Cannot read file imports/P295_J42_select_2D/P295_J42_particles_selected/J40/extract/000694206436401271645_220203_project-name_48-10_0003_patch_aligned_doseweighted_particles.mrc It does not exist

Thanks!

Have you checked if the imported particle stacks do indeed exist in PROJECT/imports/P295_J42_select_2D/P295_J42_particles_selected/J40/extract/, where Relion is looking for according to the star?

Could you try running relion_reconstruct in the parent directory of imports?

So that particular .mrc file does exist in the import directory within the project folder, but all the files within ‘extract’ are in red (archived files?). Interestingly, the file giving the error is not the first file contained within the folder ‘extract’. There are some ~100 .mrc files before this particular one.
And I have tried running the same relion_reconstruct command in ~, import, and extract without any luck.

Run relion_reconstruct from the directory which imports/ is present.

RELION does everything relative to the project root directory (not the same as root) so all the references in the .star file are relative to that project root.

e.g.: if the CryoSPARC project directory is /data/CS-myproject/ which contains the import directory, you need to run relion_reconstruct from the CS-myproject directory.

edit: You can also go symlink-happy if you want to put the RELION directory somewhere else, but for your purposes I don’t think there is much to be gained by making things more complicated.

Are they symbolic links? It sounds like the particles.mrc files exist as symlinks, but the symlinks are broken. You can check the symlinks with ls -l *particles.mrc. If they are symlinks, please confirm the linked files exist at their original paths.

I agree with @rbs_sci this might get complicated for your purposes.

If relion_reconstruct still can’t find the particle stacks even when it’s run from the cryosparc project directory, let us know here. We can try simpler ways and stay within cryosparc. Do you still have access to cryosparc GUI? If you do, can you run homogeneous reconstruction only with the output particles from the NU-refinement (P306 J62)?

Thank you all for your help!

Here is an example line of output from ls -l *particles.mrc within /data/work/tyoung/cryosparc/P306/imports/P295_J42_select_2D/P295_J42_particles_selected/J40/extract

lrwxrwxrwx 1 cryosparc cryosparc 141 Mar  9  2022 018332089633131301990_220203_col18-18L-spike_48-18_0000_patch_aligned_doseweighted_particles.mrc -> /data/work/tyoung/cryosparc/P295/J40/extract/018332089633131301990_220203_col18-18L-spike_48-18_0000_patch_aligned_doseweighted_particles.mrc

It appears that these files are indeed symlinks and the majority of the linked files do not exist in the symlink path. There are only two .mrc files in this symlink path (‘/data/work/tyoung/cryosparc/P295/J40/extract/’) whereas there are some 100+ .mrc files in the imports folder of P306 (‘/data/work/tyoung/cryosparc/P306/imports/P295_J42_select_2D/P295_J42_particles_selected/J40/extract’). The actual files are located here instead: (‘/data/work/tyoung/cryosparc/P295/exports/jobs/P295_J42_select_2D/P295_J42_particles_selected/J40/extract’).

I am attempting a NU refinement run on cryosparc GUI at the moment (in queue). Is there an easy way to fix the symlinks without having to brute force each link?

Edit: the files located in ‘/data/work/tyoung/cryosparc/P295/exports/jobs/P295_J42_select_2D/P295_J42_particles_selected/J40/extract’ are also symlinks to the the same ‘/data/work/tyoung/cryosparc/P295/J40/extract/’ path so I cannot simply create new symlinks.