Questions about importing alignment3D from pose files

Hi, all

In the “homogeneous refinement only” job, I am trying to use the pose file trained from another “.cs” file (.cs from previous jobs but the original projects are no longer available) or pose file (orientation + translation). Is there any way to import “alignment3D” from these pose files?

Regards,

Ben

Please can you list the fields present in your cs file (python, cryosparc-tools), and describe the other data and follow-up tasks with which you plan to use the old alignments.

do you mean reconstruct? not refine? refine will discard the angles at job start anyway. can you move the csg from old jobs to THIS project (command line) and then import result group? then use low-level inputs to swap only the blob?

Hi, @wtempel

I am trying to use the cs file from the previous 3D reconstruction job of EMPIAR-10076. The fields are listed below:
{‘descr’: [(‘uid’, ‘<u8’), (‘blob/path’, ‘|S40’), (‘blob/idx’, ‘<u4’), (‘blob/shape’, ‘<u4’, (2,)), (‘blob/psize_A’, ‘<f4’), (‘blob/sign’, ‘<f4’), (‘ctf/type’, ‘|S9’), (‘ctf/accel_kv’, ‘<f4’), (‘ctf/cs_mm’, ‘<f4’), (‘ctf/amp_contrast’, ‘<f4’), (‘ctf/df1_A’, ‘<f4’), (‘ctf/df2_A’, ‘<f4’), (‘ctf/df_angle_rad’, ‘<f4’), (‘ctf/phase_shift_rad’, ‘<f4’), (‘ctf/scale’, ‘<f4’), (‘ctf/scale_const’, ‘<f4’), (‘ctf/cross_corr_ctffind4’, ‘<f4’), (‘ctf/ctf_fit_to_A’, ‘<f4’), (‘ctf/fig_of_merit_gctf’, ‘<f4’), (‘prepare/float_value’, ‘<f4’), (‘alignments3D/split’, ‘<u4’), (‘alignments3D/shift’, ‘<f4’, (2,)), (‘alignments3D/pose’, ‘<f4’, (3,)), (‘alignments3D/psize_A’, ‘<f4’), (‘alignments3D/error’, ‘<f4’), (‘alignments3D/error_min’, ‘<f4’), (‘alignments3D/resid_pow’, ‘<f4’), (‘alignments3D/slice_pow’, ‘<f4’), (‘alignments3D/image_pow’, ‘<f4’), (‘alignments3D/cross_cor’, ‘<f4’), (‘alignments3D/alpha’, ‘<f4’), (‘alignments3D/weight’, ‘<f4’), (‘alignments3D/pose_ess’, ‘<f4’), (‘alignments3D/shift_ess’, ‘<f4’), (‘alignments3D/class_posterior’, ‘<f4’), (‘alignments3D/class’, ‘<u4’), (‘alignments3D/class_ess’, ‘<f4’)], ‘fortran_order’: False, ‘shape’: (131899,), }

The follow-up task I am trying to do is “homogeneous reconstruction only” from a subset of datasets.

Regards,

Ben

Hi, Sorry for the typo.

I mean a “homogeneous reconstruction only” job. I copy the .cs to this project and tried to import result group but get the following error @CryoEM2 :

Traceback (most recent call last):
File “cryosparc_master/cryosparc_compute/run.py”, line 84, in cryosparc_compute.run.main
File “/home/shibin2/software/cryosparc/cryosparc2_master/cryosparc_compute/jobs/imports/run.py”, line 1003, in run_import_result_group
assert cs_group_file_dirname.startswith(os.path.abspath(abs_project_dir)+os.sep), “Result group to import must be located inside the project directory”
AssertionError: Result group to import must be located inside the project directory

Btw, can you explain more on swap only the blob? Do you mean to manually change the contents or relative path in the .cs?

Ben.

the process I have succeeded with:
go to the outputs of the job (4th tab) and export
find the export in its own folder in your directory within this project.
copy that file to the NEW project directory of interest.
now you can import the .csg file with “import result group” for the one that has been copied into the correct project directory.

as to low-level inputs, here’s a quick description from Ali. Use unbinned particles after classification using binned particles in cryoSPARC
there’s also a good one from oli, let me know if you can’t figure it out and I’ll dig for it.

Do you mean export from the previous job? Pitifully I only have the .cs here for my previous job… (The previous job was run on the scratch folder, deleted and I forgot to save it.) I doubt whether I can perform the “export” action.

Ben

ah yes, without the old job card, I do not know how to do this from only the .cs file though I’m sure it is possible with cryosparc-tools.

1 Like

Perhaps try converting the cs file into a star file using pyem and see if sufficient metadata is reconstituted, with or without associated passthrough, for a particle stack import?

Cheers,
Yang

1 Like

To confirm and complement

The Import Result Group job is designed for input of a yaml-formatted *.csg file based on a duly exported result group. The Import Result Group job type is not designed for the direct input of a NumPY array-like *.cs file, but it is always possible to create a .csg file that points to the .cs file in order to use Import Result Group .
cryosparc-tools maybe more suited to your use case. See this tutorial for a related example of manipulating *.cs content and making the manipulated data available as input for downstream jobs. For guidance with the correct format of certain values inside a *.cs file, such as file paths, you may want to inspect a *.cs file output by an actual CryoSPARC job of the relevant job type.

Thank you! @wtempel

I have successfully created the corresponding .csg and imported the result group in .cs. But run some issues when running “homogeneous reconstruction only”:

I will look into that. But thanks to your answer and I have imported the .cs. BTW do you know what the “passthrough” mean in cryosparc?

Ben

1 Like

Please can you post

  • the text of the log excerpt that you posted as a screenshot (to make this topic easier to find for future forum visitors
  • if you used an Import Result Group job, a screenshot of the job’s Outputs|Data tab. A description of the import process otherwise
    image

The concept of passthrough data is described in the guide:

datasets created by ancestor jobs that were not modified during processing, but are passed along the workflow

1 Like