Problem importing particles - ValueError cannot reshape array of size 0

Hi,

I am not sure what is wrong with my star file, but something is leading to the below error. I took my consensus refinement from cryosparc and polish in relion. I then edit a star file made by subset selection from previous 3d classification to point to the shiny particles within Polish/job/asdf folder.

I get the below error. I will post the star file header and first line in a comment below.

[CPU: 249.2 MB]  Loaded 8816 particles.
[CPU: 249.2 MB]    Common fields: 
[CPU: 249.2 MB]            ctf/accel_kv :  {300.0}
[CPU: 249.2 MB]               ctf/cs_mm :  {2.7}
[CPU: 249.2 MB]        ctf/amp_contrast :  {0.1}
[CPU: 249.2 MB]        ctf/exp_group_id :  {1}
[CPU: 249.2 MB]            blob/psize_A :  {0.83}
[CPU: 249.2 MB]              blob/shape :  [400 400]
[CPU: 249.2 MB]  --------------------------------------------------------------
[CPU: 249.2 MB]  Making plots...
[CPU: 286.5 MB]  Traceback (most recent call last):
  File "cryosparc_master/cryosparc_compute/run.py", line 84, in cryosparc_compute.run.main
  File "/home/lab/software/cryosparc2/cryosparc2_master/cryosparc_compute/jobs/imports/run.py", line 445, in run_import_particles
    fig = plotutil.plot_images_simple(dispparts, rows=4, cols=8, radwn=6, figscale=1.5)
  File "/home/lab/software/cryosparc2/cryosparc2_master/cryosparc_compute/plotutil.py", line 495, in plot_images_simple
    rD = img.get_original_real_data()
  File "/home/lab/software/cryosparc2/cryosparc2_master/cryosparc_compute/particles.py", line 113, in get_original_real_data
    return self.blob.view().copy()
  File "/home/lab/software/cryosparc2/cryosparc2_master/cryosparc_compute/blobio/mrc.py", line 124, in view
    return self.get()
  File "/home/lab/software/cryosparc2/cryosparc2_master/cryosparc_compute/blobio/mrc.py", line 121, in get
    data = n.fromfile(file_obj, dtype=self.dtype, count= n.prod(self.shape)).reshape(self.shape)
**ValueError: cannot reshape array of size 0 into shape (400,400)**

Here is the star file. Importing the subset selection star file pointing at the original extract folder worked fine, but now doesn’t work when pointing to the shiny folder. Thanks for any help.

# version 30001

data_optics

loop_ 
_rlnVoltage #1 
_rlnSphericalAberration #2 
_rlnAmplitudeContrast #3 
_rlnOpticsGroup #4 
_rlnImageSize #5 
_rlnImagePixelSize #6 
_rlnImageDimensionality #7 
  300.000000     2.664582     0.100000            1          400     0.830000            2 
 

# version 30001

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 
_rlnGroupNumber #18 
_rlnNormCorrection #19 
_rlnLogLikeliContribution #20 
_rlnMaxValueProbDistribution #21 
_rlnNrOfSignificantSamples #22 
000003@Polish/job029/rawdata/name_00008Gr_00001Sq_v02_00002Hln_00002Enn_frames_shiny.mrcs J4052/imported/name_00008Gr_00001Sq_v02_00002Hln_00002Enn_frames.mrc  4869.000000  3077.000000   -177.85141    96.841782    12.038957     -1.91938     0.155625 16516.466797 15820.322266    -26.81530     -2.35405     0.000000            1            1            8            1     0.376435 2.588725e+05     0.651087            2

Running relion_reconstruct on the subset of particles I am trying to import gives some clue and it seems multiple particle stacks have the issue. Not sure what can fix it. The consensus shiny.star file imported fine, but not the subset selection.
“ERROR: readMRC: Image number ### exceeds stack size ### of image”

Hi!

Has somebody found a fix for this problem?

I’ve encountered the same issue and I also haven’t been able to fix it.

Best,
Armando

Hi Armando,
I used subset select in relion to make a new star file based on rlnClassNumber, which I had to grab from a previous star file. I lost a bit under 10% of particles which seem to have been automatically removed with subset select, but I am not really sure.
Hope this helps.