Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect image size, relion 3.1 #530

Closed
yixiaozhang123 opened this issue Oct 27, 2019 · 11 comments
Closed

Incorrect image size, relion 3.1 #530

yixiaozhang123 opened this issue Oct 27, 2019 · 11 comments
Assignees

Comments

@yixiaozhang123
Copy link

yixiaozhang123 commented Oct 27, 2019

Describe your problem

Hi,
I have four datasets from three different microscopes. I ran four polishing independently in the same relion folder and joined the shiny.star files in relion. When I used the joined star file to run refinement, it reported the incorrect image size error.

  • RELION version [e.g. RELION-3.1-beta-commit-a6aaa5 (please see the title bar of the GUI)]

Error message:

fn_img= 9@Polish/job066/movies1/19may22i_grid4_00017gr_00022sq_v03_00006hln_00015enn_frames_shiny.mrcs XSIZE(img())= 280 YSIZE(img())= 280
 while XSIZE(exp_imagedata)= 266 and YSIZE(exp_imagedata)= 266
in: /programs/x86_64-linux/relion/3.1-beta_cu7.5/src/ml_optimiser.cpp, line 9051
ERROR: 
MlOptimiser::getMetaAndImageDataSubset ERROR: incorrect image size
master encountered error: === Backtrace  ===
/programs/x86_64-linux/relion/3.1-beta_cu7.5/bin/relion_refine_mpi(_ZN11RelionErrorC1ERKSsS1_l+0x41) [0x451721]
/programs/x86_64-linux/relion/3.1-beta_cu7.5/bin/relion_refine_mpi(_ZN11MlOptimiser25getMetaAndImageDataSubsetEllb+0x1f46) [0x630486]
/programs/x86_64-linux/relion/3.1-beta_cu7.5/bin/relion_refine_mpi(_ZN14MlOptimiserMpi11expectationEv+0xd98) [0x471658]
/programs/x86_64-linux/relion/3.1-beta_cu7.5/bin/relion_refine_mpi(_ZN14MlOptimiserMpi7iterateEv+0xc4) [0x4812e4]
/programs/x86_64-linux/relion/3.1-beta_cu7.5/bin/relion_refine_mpi(main+0x5f) [0x43b98f]
/usr/lib64/libc.so.6(__libc_start_main+0xf5) [0x7f39b6777b15]
/programs/x86_64-linux/relion/3.1-beta_cu7.5/bin/relion_refine_mpi() [0x43e181]
==================
ERROR: 
MlOptimiser::getMetaAndImageDataSubset ERROR: incorrect image size

==================

I paste the first lines of one subset of the joined star file.

version 30001

data_optics

loop_
_rlnOpticsGroupName #1
_rlnOpticsGroup #2
_rlnMtfFileName #3
_rlnMicrographOriginalPixelSize #4
_rlnVoltage #5
_rlnSphericalAberration #6
_rlnAmplitudeContrast #7
_rlnImagePixelSize #8
_rlnImageSize #9
_rlnImageDimensionality #10
_rlnCtfDataAreCtfPremultiplied #11
data1-krios3 1 mtf.star 1.045000 300.000000 2.700000 0.100000 1.045000 280 2 0
data2-krios1 2 mtf.star 1.070000 300.000000 2.700000 0.100000 1.070000 274 2 0
data3-krios1 3 mtf.star 1.070000 300.000000 2.700000 0.100000 1.070000 274 2 0
data4-krios2 4 mtf.star 1.096000 300.000000 0.001000 0.100000 1.096000 266 2 0

version 30001

data_particles

loop_
_rlnCoordinateX #1
_rlnCoordinateY #2
_rlnAutopickFigureOfMerit #3
_rlnImageName #4
_rlnMicrographName #5
_rlnOpticsGroup #6
_rlnCtfMaxResolution #7
_rlnCtfFigureOfMerit #8
_rlnDefocusU #9
_rlnDefocusV #10
_rlnDefocusAngle #11
_rlnCtfBfactor #12
_rlnCtfScalefactor #13
_rlnPhaseShift #14
_rlnAngleRot #15
_rlnAngleTilt #16
_rlnAnglePsi #17
_rlnOriginXAngst #18
_rlnOriginYAngst #19
_rlnClassNumber #20
_rlnNormCorrection #21
_rlnRandomSubset #22
_rlnLogLikeliContribution #23
_rlnMaxValueProbDistribution #24
_rlnNrOfSignificantSamples #25
1255.000000 1843.000000 0.516506 31@Polish/job068/movies2/19jul08c_b2g3_00020gr_00153sq_v02_00002hl_00006enn_frames_shiny.mrcs MotionCorr/job007/movies2/19jul08c_b2g3_00020gr_00153sq_v02_00002hl_00006enn_frames.mrc 2 7.098020 0.018632 25636.865234 25377.695312 160.883070 0.000000 1.000000 0.000000 -135.65107 61.817513 16.155556 0.898641 1.968641 1 1.167588 1 2.246716e+05 0.044261 47
3233.000000 2258.000000 0.709947 45@Polish/job066/movies1/19may22i_grid4_00011gr_00006sq_v03_00005hln_00016enn_frames_shiny.mrcs MotionCorr/job006/movies1/19may22i_grid4_00011gr_00006sq_v03_00005hln_00016enn_frames.mrc 1 3.714352 0.052656 25121.041563 24768.367580 -157.51869 0.000000 1.000000 0.000000 -131.55552 119.241584 -62.47346 -2.56581 -0.47581 1 1.153912 2 2.357244e+05 0.655179 11
151.000000 2341.000000 0.381428 53@Polish/job068/movies2/19jul08c_b1g3_00020gr_00015sq_v02_00002hl_00016enn_frames_shiny.mrcs MotionCorr/job007/movies2/19jul08c_b1g3_00020gr_00015sq_v02_00002hl_00016enn_frames.mrc 2 4.096572 0.049726 24387.126953 24209.390625 148.792200 0.000000 1.000000 0.000000 63.142522 75.667826 172.323983 -0.17136 -1.24136 1 1.161556 2 2.178788e+05 0.132492 41
1749.000000 3056.000000 0.450146 88@Polish/job069/movies3/19sep30h_Grid1_00010gr_00052sq_v02_00002hl_00015enn_frames_shiny.mrcs MotionCorr/job008/movies3/19sep30h_Grid1_00010gr_00052sq_v02_00002hl_00015enn_frames.mrc 3 4.425309 0.036512 28798.080788 27825.553158 55.585456 0.000000 1.000000 0.000000 118.437951 55.429976 -3.43885 1.366287 -0.77371 1 1.220891 1 2.149354e+05 0.065174 60
1372.000000 2398.000000 0.408276 66@Polish/job070/movies4/19oct15d_Grid3_00016gr_00058sq_v02_00002hln_00002enn_frames_shiny.mrcs MotionCorr/job009/movies4/19oct15d_Grid3_00016gr_00058sq_v02_00002hln_00002enn_frames.mrc 4 6.126359 0.004945 31992.272671 27117.596299 92.159060 0.000000 1.000000 0.000000 86.783647 55.029820 -56.15928 1.144529 0.048529 1 1.237622 2 2.255628e+05 0.361023 18
634.000000 1327.000000 0.372096 19@Polish/job070/movies4/19oct15d_Grid3a_00021gr_00191sq_v02_00003hln_00007enn_frames_shiny.mrcs MotionCorr/job009/movies4/19oct15d_Grid3a_00021gr_00191sq_v02_00003hln_00007enn_frames.mrc 4 3.583920 0.052278 22746.535651 20853.145731 88.592321 0.000000 1.000000 0.000000 -172.17202 104.169069 -67.92351 -2.02647 -4.21847 1 1.203617 1 2.108789e+05 0.336099 26
2981.000000 1920.000000 0.488336 58@Polish/job070/movies4/19oct15d_Grid3_00009gr_00038sq_v02_00002hln_00009enn_frames_shiny.mrcs MotionCorr/job009/movies4/19oct15d_Grid3_00009gr_00038sq_v02_00002hln_00009enn_frames.mrc 4 6.074441 0.017843 28652.410629 26716.470662 -179.61637 0.000000 1.000000 0.000000 81.027849 34.078715 -106.01544 0.165527 -2.14347 1 1.131400 1 2.144561e+05 0.173949 22
112.000000 3044.000000 0.417037 90@Polish/job070/movies4/19oct15d_Grid3a_00022gr_00180sq_v03_00004hln_00011enn_frames_shiny.mrcs MotionCorr/job009/movies4/19oct15d_Grid3a_00022gr_00180sq_v03_00004hln_00011enn_frames.mrc 4 5.973200 0.033235 24573.230130 21686.866020 -178.94190 0.000000 1.000000 0.000000 104.649600 123.590662 76.984276 1.144529 0.165527 1 1.076793 1 2.257674e+05 0.105919 73
2375.000000 1399.000000 0.370700 42@Polish/job070/movies4/19oct15d_Grid3a_00016gr_00152sq_v02_00003hln_00011enn_frames_shiny.mrcs MotionCorr/job009/movies4/19oct15d_Grid3a_00016gr_00152sq_v02_00003hln_00011enn_frames.mrc 4 8.533143 0.001025 22978.833754 18533.780550 90.842861 0.000000 1.000000 0.000000 -127.86883 46.781757 149.869776 5.645527 -0.93047 1 1.156407 1 2.082427e+05 0.191841 30
2748.000000 2612.000000 0.493394 67@Polish/job070/movies4/19oct15d_Grid3_00022gr_00059sq_v02_00002hln_00007enn_frames_shiny.mrcs MotionCorr/job009/movies4/19oct15d_Grid3_00022gr_00059sq_v02_00002hln_00007enn_frames.mrc 4 9.431368 -0.01025 28052.530664 24690.788293 94.007723 0.000000 1.000000 0.000000 129.972721 27.502984 -97.54721 1.144529 5.645527 1 1.154269 2 2.182097e+05 0.164259 31
3058.000000 2288.000000 0.647688 42@Polish/job066/movies1/19may22i_grid4_00012gr_00008sq_v02_00006hln_00014enn_frames_shiny.mrcs MotionCorr/job006/movies1/19may22i_grid4_00012gr_00008sq_v02_00006hln_00014enn_frames.mrc 1 4.685425 0.035603 30219.920992 29701.870138 -158.45377 0.000000 1.000000 0.000000 -122.31310 140.973199 -60.15296 2.659189 1.614189 1 1.197359 2 2.354910e+05 0.447865 4

Thanks,
Yixiao

@biochem-fan
Copy link
Member

(I fixed your markup)

This seems related to #519.

Does this happen when you disable preread particles to RAM and copy particles to scratch?

@yixiaozhang123
Copy link
Author

No, I comfirmed that the particles were pre-read to RAM.

@biochem-fan
Copy link
Member

biochem-fan commented Oct 27, 2019

Please test if it happens even without preread and scratch.

@yixiaozhang123
Copy link
Author

It reported the same error if I chose no-preread and no scratch, even with no gpu.
I also tried the star files joined from Extract or CtfRefine, still got the same error.
HOWEVER, if the particles were extracted in a same box size (280 pixels) with their different pixel size, the joined particles can be refined with no error if the reference map has a box size of 280 pixels (can be in different pixel size, but must be in the same box size of 280). It looks like different optic groups should have a same box size in the relion version I'm using.

@biochem-fan
Copy link
Member

biochem-fan commented Oct 28, 2019

OK, I finally found a reproducible case.

Meanwhile, if you set Use parallel disc I/O: Yes, the problem should disappear.

@biochem-fan
Copy link
Member

@scheres The problem is that we are resizing exp_imagadata to mymodel.ori_size in https://github.com/3dem/relion/blob/ver3.1/src/ml_optimiser.cpp#L8980.

@yixiaozhang123
Copy link
Author

It works with "Use parallel disc I/O: Yes" setting. Thanks!
Do you have any recommendation on which reference map we should use for data combination? Largest pixel size? Smallest box width?

@biochem-fan
Copy link
Member

Largest pixel size? Smallest box width?

It does not matter really but choosing the largest pixel size and the smallest box size is the most efficient.

@davidmbelnap
Copy link

I submitted #519, which is the same error, and I was told to continue the discussion here. Two things:

  1. I was asked if I had the problem if "preread particles to RAM" and "copy particles to scratch" were disabled. Yes, I had the problem if those two options were not used.

  2. I was told to "use parallel disc I/O". If I use that option, the problem does not occur.

@davidmbelnap
Copy link

Thank you for working on the problem.

@biochem-fan
Copy link
Member

Using different box sizes with Parallel disk I/O: No turned out to be non trivial. We decided not to support it. Please use Parallel disk I/O: Yes when you are merging particles with different box sizes.

We added check for this (e023ce5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants