Documented functions with links to source

Program to determine CTF parameters from a set of micrographs using CTFFIND and CTFTILT (Mindell and Grigorieff JSB, 2003)

class micctfdetermine.MicCtfDeterminePar[source]

Class to initiate default dictionary with input parameters including help and range values and status dictionary

Methods

define_parameters_and_their_properties

define_program_states

set_amplitude_contrast

set_astigmatism_restraint

set_ctftilt_option

set_ctftilt_search_range

set_defocus_range

set_defocus_search_step_size

set_electron_voltage

set_resolution_range

set_spherical_aberration

set_spring_db_continue_option

set_tilt_range

define_parameters_and_their_properties()[source]
define_program_states()[source]
set_spring_db_continue_option(feature_set)[source]
set_spherical_aberration(feature_set)[source]
set_electron_voltage(feature_set)[source]
set_amplitude_contrast(feature_set)[source]
set_defocus_range(feature_set)[source]
set_astigmatism_restraint(feature_set)[source]
set_defocus_search_step_size(feature_set)[source]
set_resolution_range(feature_set)[source]
set_ctftilt_option(feature_set)[source]
set_ctftilt_search_range(feature_set)[source]
set_tilt_range(feature_set)[source]
class micctfdetermine.MicCtfDeterminePreparation(parset=None)[source]
  • Class that holds all functions required for splitting micrographs

  • __init__ Function to read in the entered parameter dictionary, load micrograph and initialize unique temporary directory

Methods

convert_to_mrc_if_required

convert_to_mrc_if_required(non_mrc_micrograph)[source]
class micctfdetermine.MicCtfDetermineFind(parset=None)[source]

Methods

determine_closest_power_of_two(tilesize)

>>> from spring.micprgs.micctfdetermine import MicCtfDetermine

extract_values_from_ctffind3_style_output(…)

>>> from spring.micprgs.micctfdetermine import MicCtfDetermine

extract_values_from_ctffind4_style_output(…)

>>> from spring.micprgs.micctfdetermine import MicCtfDetermine

analyze_ctffind_report_file

convert_to_mrc_if_required

enter_ctffind_values_in_database

launch_ctffind

make_ctffind_parameters_named_tuple

make_new_micrograph_entry_with_ctffind_parameters

query_micrograph_name_in_find_database

query_micrograph_name_in_mic_database

raise_error_message_if_values_not_found

run_ctffind_for_first_defocus_estimation

start_program_and_capture_output

update_determined_ctffind_values_for_micrograph

start_program_and_capture_output(diagnostic_power_montage, ctffind_or_ctftilt_exe, script, ctffind_or_ctftilt_report_file)[source]
determine_closest_power_of_two(tilesize)[source]
>>> from spring.micprgs.micctfdetermine import MicCtfDetermine
>>> MicCtfDetermine().determine_closest_power_of_two(100)
128
>>> MicCtfDetermine().determine_closest_power_of_two(78)
64
launch_ctffind(micrograph_file)[source]
raise_error_message_if_values_not_found(report_file, found, program='CTFFIND')[source]
extract_values_from_ctffind3_style_output(ctffind_lines, report_file)[source]
>>> from spring.micprgs.micctfdetermine import MicCtfDetermine
>>> output = ['DFMID1\tDFMID2\tANGAST\tCC', '18861.47\t19339.21\t38.34\t0.1167\tFinal Values']
>>> MicCtfDetermine().extract_values_from_ctffind3_style_output(output, 'report.log')
(18861.47, 19339.21, 38.34, 0.1167)
>>> MicCtfDetermine().extract_values_from_ctffind3_style_output([output[0]], 'report.log')
Traceback (most recent call last):
    ...
ValueError: CTFFIND did not finish successfully. Please check report.log logfile for details.
extract_values_from_ctffind4_style_output(ctffind_lines, report_file)[source]
>>> from spring.micprgs.micctfdetermine import MicCtfDetermine
>>> output = ['Estimated defocus values : 19105.03 , 18591.51 Angstroms', 'Estimated azimuth of astigmatism: -70.73 degrees','Score                           : .21161', 'Thon rings with good fit up to  : 4.5 Angstroms']
>>> MicCtfDetermine().extract_values_from_ctffind4_style_output(output, 'report.log')
(19105.03, 18591.51, -70.73, 0.21161, 4.5)
>>> MicCtfDetermine().extract_values_from_ctffind4_style_output([output[0]], 'report.log')
Traceback (most recent call last):
    ...
ValueError: CTFFIND did not finish successfully. Please check report.log logfile for details.
analyze_ctffind_report_file(report_file)[source]
update_determined_ctffind_values_for_micrograph(current_mic, ctffind_parameters, pixelsize)[source]
make_new_micrograph_entry_with_ctffind_parameters(current_mic, micrograph_file, ori_pixelsize, ctf_parameters, ctffind_parameters)[source]
query_micrograph_name_in_find_database(session, micrograph_file)[source]
query_micrograph_name_in_mic_database(session, micrograph_file)[source]
enter_ctffind_values_in_database(session, micrograph_file, ori_pixelsize, ctf_parameters, ctffind_parameters)[source]
make_ctffind_parameters_named_tuple()[source]
run_ctffind_for_first_defocus_estimation(micrograph_file)[source]
class micctfdetermine.MicCtfDetermineTilt(parset=None)[source]

Methods

determine_closest_power_of_two(tilesize)

>>> from spring.micprgs.micctfdetermine import MicCtfDetermine

extract_values_from_ctffind3_style_output(…)

>>> from spring.micprgs.micctfdetermine import MicCtfDetermine

extract_values_from_ctffind4_style_output(…)

>>> from spring.micprgs.micctfdetermine import MicCtfDetermine

analyze_ctffind_report_file

analyze_ctftilt_report_file

convert_to_mrc_if_required

enter_additional_ctftilt_parameters

enter_ctffind_values_in_database

enter_ctftilt_values_in_database

extract_values_from_ctftilt_style_output

launch_ctffind

launch_ctftilt

make_ctffind_parameters_named_tuple

make_ctftilt_parameters_named_tuple

make_new_micrograph_entry_with_ctffind_parameters

query_micrograph_name_in_find_database

query_micrograph_name_in_mic_database

raise_error_message_if_values_not_found

run_ctffind_for_first_defocus_estimation

run_ctftilt_to_refine_defocus_parameters

start_program_and_capture_output

update_determined_ctffind_values_for_micrograph

update_determined_ctftilt_values_for_micrograph

launch_ctftilt(micrograph_file, found_defocus)[source]
make_ctftilt_parameters_named_tuple()[source]
extract_values_from_ctftilt_style_output(report_file, ctftilt_lines)[source]
analyze_ctftilt_report_file(report_file)[source]
enter_additional_ctftilt_parameters(current_mic, ctftilt_parameters)[source]
update_determined_ctftilt_values_for_micrograph(current_mic, pixelsize, ctftilt_parameters)[source]
enter_ctftilt_values_in_database(session, micrograph_file, pixelsize, ctftilt_parameters)[source]
run_ctftilt_to_refine_defocus_parameters(micrograph_file, found_defocus)[source]
class micctfdetermine.MicCtfDetermineDiagnosticPlot(parset=None)[source]

Methods

determine_closest_power_of_two(tilesize)

>>> from spring.micprgs.micctfdetermine import MicCtfDetermine

extract_values_from_ctffind3_style_output(…)

>>> from spring.micprgs.micctfdetermine import MicCtfDetermine

extract_values_from_ctffind4_style_output(…)

>>> from spring.micprgs.micctfdetermine import MicCtfDetermine

add_final_values_from_ctffind_or_ctftilt_report_files

add_montage_images

analyze_ctffind_report_file

analyze_ctftilt_report_file

assemble_diagnostic_plot

convert_to_mrc_if_required

enter_additional_ctftilt_parameters

enter_ctffind_values_in_database

enter_ctftilt_values_in_database

extract_values_from_ctftilt_style_output

launch_ctffind

launch_ctftilt

make_ctffind_parameters_named_tuple

make_ctftilt_parameters_named_tuple

make_new_micrograph_entry_with_ctffind_parameters

query_micrograph_name_in_find_database

query_micrograph_name_in_mic_database

raise_error_message_if_values_not_found

run_ctffind_for_first_defocus_estimation

run_ctftilt_to_refine_defocus_parameters

start_program_and_capture_output

update_determined_ctffind_values_for_micrograph

update_determined_ctftilt_values_for_micrograph

add_montage_images(find_power_montage, subplot)[source]
add_final_values_from_ctffind_or_ctftilt_report_files(ctffind_report, subplot)[source]
assemble_diagnostic_plot(find_power_montage, ctffind_report_file, tilt_power_montage, ctftilt_report_file, infile, outfile)[source]
class micctfdetermine.MicCtfDetermine(parset=None)[source]

Methods

determine_closest_power_of_two(tilesize)

>>> from spring.micprgs.micctfdetermine import MicCtfDetermine

extract_values_from_ctffind3_style_output(…)

>>> from spring.micprgs.micctfdetermine import MicCtfDetermine

extract_values_from_ctffind4_style_output(…)

>>> from spring.micprgs.micctfdetermine import MicCtfDetermine

add_final_values_from_ctffind_or_ctftilt_report_files

add_montage_images

analyze_ctffind_report_file

analyze_ctftilt_report_file

assemble_diagnostic_plot

convert_to_mrc_if_required

determine_ctf

enter_additional_ctftilt_parameters

enter_ctffind_and_ctftilt_values_in_database

enter_ctffind_values_in_database

enter_ctftilt_values_in_database

extract_values_from_ctftilt_style_output

filter_previously_determined_micrographs

launch_ctffind

launch_ctftilt

make_ctf_parameter_named_tuple

make_ctffind_parameters_named_tuple

make_ctftilt_parameters_named_tuple

make_empty_ctftilt_parameters

make_new_micrograph_entry_with_ctffind_parameters

prepare_micrograph_for_ctffind

query_micrograph_name_in_find_database

query_micrograph_name_in_mic_database

raise_error_message_if_values_not_found

run_ctffind_and_ctftilt_for_each_micrograph

run_ctffind_and_ctftilt_for_given_micrographs

run_ctffind_for_first_defocus_estimation

run_ctftilt_to_refine_defocus_parameters

setup_database_and_ctfinfo

start_program_and_capture_output

update_determined_ctffind_values_for_micrograph

update_determined_ctftilt_values_for_micrograph

prepare_micrograph_for_ctffind(each_micrograph_file)[source]
make_empty_ctftilt_parameters()[source]
run_ctffind_and_ctftilt_for_each_micrograph(micrograph_files, outfiles, each_micrograph_index, each_micrograph_file)[source]
filter_previously_determined_micrographs(session, micrograph_files)[source]
setup_database_and_ctfinfo(micrograph_files)[source]
run_ctffind_and_ctftilt_for_given_micrographs(micrograph_files, outfiles)[source]
make_ctf_parameter_named_tuple()[source]
enter_ctffind_and_ctftilt_values_in_database(micrograph_files, ctffind_parameters, ctftilt_parameters)[source]
determine_ctf()[source]
micctfdetermine.main()[source]
class micctfdetermine_mpi.ScanMpi[source]

Methods

end_scan_mpi_programs

startup_scan_mpi_programs

startup_scan_mpi_programs()[source]
end_scan_mpi_programs()[source]
class micctfdetermine_mpi.MicCtfDetermineMpi(parset=None)[source]

Methods

determine_closest_power_of_two(tilesize)

>>> from spring.micprgs.micctfdetermine import MicCtfDetermine

extract_values_from_ctffind3_style_output(…)

>>> from spring.micprgs.micctfdetermine import MicCtfDetermine

extract_values_from_ctffind4_style_output(…)

>>> from spring.micprgs.micctfdetermine import MicCtfDetermine

fill_micrographs_list_with_dummy(…)

>>> from spring.micprgs.micctfdetermine_mpi import MicCtfDetermineMpi

add_final_values_from_ctffind_or_ctftilt_report_files

add_montage_images

analyze_ctffind_report_file

analyze_ctftilt_report_file

assemble_diagnostic_plot

convert_to_mrc_if_required

determine_ctf

end_scan_mpi_programs

enter_additional_ctftilt_parameters

enter_ctffind_and_ctftilt_values_in_database

enter_ctffind_values_in_database

enter_ctftilt_values_in_database

extract_values_from_ctftilt_style_output

filter_previously_determined_micrographs

gather_ctf_and_enter_in_database

insure_that_every_node_has_the_same_number_of_micrographs

launch_ctffind

launch_ctftilt

make_ctf_parameter_named_tuple

make_ctffind_parameters_named_tuple

make_ctftilt_parameters_named_tuple

make_empty_ctftilt_parameters

make_new_micrograph_entry_with_ctffind_parameters

prepare_micrograph_for_ctffind

query_micrograph_name_in_find_database

query_micrograph_name_in_mic_database

raise_error_message_if_values_not_found

run_ctffind_and_ctftilt_for_each_micrograph

run_ctffind_and_ctftilt_for_given_micrographs

run_ctffind_for_first_defocus_estimation

run_ctftilt_to_refine_defocus_parameters

setup_database_and_ctfinfo

start_program_and_capture_output

startup_scan_mpi_programs

update_determined_ctffind_values_for_micrograph

update_determined_ctftilt_values_for_micrograph

gather_ctf_and_enter_in_database(ctffind_params_list, ctftilt_params_list)[source]
fill_micrographs_list_with_dummy(micrograph_files, max_micrograph_count)[source]
>>> from spring.micprgs.micctfdetermine_mpi import MicCtfDetermineMpi
>>> MicCtfDetermineMpi().fill_micrographs_list_with_dummy(['dim', 'dum'], 4) 
['dim', 'dum', 'place_holder', 'place_holder']
>>> MicCtfDetermineMpi().fill_micrographs_list_with_dummy(['dim', 'dum'], 2) 
['dim', 'dum']
insure_that_every_node_has_the_same_number_of_micrographs(micrograph_files)[source]
run_ctffind_and_ctftilt_for_given_micrographs(micrograph_files, outfiles)[source]
determine_ctf()[source]
micctfdetermine_mpi.main()[source]