ml-struct-bio/cryodrgn

Assertion Error in cryoDRGN 3.0.0b0

leatheresa opened this issue · 4 comments

Hi there,

I am super excited to test cryoDRGN-ET on my dataset however during testing of the inputs (step 4. in the walkthrough https://ez-lab.gitbook.io/cryodrgn/cryodrgn-et-subtomogram-analysis) I get following error:

" AssertionError: Input rotations have shape (7226544, 9) but expected (7226544,3,3) "

I exported ImageSeries from warp/M with a box size of 140 and downsampled them to 128. So far, all the steps with the tutorial have worked smoothly, but now I'm stuck with this step.

This was the command I used:
cryodrgn backproject_voxel imageframes_for_cryoDRGN_afterM.star --datadir ../warp/mrc/particleseries/ --ctf ctf.pkl --pose pose.pkl --dose-per-tilt 1.96 -o reconstruct.mrc

I have seen similar error on the mailing list but so far I have not gotten anywhere. Does anyone have any ideas?

Many thanks in advance!
Lea

zhonge commented

Hmm, that is very strange. Do you have the command you used to generate the pose.pkl?

Hi, thanks for your reply!

Sure, I used following commands:

" cryodrgn downsample imageframes_for_cryoDRGN_afterM.star --datadir ../warp/mrc/particleseries -D 128 -o ../warp/mrc/particleseries/128.mrcs "

followed by

" cryodrgn parse_pose_star imageframes_for_cryoDRGN_afterM.star -o pose.pkl -D 140 --Apix 3.394 "

and by

" cryodrgn parse_ctf_star imageframes_for_cryoDRGN_afterM.star -o pose.pkl -D 140 --Apix 3.394 "

I tried both, a relion 3.0-starfile (the one written by M) and one upgraded to relion-3.1 using relion_convert_star.

Also:
" cryodrgn parse_pose_star imageframes_for_cryoDRGN_afterM.star -o pose.pkl -D 140 --Apix 3.394 " gave me following warning:

(INFO) (parse_pose_star.py) (21-Sep-23 17:55:39) 7226544 particles
(INFO) (parse_pose_star.py) (21-Sep-23 17:55:40) Euler angles (Rot, Tilt, Psi):
(INFO) (parse_pose_star.py) (21-Sep-23 17:55:40) [ 16.37507 80.02831 -130.3174 ]
(INFO) (parse_pose_star.py) (21-Sep-23 17:55:40) Converting to rotation matrix:
(INFO) (parse_pose_star.py) (21-Sep-23 17:57:22) [[ 0.10746459 -0.76313007 0.63724709]
[ 0.30908608 -0.5835534 -0.75095354]
[ 0.94494294 0.27766512 0.17316156]]
(WARNING) (parse_pose_star.py) (21-Sep-23 17:57:22) Warning: Neither _rlnOriginX/Y nor _rlnOriginX/YAngst found. Defaulting to 0s.
(INFO) (parse_pose_star.py) (21-Sep-23 17:57:22) Translations (pixels):
(INFO) (parse_pose_star.py) (21-Sep-23 17:57:22) [0. 0.]

However I did not pay too much attention first since the starfile deriving from warp/M never contains these columns in my case. Maybe that is causing the problem?

Best,
Lea

zhonge commented

Hi Lea,

Sorry about the delay. In the second command, it looks like you overwrote the pose.pkl with the ctf parameters. So it should be:

cryodrgn parse_ctf_star imageframes_for_cryoDRGN_afterM.star -o ctf.pkl -D 140 --Apix 3.394 "

Hope that helps!
Ellen

closing as it appears the issue was with the command used