API

Project object

class relion.Project(path, database='ISPyB', run_options=None, message_constructors=None, cluster=False, version: int = 3)[source]

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

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.

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.

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.

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

Contrast Transfer Function stage.

amp_contrast

Amplitude contrast.

astigmatism

Estimated astigmatism. Units angstrom (A).

defocus_angle

Estimated angle of astigmatism.

defocus_u

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

defocus_v

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

diagnostic_plot_path

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

fig_of_merit

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

max_resolution

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

micrograph_name

Micrograph name. Useful for reference.

class relion._parser.motioncorrection.MCMicrograph

Motion Correction stage.

drift_data

Alias for field number 7

early_motion

Early motion.

late_motion

Late motion.

micrograph_name

Micrograph name. Useful for reference.

micrograph_number

Micrograph number: sequential in time.

micrograph_snapshot_full_path

Path to jpeg of the motion corrected micrograph.

micrograph_timestamp

Time stamp at which the micrograph was created.

total_motion

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

class relion._parser.class2D.Class2DParticleClass

2D Classification stage.

accuracy_rotations

Accuracy rotations.

accuracy_translations_angst

Accuracy translations angst.

class_distribution

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

estimated_resolution

Estimated resolution.

job

Job number of the Class2D job.

overall_fourier_completeness

Overall Fourier completeness.

particle_sum

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

reference_image

Reference image.

class relion._parser.class3D.Class3DParticleClass

3D Classification stage.

accuracy_rotations

Accuracy rotations.

accuracy_translations_angst

Accuracy translations angst.

class_distribution

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

estimated_resolution

Estimated resolution.

initial_model_num_particles

The number of particles used to generate the initial model.

job

Job number of the Class3D job.

overall_fourier_completeness

Overall Fourier completeness.

particle_sum

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

reference_image

Reference image.