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

Autopicking dies because of huge figure of merit values #700

Closed
FlyinTeller opened this issue Oct 26, 2020 · 5 comments
Closed

Autopicking dies because of huge figure of merit values #700

FlyinTeller opened this issue Oct 26, 2020 · 5 comments

Comments

@FlyinTeller
Copy link

FlyinTeller commented Oct 26, 2020

Describe your problem
I have extracted particles from my micrographs and downsampled them to twice the pixel size of the micrographs. Then:

  1. I ran 2D classification
  2. upscaled selected class averages again to the same resolution as my micrographs
  3. ran autopicking, providing the upscaled images as 2D reference

This job picks particle coordinates, but then dies upon writing out the logfile.pdf. Upon closer inspection, I noticed that the figure of merit values are crazily large (see .star extract on the bottom), which kills the generation of axis ticks during logfile creation and has me question the reliability of the pick. This does not really change when leaving out step 2 and I am out of ideas why it would occur. I would be grateful for any ideas/hints what might be going wrong

Environment:

  • OS: Ubuntu 20.04 LTS
  • MPI runtime: mpirun (Open MPI) 4.0.3 (not used
  • RELION version: RELION-3.1.0-commit-618a36
  • Memory: 256 GB
  • GPU: 2 x GTX 2080Ti

Dataset:

  • Box size (of reference): 360px (upscaled from 180)
  • Pixel size (of micrographs): 0.834 Å/px

Job options:

  • Type of job: autopick
  • Number of MPI processes: 1
  • Number of threads: 1
  • Full command:
relion_autopick --i grid11_5mics.star --odir AutoPick/job035/ --pickname autopick --ref Select/job028/class_averages_rescaled.mrcs --invert  --ctf  --ang 10 --shrink 0 --lowpass 40 --highpass 400 --particle_diameter 200 --threshold 0.3 --min_distance 100 --max_stddev_noise -1 --gpu "" --write_fom_maps   --pipeline_control AutoPick/job035/
echo grid11_5mics.star > AutoPick/job035/coords_suffix_autopick.star

Error message:

*** buffer overflow detected ***: terminated
Aborted (core dumped)

Note: This error is only secondary. It is caused by line 737 in src/CPlot2D.cpp which tries to write out 1e38 (or similarily large values) into a char[] of size 20. the root cause is that the figure of merit values are going crazy (excerpt of one _autopick.star below):


# version 30001

data_

loop_ 
_rlnCoordinateX #1 
_rlnCoordinateY #2 
_rlnClassNumber #3 
_rlnAutopickFigureOfMerit #4 
_rlnAnglePsi #5 
 3239.999903  2111.999937            2 4.416537e+29    70.000000 
 2063.999938  2087.999938            2 2.507197e+11   270.000000 
 4319.999871  2159.999936            1 1.299178e+08   140.000000 
  431.999987  1895.999943            1 2.142814e+07   170.000000 
 3287.999902  2855.999915            1 8.149368e+06   250.000000 
 2687.999920  1679.999950            1 1.600912e+06   110.000000 
 2711.999919  2255.999933            4 2.827695e+07    10.000000 
 2279.999932  1967.999941            4 6.110564e+06    10.000000 
 2687.999920  1967.999941            4 2.889885e+08   130.000000 
@FlyinTeller FlyinTeller changed the title Autopicking dies because of huge figure of merrit values Autopicking dies because of huge figure of merit values Oct 26, 2020
@biochem-fan
Copy link
Member

upscaled selected class averages again to the same resolution as my micrographs

You shouldn't do this. Instead, specify the Pixel size in reference in the Reference tab.

This does not really change when leaving out step 2 and I am out of ideas why it would occur.

Did you specify the right pixel size and diameter? Weird FigureOfMerit suggests normalization is completely off.

@FlyinTeller
Copy link
Author

Hi biochem-fan, thank you for the swift reply

Did you specify the right pixel size and diameter?

The same job with the non-rescaled reference (which then have 2*0.834 A/pix and a size of 180 pixels looked like this:

relion_autopick --i grid11_5mics.star --odir AutoPick/job037/ --pickname autopick --ref Select/job028/class_averages.mrcs --invert  --ctf  --ang 10 --shrink 0 --lowpass 40 --highpass 400 --angpix_ref 1.668 --particle_diameter 200 --threshold 0.3 --min_distance 100 --max_stddev_noise -1 --gpu "" --write_fom_maps   --pipeline_control AutoPick/job037/

but showed similarily crazy figure of merit values. header Select/job028/class_averages.mrcs gives


 RO image file on unit   1 : Select/job028/class_averages.mrcs     Size=        507 K

 Number of columns, rows, sections .....     180     180       4
 Map mode ..............................    2   (32-bit real)
 Start cols, rows, sects, grid x,y,z ...    0     0     0     180    180      1
 Pixel spacing (Angstroms)..............   1.668      1.668      1.668
 Cell angles ...........................   90.000   90.000   90.000
 Fast, medium, slow axes ...............    X    Y    Z
 Origin on x,y,z .......................    0.000       0.000       0.000
 Minimum density .......................  -2.0255
 Maximum density .......................   5.6871
 Mean density ..........................  0.31694E-01
 RMS deviation from mean................  0.42605
 tilt angles (original,current) ........   0.0   0.0   0.0   0.0   0.0   0.0
 Space group,# extra bytes,idtype,lens .        0        0        0        0

and for one of my micrographs it is

 RO image file on unit   1 : average/2020-09-10_18.31.34_A-4_swapped_51_001.mrc     Size=      92071 K

 Number of columns, rows, sections .....    5760    4092       1
 Map mode ..............................    2   (32-bit real)
 Start cols, rows, sects, grid x,y,z ...    0     0     0    5760   4092      1
 Pixel spacing (Angstroms)..............  0.8340     0.8340     0.8340
 Cell angles ...........................   90.000   90.000   90.000
 Fast, medium, slow axes ...............    X    Y    Z
 Origin on x,y,z .......................    0.000       0.000       0.000
 Minimum density .......................   839.57
 Maximum density .......................   4037.6
 Mean density ..........................   0.0000
 tilt angles (original,current) ........   0.0   0.0   0.0   0.0   0.0   0.0
 Space group,# extra bytes,idtype,lens .        0        0        0        0

     0 Titles :

So the pixel sizes I provided as --angpix_ref 1.668 should be correct

@biochem-fan
Copy link
Member

I ran 2D classification

Where did particles in Class2D come from? Is it from RELION's extract job?

@FlyinTeller
Copy link
Author

Where did particles in Class2D come from? Is it from RELION's extract job?

Yes, they were extracted using relion with this command:

`which relion_preprocess_mpi` --i Import/job001/micrographs.star --coord_dir DimerPick/ --coord_suffix _dimerPick.star --part_star Extract/job012/particles.star --part_dir Extract/job012/ --extract --extract_size 360 --scale 180 --norm --bg_radius 67 --white_dust -1 --black_dust -1 --invert_contrast

Interestingly I have noticed (by pure chance) that running the autopicker without --gpu actually seems to get rid of the problem. At least it is that, for the same parameters, specifying --gpu yields the weird figure of merit values and omitting it will create values in a much more meaningful range.

On a colleagues machine, the same command does also work with --gpu, so I am thinking that there must be something specific to my cuda version or graphics cards that is failing silently and then creates these odd values

@FlyinTeller
Copy link
Author

I have downgraded my cuda version to 10.1, recompiled relion and it works now. Sorry for the trouble.

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

No branches or pull requests

2 participants