Feature Request - Output required arguments and optional parameters

Hello,

I was wondering if you might incorporate this new feature into future versions of CTFFind?

I think it would be a big aid if calling the program with something like -h/--h/-help/--help would output a full list of required and optional parameters and switches.

Currently in CTFFind 4.1.8 I receive this when I attempt that:

$ ./ctffind help
Usage: ctffind [--old-school-input] [--old-school-input-ctffind4] [--amplitude-spectrum-input] [--filtered-amplitude-spectrum-input] [--fast] [controller_address] [controller_port] [job_code]
--old-school-input Pretend this is ctffind3 (for compatibility with old scripts and programs)
--old-school-input-ctffind4 Accept parameters from stdin, like ctffind3, but with extra lines for ctffind4-specific options (movie processing and phase shift estimation
--amplitude-spectrum-input The input image is an amplitude spectrum, not a real-space image
--filtered-amplitude-spectrum-input The input image is filtered (background-subtracted) amplitude spectrum
--fast Skip computation of fit statistics as well as spectrum contrast enhancement

Which has some switches but does not say what is required and I don't think this is a complete list of possible parameters.

Please let me know if you'd like me to elaborate on this suggestion

Thank you

Thanks for your suggestion.

I believe this is the complete list of command-line switches that ctffind will accept. All are optional. Do you have any parameter specifically you are thinking about when you say this isn't a complete list?

Most parameters are given to ctffind after the program has launched, via the standard input (or via a network socket if controlled by cisTEM). I don't have any plans to add another interface to the program, though this would be feasible given the structure of the code, with user interaction separated from the meat of the program.

Hope this helps clarify the situation,
Alexis

In reply to by Alexis

Hello Alexis,
Thank you for your response.

I apologize if my questions or suggestions seem odd but I'm not really an end user. I'm trying to figure out how I can use CTFFind in a script to be run automatically on images. I'm accustomed to looking at man pages and the help output of the --h option on other programs to figure out how to run programs.

If I am to call the program in a non-interactive script what information is needed? Also is there a list of the possible exit codes CTFFind 4 could return and what they mean? I'd like to catch any and all errors in an intelligent manner.

Thank you
Chris

In reply to by clil16

Hi Chris,

Typically, a script to run ctffind would look something like this (*):

/path/to/ctffind <\<\eof
$input_image_file
$output_diag_image
$pixel_size
$acceleration_voltage
$spherical_aberration
$amplitude_contrast
$spectrum_dim
$min_res
$max_res
$min_def
$max_def
$step_def
no
no
yes
$expected_astig
yes
$min_phase_shift
$max_phase_shift
$step_phase_shift
no
eofHi Chris,

Typically, a shell script to run ctffind would look something like this:

/path/to/ctffind <\<\eof
$input_image_file
$output_diag_image
$pixel_size
$acceleration_voltage
$spherical_aberration
$amplitude_contrast
$spectrum_dim
$min_res
$max_res
$min_def
$max_def
$step_def
no
no
yes
$expected_astig
yes
$min_phase_shift
$max_phase_shift
$step_phase_shift
no
eof

Note that depending on the user's answers, the interaction changes and more or less questions may be asked. For the meaning of individual questions and the expected answers, please consult with your users or refer to the ctffind4 paper. You will have to define different interactions depending on
- whether the users are giving images or movies as input
- whether they want to restrain astigmatism
- whether they want to search of additional phase shift
- whether they want to set expert options

You should be able to ask one of your more experienced users for what settings they normally use.

In terms of exit codes, I can't completely guarantee that a return of 0 always means everything worked correctly, but I'm pretty sure it does. Users are expected to pay attention to the output.

You may want to consult existing wrappers around ctffind4, e.g. scipion, appion, or focus.

Hope this helps,
Alexis

Note that depending on the user's answers, the interaction changes and more or less questions may be asked. For the meaning of individual questions and the expected answers, please consult with your users or refer to the ctffind4 paper. You will have to define different interactions depending on
- whether the users are giving images or movies as input
- whether they want to restrain astigmatism
- whether they want to search of additional phase shift
- whether they want to set expert options

You should be able to ask one of your more experienced users for what settings they normally use.

In terms of exit codes, I can't completely guarantee that a return of 0 always means everything worked correctly, but I'm pretty sure it does. Users are expected to pay attention to the output.

You may want to consult existing wrappers around ctffind4, e.g. scipion, appion, or focus.

Hope this helps,
Alexis

(*) This forum attempts to interpret "less than" glyphs as html, so I had to put backslashes in front of them, but obviously you'd ignore those

Hi Alexis,

Thank you very much for the information.