Import particles from relion 3.1 refinement into cryosparc V2.15

I tried to import particles from relion 3.1 refine3D job, the run_data.star file.
The star file contains optics fields:

# version 30001

data_optics

loop_
_rlnOpticsGroupName #1
_rlnOpticsGroup #2
_rlnMicrographOriginalPixelSize #3
_rlnVoltage #4
_rlnSphericalAberration #5
_rlnAmplitudeContrast #6
_rlnImagePixelSize #7
_rlnImageSize #8
_rlnImageDimensionality #9
_rlnBeamTiltX #10
_rlnBeamTiltY #11
_rlnOddZernike #12
_rlnMagMat00 #13
_rlnMagMat01 #14
_rlnMagMat10 #15
_rlnMagMat11 #16

It also contains other information obtained from refinement:

# version 30001

data_particles

loop_
_rlnCoordinateX #1
_rlnCoordinateY #2
_rlnAnglePsi #3
_rlnClassNumber #4
_rlnAutopickFigureOfMerit #5
_rlnImageName #6
_rlnMicrographName #7
_rlnOpticsGroup #8
_rlnCtfMaxResolution #9
_rlnCtfFigureOfMerit #10
_rlnDefocusU #11
_rlnDefocusV #12
_rlnDefocusAngle #13
_rlnCtfBfactor #14
_rlnCtfScalefactor #15
_rlnPhaseShift #16
_rlnAngleRot #17
_rlnAngleTilt #18
_rlnOriginXAngst #19
_rlnOriginYAngst #20
_rlnNormCorrection #21
_rlnLogLikeliContribution #22
_rlnMaxValueProbDistribution #23
_rlnNrOfSignificantSamples #24
_rlnGroupNumber #25
_rlnRandomSubset #26

But cryosparc can’t read them. I got error like this:

##########################################
[CPU: 200.6 MB]  File extension is  star

[CPU: 200.6 MB]  Importing star file.

[CPU: 325.1 MB]  Loaded star with 372815 items

[CPU: 325.1 MB]  star file fields:

[CPU: 325.1 MB]  Index([u'rlnCoordinateX', u'rlnCoordinateY', u'rlnAnglePsi', u'rlnClassNumber',
       u'rlnAutopickFigureOfMerit', u'rlnImageName', u'rlnMicrographName',
       u'rlnOpticsGroup', u'rlnCtfMaxResolution', u'rlnCtfFigureOfMerit',
       u'rlnDefocusU', u'rlnDefocusV', u'rlnDefocusAngle', u'rlnCtfBfactor',
       u'rlnCtfScalefactor', u'rlnPhaseShift', u'rlnAngleRot', u'rlnAngleTilt',
       u'rlnOriginXAngst', u'rlnOriginYAngst', u'rlnNormCorrection',
       u'rlnLogLikeliContribution', u'rlnMaxValueProbDistribution',
       u'rlnNrOfSignificantSamples', u'rlnGroupNumber', u'rlnRandomSubset'],
      dtype='object')

[CPU: 325.1 MB]  Warning: The input star file does not contain rlnDetectorPixelSize and rlnMagnification, and parameter psize_A was not set. Output will not contain data for particles.

[CPU: 325.1 MB]  Warning: The input star file does not contain rlnVoltage, and parameter accel_kv was not set. Output will not contain CTF parameters for particles.

[CPU: 325.1 MB]  Warning: The input star file does not contain rlnSphericalAberration, and parameter cs_mm was not set. Output will not contain CTF parameters for particles.

[CPU: 325.1 MB]  Warning: No micrographs were connected as inputs, so correspondences cannot be found, so output will not contain pick locations for particles.

[CPU: 325.1 MB]  Warning: The input star file does not contain rlnAngleRot, rlnAngleTilt, rlnAnglePsi, rlnOriginX, rlnOriginY, rlnRandomSubset. Output will not contain particle orientations.

[CPU: 325.1 MB]  Traceback (most recent call last):
  File "cryosparc2_master/cryosparc2_compute/run.py", line 85, in cryosparc2_compute.run.main
  File "cryosparc2_compute/jobs/imports/run.py", line 255, 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 tried to remove the optics field in star file.
But I got similar error:

############################################################
[CPU: 199.8 MB]  File extension is  star

[CPU: 199.8 MB]  Importing star file.

[CPU: 324.4 MB]  Loaded star with 372815 items

[CPU: 324.4 MB]  star file fields:

[CPU: 324.4 MB]  Index([u'rlnCoordinateX', u'rlnCoordinateY', u'rlnAnglePsi', u'rlnClassNumber',
       u'rlnAutopickFigureOfMerit', u'rlnImageName', u'rlnMicrographName',
       u'rlnOpticsGroup', u'rlnCtfMaxResolution', u'rlnCtfFigureOfMerit',
       u'rlnDefocusU', u'rlnDefocusV', u'rlnDefocusAngle', u'rlnCtfBfactor',
       u'rlnCtfScalefactor', u'rlnPhaseShift', u'rlnAngleRot', u'rlnAngleTilt',
       u'rlnOriginXAngst', u'rlnOriginYAngst', u'rlnNormCorrection',
       u'rlnLogLikeliContribution', u'rlnMaxValueProbDistribution',
       u'rlnNrOfSignificantSamples', u'rlnGroupNumber', u'rlnRandomSubset'],
      dtype='object')

[CPU: 324.4 MB]  Warning: The input star file does not contain rlnDetectorPixelSize and rlnMagnification, and parameter psize_A was not set. Output will not contain data for particles.

[CPU: 324.4 MB]  Warning: The input star file does not contain rlnVoltage, and parameter accel_kv was not set. Output will not contain CTF parameters for particles.

[CPU: 324.4 MB]  Warning: The input star file does not contain rlnSphericalAberration, and parameter cs_mm was not set. Output will not contain CTF parameters for particles.

[CPU: 324.4 MB]  Warning: No micrographs were connected as inputs, so correspondences cannot be found, so output will not contain pick locations for particles.

[CPU: 324.4 MB]  Warning: The input star file does not contain rlnAngleRot, rlnAngleTilt, rlnAnglePsi, rlnOriginX, rlnOriginY, rlnRandomSubset. Output will not contain particle orientations.

[CPU: 324.5 MB]  Traceback (most recent call last):
  File "cryosparc2_master/cryosparc2_compute/run.py", line 85, in cryosparc2_compute.run.main
  File "cryosparc2_compute/jobs/imports/run.py", line 255, 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 thought this was supported, but an easy workaround for the meantime is to convert your .star file back to Relion 2/3.0 format with star.py relion31.star relion2.star --relion2. (This program is in the pyem package along with csparc2star.py).

1 Like