API

Project object

class relion.Project(path, database='ISPyB', run_options=None, message_constructors=None)[source]

Reads information from a Relion project directory and makes it available in a structured, object-oriented, and pythonic fashion.

property class2D

access the 2D classification stage of the project. Returns a dictionary-like object with job names as keys, and lists of Class2DParticleClass namedtuples as values.

property class3D

access the 3D classification stage of the project. Returns a dictionary-like object with job names as keys, and lists of Class3DParticleClass namedtuples as values.

property ctffind

access the CTFFind stage of the project. Returns a dictionary-like object with job names as keys, and lists of CTFMicrograph namedtuples as values.

property motioncorrection

access the motion correction stage of the project. Returns a dictionary-like object with job names as keys, and lists of MCMicrograph namedtuples as values.

The individual stage accessors .ctffind, .class2D, etc. return a dictionary-like object that allows you to access individual Relion jobs within that particular stage. The dictionary key names are the relion job names (usually jobXXX), the dictionary value is a list of stage-specific named tuples, listed below.

Stage-specific information

class relion._parser.ctffind.CTFMicrograph(micrograph_name, astigmatism, defocus_u, defocus_v, defocus_angle, max_resolution, fig_of_merit, amp_contrast, diagnostic_plot_path)

Contrast Transfer Function stage.

property amp_contrast

Amplitude contrast.

property astigmatism

Estimated astigmatism. Units angstrom (A).

property defocus_angle

Estimated angle of astigmatism.

property defocus_u

Averaged with Defocus V to give estimated defocus. Units angstrom (A).

property defocus_v

Averaged with Defocus U to give estimated defocus. Units angstrom (A).

property diagnostic_plot_path

Path to the CTF diagnostic (fit/data comparison) plot (jpeg).

property fig_of_merit

Figure of merit/CC/correlation value. Confidence of the defocus estimation.

property max_resolution

Maximum resolution that the software can detect. Units angstrom (A).

property micrograph_name

Micrograph name. Useful for reference.

class relion._parser.motioncorrection.MCMicrograph(micrograph_name, micrograph_snapshot_full_path, micrograph_number, total_motion, early_motion, late_motion, drift_data)

Motion Correction stage.

property drift_data

Alias for field number 6

property early_motion

Early motion.

property late_motion

Late motion.

property micrograph_name

Micrograph name. Useful for reference.

property micrograph_number

Micrograph number: sequential in time.

property micrograph_snapshot_full_path

Path to jpeg of the motion corrected micrograph.

property total_motion

Total motion. The amount the sample moved during exposure. Units angstrom (A).

class relion._parser.class2D.Class2DParticleClass(particle_sum, reference_image, class_distribution, accuracy_rotations, accuracy_translations_angst, estimated_resolution, overall_fourier_completeness, job)

2D Classification stage.

property accuracy_rotations

Accuracy rotations.

property accuracy_translations_angst

Accuracy translations angst.

property class_distribution

Class Distribution. Proportional to the number of particles per class.

property estimated_resolution

Estimated resolution.

property job

Job number of the Class2D job.

property overall_fourier_completeness

Overall Fourier completeness.

property particle_sum

Sum of all particles in the class. Gives a tuple with the class number first, then the particle sum.

property reference_image

Reference image.

class relion._parser.class3D.Class3DParticleClass(particle_sum, reference_image, class_distribution, accuracy_rotations, accuracy_translations_angst, estimated_resolution, overall_fourier_completeness, initial_model_num_particles, job)

3D Classification stage.

property accuracy_rotations

Accuracy rotations.

property accuracy_translations_angst

Accuracy translations angst.

property class_distribution

Class Distribution. Proportional to the number of particles per class.

property estimated_resolution

Estimated resolution.

property initial_model_num_particles

The number of particles used to generate the initial model.

property job

Job number of the Class3D job.

property overall_fourier_completeness

Overall Fourier completeness.

property particle_sum

Sum of all particles in the class. Gives a tuple with the class number first, then the particle sum.

property reference_image

Reference image.