Skip to content

Commit 05f4dcd

Browse files
committed
Updated docs
1 parent 2e6a8d5 commit 05f4dcd

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

doc/quickstart/postprocessing/summary.rst

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Summary
55
=======
66

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.
88

99
.. code-block:: bash
1010
@@ -14,76 +14,74 @@ The ``postprocess.py`` tool analyzes results generated by ``match_template.py``
1414

1515
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.
1616

17-
Depending on the subequent use case, different ``output-format`` options are available and outlined below.
18-
1917
.. tab-set::
2018

2119
.. tab-item:: Orientations
2220

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.
2422

2523
.. code-block:: bash
2624
2725
postprocess.py \
2826
--input-file output.pickle \
29-
--output-prefix output \
3027
--output-format orientations \
3128
--mask-edges \
3229
--min-boundary-distance 20 \
3330
--num-peaks 1000
3431
3532
.. tab-item:: Relion 4 / 5
3633

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.
3835

3936
.. code-block:: bash
4037
4138
postprocess.py \
4239
--input-file output.pickle \
43-
--output-prefix output \
4440
--output-format relion4 \
4541
--mask-edges \
4642
--min-boundary-distance 20 \
43+
--clockwise-angles \
4744
--num-peaks 1000
4845
46+
.. note::
47+
48+
RELION expects ``--clockwise-angles``, which need to be multiplied with negative one to be compatible with our format again.
49+
4950

5051
.. tab-item:: Alignments
5152

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.
5354

5455
.. code-block:: bash
5556
5657
postprocess.py \
5758
--input-file output.pickle \
58-
--output-prefix output \
5959
--output-format alignment \
6060
--mask-edges \
6161
--min-boundary_distance 20 \
6262
--num-peaks 10
6363
6464
.. tab-item:: Extraction
6565

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.
6767

6868
.. code-block:: bash
6969
7070
postprocess.py \
7171
--input-file output.pickle \
72-
--output-prefix output \
7372
--output-format extraction \
7473
--mask-edges \
7574
--min-boundary-distance 20 \
7675
--num-peaks 100
7776
7877
.. tab-item:: Average
7978

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.
8180

8281
.. code-block:: bash
8382
8483
postprocess.py \
8584
--input-file output.pickle \
86-
--output-prefix average \
8785
--output-format average \
8886
--mask-edges \
8987
--min-boundary-distance 20 \
@@ -92,19 +90,19 @@ Depending on the subequent use case, different ``output-format`` options are ava
9290
9391
.. tab-item:: Pickle
9492

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.
9694

9795
.. code-block:: bash
9896
9997
postprocess.py \
10098
--input-file output.pickle \
101-
--output-prefix output_new \
99+
--output-prefix output_norm \
102100
--output-format pickle \
103101
--background-file background1.pickle background2.pickle
104102
105103
.. note::
106104

107-
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).
108106

109107

110108
References

0 commit comments

Comments
 (0)