Import of star files generated by relion 3.1 fails [bug]

open

#1

Hi,

The format of star files used by Relion has changed in 3.1, and now includes a data_optics section at the top specifying microscope parameters.

CryoSPARC cannot recognize these files and throws an error on particle stack import.

Cheers,
Oli


#2

(meant to say - there is an easy workaround for this, which is to just delete the data_optics section before import and to manually enter this info in the job config. But it would be better to handle automatically.)


#3

Thanks for the workaround suggestion, Oli!

I also found that the good old export command in relion throws an error:

How did you get it to export?

mpirun -np 64 relion_preprocess_mpi --operate_on Refine3D/job860/run_data.star --operate_out job860_cryosparc_import

ERROR: 
ERROR: this functionality is no longer supported on STAR files. You can still operate on image stacks.
=== Backtrace  ===
relion_preprocess_mpi(_ZN11RelionErrorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_l+0x6d) [0x426afd]
relion_preprocess_mpi(_ZN13Preprocessing21runOperateOnInputFileEv+0xab0) [0x453880]
relion_preprocess_mpi(_ZN16PreprocessingMpi3runEv+0xa1) [0x462a21]
relion_preprocess_mpi(main+0x4e) [0x41ef3e]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7febfaac9830]
relion_preprocess_mpi(_start+0x29) [0x41f8c9]
==================
ERROR: 
ERROR: this functionality is no longer supported on STAR files. You can still operate on image stacks.
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0

#4

That’s annoying mostly if you are planning on using cistem - you shouldn’t need to do this prior to import into cryosparc though - what reason do you need a single stack/star combo for?

Cheers
Oli


#5

No particular reason. It simply worked flawlessly for me in the past, and was simple enough to execute, so I ended up using it for all of my relion ==> cryosparc exports.

Importing the run_data.star file directly throws this error in cryosparc:

Traceback (most recent call last):
  File "cryosparc2_master/cryosparc2_compute/run.py", line 78, in cryosparc2_compute.run.main
  File "cryosparc2_compute/jobs/imports/run.py", line 232, in run_import_particles
    assert do_blob or do_ctf or do_location or do_pose, "Could not import star file: too many fields missing. "
AssertionError: Could not import star file: too many fields missing. 

I guess I would need to play with those parameters to get this to work:
image

I’ll also try removing the data_optics section as you suggested.


#6

Okay, it looks like your workaround worked, Oli!

I needed to delete the optics section from the .star file, specify the path to my relion directory in “particle data path”, and also input all microscope parameters in the job config.


#7

I’m working on improved .star IO routines that will handle the Relion 3.1 change (and also future changes as long as they are still legal STAR files as per the spec).

That will streamline things a bit when using csparc2star.py, or stack.py to make stacks instead of relion_preprocess.