You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/quickstart/postprocessing/summary.rst
+14-16Lines changed: 14 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
Summary
5
5
=======
6
6
7
-
The ``postprocess.py`` tool analyzes results generated by ``match_template.py`` to identify and characterize top-scoring peaks from template matching.
7
+
The ``postprocess.py`` tool processes the output of ``match_template.py`` to identify the highest-scoring orientations (peaks). Depending on the downstream use case, different ``output-format`` options are available and outlined below.
8
8
9
9
.. code-block:: bash
10
10
@@ -14,76 +14,74 @@ The ``postprocess.py`` tool analyzes results generated by ``match_template.py``
14
14
15
15
From version 0.3.0 onwards, postprocessing supports advanced multi-input and background correction. Multiple input files can be specified to distinguish between different macromolecular species, with corresponding class identifiers made available in orientations and RELION output formats. Additionally, multiple background corrections can be applied simultaneously via ``--background-file``, enabling users to account for various noise sources beyond single backgrounds (e.g., from ``--scramble-phases``) and incorporate complex cellular environments such as membrane backgrounds.
16
16
17
-
Depending on the subequent use case, different ``output-format`` options are available and outlined below.
18
-
19
17
.. tab-set::
20
18
21
19
.. tab-item:: Orientations
22
20
23
-
A tab-separated file *output.tsv* will be created in the process containing eight columns. The x, y and z column correspond to the translation, the euler_x, euler_y and euler_z column to the rotation used to obtain the column score. The detail column contains peak caller specific information.
21
+
Create a tab-separated file containing x, y, z translations, euler_x, euler_y and euler_z Euler angles in counter-clockwise zyz format, corresponding score and peak caller details.
24
22
25
23
.. code-block:: bash
26
24
27
25
postprocess.py \
28
26
--input-file output.pickle \
29
-
--output-prefix output \
30
27
--output-format orientations \
31
28
--mask-edges \
32
29
--min-boundary-distance 20 \
33
30
--num-peaks 1000
34
31
35
32
.. tab-item:: Relion 4 / 5
36
33
37
-
These options generate `STAR <https://en.wikipedia.org/wiki/Self-defining_Text_Archive_and_Retrieval>`_ files compatible with `RELION <https://github.com/3dem/relion>`_ 4 and 5. Both formats contain particle coordinates, Euler angles, scores, and source file references in a format that RELION can directly import. The coordinates and angles are identical to output_format ``orientations``. The created files differ in version headers and in the coordinate system. Relion 4 uses voxel coordinates, Relion 5 centers coordinates and scales them by the voxel size.
34
+
Create a `STAR <https://en.wikipedia.org/wiki/Self-defining_Text_Archive_and_Retrieval>`_ file compatible with `RELION <https://github.com/3dem/relion>`_ 4 and 5. Relion 4 uses voxel coordinates, Relion 5 centers coordinates and scales them by the voxel size. The version difference is reflected in the header.
38
35
39
36
.. code-block:: bash
40
37
41
38
postprocess.py \
42
39
--input-file output.pickle \
43
-
--output-prefix output \
44
40
--output-format relion4 \
45
41
--mask-edges \
46
42
--min-boundary-distance 20 \
43
+
--clockwise-angles \
47
44
--num-peaks 1000
48
45
46
+
.. note::
47
+
48
+
RELION expects ``--clockwise-angles``, which need to be multiplied with negative one to be compatible with our format again.
49
+
49
50
50
51
.. tab-item:: Alignments
51
52
52
-
The code below will call peaks analogously to *Orientations*, but additionally also applies the identified orientation to the template and writes it to disk using the naming pattern {output_prefix}_{index}.{extension}. Index 0 corresponds to the highest scoring orientation.
53
+
Transform template into identified orientations and write the output to disk as ``{output_prefix}_{index}.{extension}``. Index 0 corresponds to the top-scoring peak. This format is useful for assessing the result of fitting templates to maps.
53
54
54
55
.. code-block:: bash
55
56
56
57
postprocess.py \
57
58
--input-file output.pickle \
58
-
--output-prefix output \
59
59
--output-format alignment \
60
60
--mask-edges \
61
61
--min-boundary_distance 20 \
62
62
--num-peaks 10
63
63
64
64
.. tab-item:: Extraction
65
65
66
-
The code below will call peaks analogously to *Orientations*, but additionally extract subsets centered around the peak with specified box size. The generated files follow the naming pattern {output_prefix}_{index}.mrc, where index 0 corresponds to the highest observed score.
66
+
Extract subvolumes around identified peaks and write the output to disk as ``{output_prefix}_{index}.{extension}``. Index 0 corresponds to the top-scoring peak. This format is useful for assessing the result of particle picking.
67
67
68
68
.. code-block:: bash
69
69
70
70
postprocess.py \
71
71
--input-file output.pickle \
72
-
--output-prefix output \
73
72
--output-format extraction \
74
73
--mask-edges \
75
74
--min-boundary-distance 20 \
76
75
--num-peaks 100
77
76
78
77
.. tab-item:: Average
79
78
80
-
The code below will call peaks analogously to *Orientations*, and compute a simple average based on the identified orientations.
79
+
Compute an average of subvolumes based on identified peaks.
81
80
82
81
.. code-block:: bash
83
82
84
83
postprocess.py \
85
84
--input-file output.pickle \
86
-
--output-prefix average \
87
85
--output-format average \
88
86
--mask-edges \
89
87
--min-boundary-distance 20 \
@@ -92,19 +90,19 @@ Depending on the subequent use case, different ``output-format`` options are ava
92
90
93
91
.. tab-item:: Pickle
94
92
95
-
The code below will apply background correction, and create a new pickle file containing the corrected scores. The output is intended for visual assessment of the normalization procedure, and can be reused for postprocessing.
93
+
Create a new pickle file incorporating input files and backgrounds. The output can be used for visual assessment of the normalization procedure and be reused for ``postprocess.py``. The created pickle file can not be used to distinguish between different entities presented by different input files.
Orientations are following the conventions outlined in [1]_. We use a right-handed coordinate system with orthogonal X, Y and Z axes. Euler angles are expressed using intrinsic ZYZ convention, with the first rotation around the Z-axis, the second around the new Y-axis and the third around the new Z-axis (see :py:meth:`euler_to_rotationmatrix <tme.rotations.euler_to_rotationmatrix>`). The default orientation is the z-unit vector (0, 0, 1).
105
+
Orientations are following the conventions outlined in [1]_. We use a right-handed coordinate system with orthogonal X, Y and Z axes. Euler angles are expressed counter-clockwise using intrinsic ZYZ convention, with the first rotation around the Z-axis, the second around the new Y-axis and the third around the new Z-axis (see :py:meth:`euler_to_rotationmatrix <tme.rotations.euler_to_rotationmatrix>`). The default orientation is the z-unit vector (0, 0, 1).
0 commit comments