Closed anoy-2020codereivew closed 3 years ago
First, I edited your question. Please use a concise title and write details in the message body. You didn't write how you produced the synthetic dataset, how you ran Refine3D, how you generated your STAR file.
I recommend you to first go through RELION tutorial and then mimic particles.star
from the Extract job there.
At least you need the following.
data_optics
loop_
_rlnOpticsGroupName #1
_rlnOpticsGroup #2
_rlnMicrographOriginalPixelSize #3
_rlnVoltage #4
_rlnSphericalAberration #5
_rlnAmplitudeContrast #6
_rlnImagePixelSize #7
_rlnImageSize #8
_rlnImageDimensionality #9
opticsGroup1 1 0.885000 200.000000 1.400000 0.100000 3.540000 64 2
data_particles
loop_
_rlnImageName #1
_rlnMicrographName #2
_rlnOpticsGroup #3
_rlnDefocusU #4
_rlnDefocusV #5
_rlnDefocusAngle #6
000001@particles.mrcs mic001.mrc 1 10863.857422 10575.721680 77.967194
000002@particles.mrcs mic001.mrc 1 10863.857422 10575.721680 77.967194
...
Thanks for answering and sorry for the unclear part in question, I want to reconstruct the 3D volume based on clean 2D simulation images. (These are projections of one known structure).
Thus I don't have the micrograph, only have the image stack(128*128: image size) and some parameters. Could I do this in Relion starting from the 3D initialization step? And do I need _rlnMicrographName or _rlnMicrographOriginalPixelSize? Does Relion have some functions to generate the related star file? As I see your answer to getboxsize question, Should I add "boxsize" information in the mrc file instead of the star file?
My parameter are the following: rlnImageSize :128 'rlnImageBoxSize': 128, 'rlnImagePixelSize': 1.6, 'rlnOpticsGroupName': /home/hguaf/mixed.mrcs, rlnOpticsGroup': 1 'rlnVoltage': 300, 'rlnSphericalAberration': 2.26 'rlnAmplitudeContrast': 0.1
And do I need _rlnMicrographName or _rlnMicrographOriginalPixelSize?
You can omit rlnMicrographOriginalPixelSize
but not _rlnMicrographName
. _rlnMicrographName
is used internally to group particles for noise estimation. Just assign dummy names (the files do not have to exist) to every 100-200 particles. Putting all particles into one group may cause memory problems.
Does Relion have some functions to generate the related star file?
No.
As I see your answer to getboxsize question, Should I add "boxsize" information in the mrc file instead of the star file?
An MRC file always has the box size in the header. Nonetheless you have to specify _rlnImageSize
in the STAR file.
Try to adapt my example above; if it still fails, show me the full error message and your STAR file.
My star file looks like the following: data_optics
loop_ _rlnOpticsGroupName #1 _rlnOpticsGroup #2 _rlnVoltage #3 _rlnSphericalAberration #4 _rlnAmplitudeContrast #5 _rlnPixelSize #6 _rlnImagePixelSize #7 _rlnImageSize #8 _rlnImageDimensionality #9 opticsGroup1 1 300 2.26 0.1 1.6 1.6 128 2
data_particles
loop_ _rlnImageName #1 _rlnMicrographName #2 _rlnOpticsGroup #3 _rlnDefocusU #4 _rlnDefocusV #5 _rlnDefocusAngle #6 000@particle.mrcs /home/share/xuhuihuang/three_conformation_image/mix_data_mrc_200/mix000.mrc 1 3000 4000 20 001@particle.mrcs /home/share/xuhuihuang/three_conformation_image/mix_data_mrc_200/mix000.mrc 1 3000 4000 20
But If I try to start 3D initial model with the input of this star file, it appeals an error:
WARNING: ../../share/xuhuihuang/three_conformation_image/mixed_three_conf_new.star seems to be from a previous version of Relion. Attempting conversion... You should make sure metadata in the optics group table after conversion is correct. in: /home/hguaf/relion/src/jaz/io/star_converter.cpp, line 185 ERROR: BUG: cannot find name for particle... === Backtrace === /home/hguaf/relion/build/bin/relion_refine(_ZN11RelionErrorC1ERKSsS1_l+0x41) [0x446451] /home/hguaf/relion/build/bin/relion_refine(_ZN13StarConverter27convert_3p0_particlesTo_3p1ERK13MetaDataTableRS0_S3_Ssb+0x197a) [0x5185fa] /home/hguaf/relion/build/bin/relion_refine(_ZN16ObservationModel10loadSafelyESsRS_R13MetaDataTableSsib+0x4d7) [0x4fe807] /home/hguaf/relion/build/bin/relion_refine(_ZN10Experiment4readE8FileNamebbbbi+0x4b7) [0x543227] /home/hguaf/relion/build/bin/relion_refine(_ZN11MlOptimiser17initialiseGeneralEi+0x423) [0x4977f3] /home/hguaf/relion/build/bin/relion_refine(_ZN11MlOptimiser10initialiseEv+0x484) [0x49a7a4] /home/hguaf/relion/build/bin/relion_refine(main+0x33) [0x431293] /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f51d5f42505] /home/hguaf/relion/build/bin/relion_refine() [0x434f4f] ERROR: BUG: cannot find name for particle...
But I am sure my link of mrc file is right and if I use relion_conver_star to transfer my file, the information of data particles and rln imagesize are lost
Don't you have extra spaces? The new line code must be LF only, not CR+LF as in WIndows.
Do you mean the star file has extra spaces? I don't do CR in star file. I make a mistake with rlnImageName and_rlnMicrographName.
The rlnImageName is the image stack link instead of _rlnMicrographName, the latter term is some fixed values. But it still exits the same error.
The star file is in the attachment, I transfer to the txt file to upload.
Here each 00000@particles.mrc is one image file(128*128)
I don't do CR in star file
Wrong. Your attachment uses CR+LF as a new line code. See https://unix.stackexchange.com/questions/79702/how-to-test-whether-a-file-uses-crlf-or-lf-without-modifying-it.
Note that stack numbers start from 1, not 0.
You should also avoid using absolute paths inside the STAR file. See https://www3.mrc-lmb.cam.ac.uk/relion/index.php/FAQs#What_is_the_right_way_to_import_files_outside_the_project_directory.3F.
I confirmed that the following STAR file is accepted.
data_optics
loop_
_rlnOpticsGroupName #1
_rlnOpticsGroup #2
_rlnVoltage #3
_rlnSphericalAberration #4
_rlnAmplitudeContrast #5
_rlnPixelSize #6
_rlnImagePixelSize #7
_rlnImageSize #8
_rlnImageDimensionality #9
opticsGroup1 1 300 2.26 0.1 1.6 1.6 128 2
data_particles
loop_
_rlnImageName #1
_rlnMicrographName #2
_rlnOpticsGroup #3
_rlnDefocusU #4
_rlnDefocusV #5
_rlnDefocusAngle #6
01@particles.mrcs mix000.mrc 1 3000 4000 20
02@particles.mrcs mix000.mrc 1 3000 4000 20
Oh, It works after I remove CR, thanks a lot.
Hanlin
I encounter another warning in 3D classification:
Expectation iteration 1 of 25 000/??? sec ~~(,_,"> [oo] WARNING: norm_correction= 10.1035 for particle 62697 in group 314; Are your groups large enough? Or is the reference on the correct greyscale? WARNING: norm_correction= 10.2465 for particle 58846 in group 295; Are your groups large enough? Or is the reference on the correct greyscale?
Actually, I have 500 group micrographs and each group contains 200 images as you suggest, need I increase the group? Or preprocess the data before 3D reconstruction. ( I did relion_preprocess to normalize the image)
I did relion_preprocess to normalize the image
Are your background diameter for preprocess and the particle diameter in refine consistent? Your grouping is OK.
If you have this warning only for a few particles, you can just remove them or disable normalization correction by --no_norm
in relion_refine.
My image size is 128, so I choose 110 as the diameter. Also, the particle diameter is consistent between preprocessing and refinement. Actually, one iteration about 240 particles exist warning. Does it influence the final results largely?
Does it influence the final results largely?
Probably not but you can just remove them or use --no_norm
.
Oh, I ignore these images and finish the 3D reconstruction and auto refinement. Thanks for your patient help.
Best regards Hanlin
Describe your problem
If I want to start 3D initialization directly in simulation data (includes 100000 2D images stack: mrcfile), how can I write the star file?
The example I write is:'rlnImageBoxSize', 'rlnOpticsGroupName', 'rlnOpticsGroup', 'rlnVoltage', 'rlnSphericalAberration', 'rlnAmplitudeContrast'. But It appears a error: It can't find a particle. Could you help me? Thanks Hanlin
Environment:
Dataset:
Job options:
note.txt
in the job directory):Error message:
Please cite the full error message as the example below.