ctffind 4.1.8 Segmentation fault: 11

Hihi,

I am a new user and try to use ctffind to get its output for NovaCTF. It was fun when I used a dataset has 2048 x 2048, but when it ran on my dataset, it returned error: Segmentation fault 11. And my dataset dimension is 3710 x 3838, it contains 104 micrographs.

Here is the header of my stack:

Map mode .............................. 6 (unsigned 16-bit integer)
Start cols, rows, sects, grid x,y,z ... 0 0 0 1 1 1
Pixel spacing (Angstroms).............. 5.600 5.600 5.600
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 ....................... 0.0000
Maximum density ....................... 33562.
Mean density .......................... 1192.1
tilt angles (original,current) ........ 0.0 0.0 0.0 90.0 90.0 90.0
Space group,# extra bytes,idtype,lens . 0 13312 5 0

I am using Mac OS High Sierra. Here is the input:
** Welcome to Ctffind **

Version : 4.1.8
Compiled : Nov 11 2017
Mode : Interactive

Input image file name [test2.mrc] : test2.mrc
Input is a movie (stack of frames) [no] : no
Output diagnostic image file name
[test2_output.mrc] : test2_output.mrc
Pixel size [5.6] : 5.6
Acceleration voltage [300.0] : 300.0
Spherical aberration [2.7] : 2.7
Amplitude contrast [0.07] : 0.07
Size of amplitude spectrum to compute [512] : 512
Minimum resolution [30.0] : 30.0
Maximum resolution [5.0] : 5.0
Minimum defocus [5000.0] : 5000.0
Maximum defocus [50000.0] : 50000.0
Defocus search step [500.0] : 500.0
Do you know what astigmatism is present? [no] : no
Slower, more exhaustive search? [no] : no
Use a restraint on astigmatism? [yes] : yes
Expected (tolerated) astigmatism [200.0] : 200.0
Find additional phase shift? [no] : no
Do you want to set expert options? [no] : no
File name: test2.mrc
File type: MRC
Dimensions: X = 3710 Y = 3838 Z = 104
Number of slices: 104
Will estimate the CTF parmaeters for 104 micrographs.
Results will be written to this file: test2_output.txt

Estimating CTF parameters...

Segmentation fault: 11 ] ???h:??m:??s

Many thanks for the help!!

Hong

When I ran gdb debugging, it showed this error message:

Thread 2 received signal SIGSEGV, Segmentation fault.
0x000000010000b77e in RescaleSpectrumAndRotationalAverage(Image*, Image*, Image*, int, double*, double*, double*, float*, float*, int, int) ()

Hope it can help in pointing out the error.

Many thanks!
Hong

In reply to by hzhan3

Hi Hong,

Do you have access to a linux machine? If so, could you see if this crash can be reproduced under linux?

Also, it would be great if you could reproduce this using a build of ctffind that includes debug symbols (use the --enable-debugmode flag when configuring if you are building yourself, or just download one of the dbg binaries if you're running on linux).

Thanks,
Alexis

In reply to by Alexis

Hi Alex,

Unfortunately, I do not have a linux machine by the side. Tomorrow I will try to install a vitrual box with a linux system to see if this crash can be reproduced, I will update the information then.

I did enable the debugmode, but i dont know how to show the error message under mac...

PS: could be my sample image is not good? This sample data was collected on Krios 2 on Janelia farm with K2.

Great thanks for the reply and help

Hong

In reply to by hzhan3

Hi Hong,

When you run the program within gdb and it crashes, can you then type "bt"? This should print out a backtrace, which should tell us where exactly this is crashing.

If the problem is reproducible under linux, perhaps you can send me your input image so I can investigate further.

Thanks,
Alexis

In reply to by Alexis

Hi Alex,

I have typed bt after I got the crash, here is the inofrmation:

Estimating CTF parameters...

0% [ ] ???h:??m:??s
Thread 2 received signal SIGSEGV, Segmentation fault.
0x000000010000b75e in RescaleSpectrumAndRotationalAverage(Image*, Image*, Image*, int, double*, double*, double*, float*, float*, int, int) ()
(gdb) bt
#0 0x000000010000b75e in RescaleSpectrumAndRotationalAverage(Image*, Image*, Image*, int, double*, double*, double*, float*, float*, int, int) ()
#1 0x0000000100007a9f in CtffindApp::DoCalculation() ()
#2 0x0000000100038f9f in MyApp::OnInit() ()
#3 0x0000000100178138 in ?? ()
#4 0x0000000000000000 in ?? ()

I just installed ubuntu... I am going to try run the program and update you shortly. Many thanks for your help! and I am happy to send you my sample data.

Best,
Hong

In reply to by Alexis

Hi Alex,

I installed ubuntu 16.04 in my virtual box, and it works fine without the crashes I saw in my mac... I may run ctffind in my virtualbox... If you locate the problems, could you update me too? I would like to run it in my mac system... it is very slow in the virtual box, and I can only use the command line to access the shared folder (read & write), i cannot fix the permission.

Many thanks for the help!!

Best,
Hong

In reply to by hzhan3

Hi Hong,

Unfortunately, I won't be able to debug this since I don't use a Mac myself. It is possible that a future version of ctffind (probably just a couple of weeks away) will have fixed this - the part of the code where the crash seems to happen has undergone some changes in recent development.

Cheers,
Alexis

Re: your question about your sample image. It looks like you have some very strong outliers, mean density ~1000, max ~30x that.

Also, your pixel sampling is quite low at 5.6 angpix. Have you binned your images?

What is your approximate (applied) under focus?

In reply to by himesb

Hi Himesb,

It is a tilt serie from frozen mitochonria. I already removed outlier tilts.

Also, your pixel sampling is quite low at 5.6 angpix. Have you binned your images?
Re: I did not bin my images. I assume 5.6 A is not low compared with single particle images, maybe I am wrong...

What is your approximate (applied) under focus?
Re: I did not know for defocus, I used default value just want to see how ctffind works. I am new to cyro EM field, do you have some suggestion? and what kind of parameters I should note down when I collect data myself?

Many thanks for the help!!!

Best,
Hong

In reply to by hzhan3

Hi Hong,

Welcome to cryoEM!

Here are a few pointers that you can think about, and maybe do some reading on, to help you figure out a bit better __what is the problem__ you hope to solve, before you try to pick a tool to solve it.

By removing outlier tilts, I assume you mean you have removed projections (from a stack of images) that did not track well in the microscope and therefore do not contain your specimen? This is good to do, however, when i spoke of "outliers" I was referring to the distribution of pixel intensities in your image. These are the individual measurements used in EM and many of the statistical approaches used are conditioned on the nature of the underlying probability distributions -- if you have extreme outliers (in your case very high pixel values compared to the mean) then these conditions are violated and problems can arise.

As for the sampling, I had meant the sampling _rate_ which is the inverse of your pixel size. What I think you mean is that your pixel size is large (low sampling rate) compared to SPA. One reason I pointed this out, is that depending on the defocus you have aimed for during data collection, this may leave very little data to be fit by ctffind (ignoring for now the problem of the tilting.)

If your pixel size is 5.6 Ang then the finest detail in terms of spatial frequency is set by the Nyquist limit and is in your case 11.2 Ang. This means you may only have a few zero crossings to fit in the first place.

The reason I say _may only have a few zeros_ brings me back to the question of your nominal defocus. This is not a question of a setting in ctffind, but rather a question of the microscope settings used by whomever collected your tilt-series. These parameters are sample AND experiment specific, so unfortunately I cannot recommend any very general advice as there are none!

If you wish to upload your data to some convenient public repository (google drive for example) I would be happy to offer any other information I can gather from the data.

Best Regards,

Ben H.

In reply to by himesb

Great thanks Ben! Your tips mean a lot to me! You pointed out what I thought about "outliers". I am sorry I was quite lost when you mentioned that, now I have more ideas on it and do you have a good list of references I can start reading on this? This is a very exciting field and I would like to learn more and make sure I do it correctly.

Thanks for the details on defocus! Since I am training on the data analysis on the images (test sample) collected by the previous researcher in the group, but she noted down important parameters when collecting data. My new lab is working on virus replication complex, and it is simple to do a subtomogram averaging from cryo samples. I am from EM in cell biology side, and I do a lot of plastique tomograms in center nervous system, but I do not care too much on defocus since it has higher SNR and we usually not do ctf correction for plastique.

I would happy to share the sample dataset with the community and I need to ask for the permission. It would be great cause every Exp is different.

Thank you again for the detailed answer.
Best,
Hong

Hi Hong,

You should probably start with one of the many good books on the topic, rather than trying to digest the primary literature.

Since it seems you are interested in tomography, you should start with the following.

https://books.google.com/books/about/Electron_Tomography.html?id=LWx6JK…

I would assume that your adviser should have a copy of this handy for you, if not it is worth your investment to procure a copy.

Do you mind if I ask who you are studying under? Are there additional people in your group interested in sub-tomogram averaging?

Best,

Ben H.

In reply to by himesb

Thanks Ben! I do have this book. I am working with Dr. Paul Ahlquist at the University of Wisconsin-Madison. Unfortunately, no one in the group has knowledge in sub-tomogram averaging and we start to investigate structure of virus replication complex. The recent paper was published in elife before I joined. Additionally, we have a cryo EM expert from Purdue University cryo EM platform, her name is Janice Peningtom and she is also interested in sub-tomogram averaging. Janice and I will work together.
Great thanks again Ben! it is really helpful!

Best,
Hong

In reply to by hzhan3

Hi Hong,

If you and Janice would find it helpful, I would be happy to help to answer questions/ offer what advice I can along the way. Additionally, I have made a new package that handles all of the sub-tomogram processing pipeline - including defocus estimation and 3dCTF correction -- the correction is quite a bit faster than NovaCTF.

I am wrapping up work with my beta testers and polishing up the tutorial. If you'd like, I'll send you a note with information on the mailing list for that software (emClarity) as well as where to find the related wiki etc.

Do you have access to a GPU with > 8Gb of memory?

Ben

In reply to by himesb

Great Ben! I am happy to try out! We do have three workstations here, two of them are have i7 5820K CPU, with 2x 4GB GTX 980 Ti GPUs, and 64G for the system memory.
I found your tutorial on youtube. Do you have a webpage? or github I could track then :) ?

Many thanks!

Hong

In reply to by hzhan3

The version on GitHub requires a gpu with 12 gb memory. I am putting the finishing touches on a major update which will relax that condition to at least 8gb, 4 might be pushing, but I will test what the minimum requirement will be and get back to you.

In reply to by himesb

Hi Ben,

Great thanks! Happy holidays!!

Hong