e2spt_gathermeta error

31 views
Skip to first unread message

Doulin Shepherd

unread,
Jul 10, 2025, 12:47:46 AMJul 10
to EMAN2
Hello Eman2 Team,

I am trying to follow the P22 tutorial using my own dataset but I seem to be running into an error in excluing the tail particles using the e2spt_gathermeta program.

Command:
e2spt_gathermeta.py --ptcls sets/pent.lst --ali2d spt_00/aliptcls2d_06.lst --exclude sets/tail.lst

Error:  
Traceback (most recent call last):

  File "/home/doulin/miniconda3/envs/eman2/bin/e2spt_gathermeta.py", line 451, in <module>

    main()

  File "/home/doulin/miniconda3/envs/eman2/bin/e2spt_gathermeta.py", line 356, in main

    dxf=[Transform({"type":"xyz","xtilt":x[0],"ytilt":x[1],"ztilt":x[2],"tx":v[0], "ty":v[1]}) for x,v in zip(rts,v1)]

                                                                             ~^^^

IndexError: invalid index to scalar variable.

I have tried using various imputs but nothing seems to be solving the issue and I can't tell if I made a mistake in a previous protocol. Would you be able to tell me what I might have done incorrectly?

Eman2 Version: 
EMAN 2.99.70 ( GITHUB: 2025-07-10 14:07 - commit: c3ad09d07 )
Your EMAN2 is running on: Linux-6.8.0-60-generic-x86_64-with-glibc2.35 6.8.0-60-generic
Your Python version is: 3.12.11 

Muyuan Chen

unread,
Jul 10, 2025, 1:27:29 AMJul 10
to em...@googlegroups.com
Do you have the early print out from the program? I think it should say something like “sanity check”? If nothing went wrong there, but something went wrong at the later step, it might indicate there is something odd with some particle from one of the other tomograms. It is a bit hard to guess what went wrong exactly. Maybe you can send me the spt_00/aliptcls2d_06.lst that you used as input privately? I can dig into it a bit.
Muyuan

On Jul 9, 2025, at 9:47 PM, Doulin Shepherd <doulin....@gmail.com> wrote:

Hello Eman2 Team,
--
--
----------------------------------------------------------------------------------------------
You received this message because you are subscribed to the Google
Groups "EMAN2" group.
To post to this group, send email to em...@googlegroups.com
To unsubscribe from this group, send email to eman2+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/eman2

---
You received this message because you are subscribed to the Google Groups "EMAN2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eman2+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/eman2/94d6e7f6-2991-4dc1-b342-b9af963aeb8dn%40googlegroups.com.
Message has been deleted
Message has been deleted

Doulin Shepherd

unread,
Jul 10, 2025, 9:01:28 PMJul 10
to EMAN2
Hi Muyuan,

Yes I do have the early output, I have truncated parts of the output indicated by "...." for brevity.

I would be happy to send the file to you, do you have a preferred email or otherwise to send the file?

Output:
Writing in spt_01
Gather metadata from sets/pent.lst
exclude particles around sets/tail.lst
505 particles, scale by 1.00
  excluding 4 out of 48 3d particles. Average distnace 18.4 px
  excluding 11 out of 132 3d particles. Average distnace 18.4 px
  excluding 7 out of 84 3d particles. Average distnace 18.4 px
  excluding 11 out of 132 3d particles. Average distnace 18.4 px
....
....
  excluding 15 out of 180 3d particles. Average distnace 18.3 px
  excluding 8 out of 96 3d particles. Average distnace 18.3 px
  excluding 9 out of 108 3d particles. Average distnace 18.3 px
total 505 out of 6060 particles excluded
Loading 3D particles
Loading 3D particles - 6060 particles from 57 tomograms
Using 3d alignment from the image header.
Using 'orig_class' in image header to assign class
5500/5555
Total 5555 3d particles and 337245 2d particles
Reading previous alignment
Loading particle info from spt_00/particle_info_3d.lst
        3d alignment from spt_00/aliptcls3d_06.lst
        2d alignment from spt_00/aliptcls2d_06.lst
Scale from old to new alignment 0.250
Sanity check on one tomogram
tomogram Legion_20250619_11_2, tilt id 10
4 particles from old refinement, 4 movement trajectories, 44 particles from new refinement
mean neighbor distance between particles from two refinement: 392.6113
mean subtilt translation 0.6137 from old refinement
mean subtilt translation 0.7361 from new refinement
Compute subtilt translation for new refinement
Legion_20250619_11_2 4 44
Legion_20250619_11_3 11 121
Legion_20250619_11 7 77
Legion_20250619_12_2 11 121
....
....
Legion_20250619_7 4 44
Legion_20250619_8_2 15 165
Legion_20250619_8 8 88
Legion_20250619_9 9 99

Traceback (most recent call last):
  File "/home/doulin/miniconda3/envs/eman2/bin/e2spt_gathermeta.py", line 451, in <module>
    main()
  File "/home/doulin/miniconda3/envs/eman2/bin/e2spt_gathermeta.py", line 356, in main
    dxf=[Transform({"type":"xyz","xtilt":x[0],"ytilt":x[1],"ztilt":x[2],"tx":v[0], "ty":v[1]}) for x,v in zip(rts,v1)]
                                                                             ~^^^
IndexError: invalid index to scalar variable.

Doulin Shepherd

unread,
Jul 10, 2025, 9:01:33 PMJul 10
to EMAN2
Hi Muyuan,

I do have the output and the sanity check was passed. I posted it in a reply message but I am assuming it was deleted by the spam filter. Is there a prefered email address that I should use to send it to you?

Cheers,
Doulin 

On Thursday, 10 July 2025 at 15:27:29 UTC+10 Muyuan Chen wrote:

Muyuan Chen

unread,
Jul 10, 2025, 11:42:01 PMJul 10
to em...@googlegroups.com
This seems to say that it only went wrong at the last tomogram, Legion_20250619_9 for some reason? If you create a subset of particles (sets/pent.lst) without particles from that tomogram, will it work? Just make a copy of the .lst and open it with a text editor and delete all lines with that file name in it. If this works, I would guess there might be some file corruption in that particle stack when you extract...


Doulin Shepherd

unread,
Jul 11, 2025, 3:27:32 AMJul 11
to EMAN2
Hi Muyuan,

Your suggestion worked but I have no idea why the last tomogram seems to have an issue.

Curiously the new average distance value is now 38.4 instead of 18.4 px, I am not entirely sure what that means in this context.

I had checked to see if there was a problem with either of the .lst files by running a refine job with each of them and they ran without and apparent issues.
Reply all
Reply to author
Forward
0 new messages