Understanding outputs from PickET¶
A standard run of the PickET library results in the following outputs:
- Semantic segmentations from S1
- Instance segmentations from S2
- Predicted particle centroids from S2
These are described in more details below:
Output from S1¶
The output from S1 is a number of semantic segmentations. These can be visualized using the instructions in visualizing segmentations (e.g. Fig 2A).
Note
For each input tomogram six output semantic segmentations will be generated - each using one of the PickET S1 workflows (for example intensities_kmeans, intensities_gmm, gabor_kmeans, etc.). The users may choose to use more than one of these semantic segmentations in the next step, S2.
Fig. 2A: Output from S1 - Semantic segmentation
Before proceeding to the next step, one needs to identify the particle_cluster_id
corresponding to each of the semantic segmentation step that will be passed to S2. Refer to obtaining particle cluster ID for further instructions on this.
Output from S2¶
The principal output from S2 is a number of .yaml
files containing the predicted particle coordinates along with its associated metadata. These files are text files that can be opened in any text editor. One can also visualize the predicted centroids overlayed on the input tomogram using see centroids script (Fig. 4). This script can be run as follows:
Note
For each input tomogram several output particle centroid prediction files will be generated - each using one of the PickET S1 and S2 workflows (for example intensities_kmeans_CC, intensities_kmeans_WS, gabor_kmeans_CC, gabor_kmeans_WS, etc.). In general, the number of output prediction files will be two times the number of input semantic segmentations.
Fig. 4: Output from S2 - Predicted centroids
In addition, instance segmentations will also be generated associated with each of the predicted centroids file. These can also be visualized following the instructions provided in visualizing segmentations (Fig. 2B).
Fig. 2B: Output from S2 - Instance segmentation
Note
An optimal instance segmentation is one in which, first, the particles are well separated from the background and, second, the individual particle instances are well separated from each other.
The predicted particle coordinates are based on Cartesian coordinate system that assumes the top-left-front of the tomogram to be the origin (0,0,0). These predicted coordinates can be converted to assume any other point in the tomogram as the origin and the origin adjusted predictions can be exported in .csv
format using the converter script which can be run as follows:
python src/picket/accessories/offset_correct_pred_centroids_and_convert_to_csv.py -i <input_fname> -o <output_dir> -n "<new_origin>"
where <new_origin>
must be specified as "(z,y,x)"
where z, y, and x are coordinates of the new origin with respect to the current origin (top-left-front) of the tomogram specified as integers.
Important
<new_origin>
must be specified within quotes.
Subtomograms corresponding to the particle centroids may also be extracted as .npy
files using the subtomogram extraction script as follows:
python src/picket/accessories/extract_subtomograms.py <coords_fpath> <subtomogram_size> <output_dir>
coords_fpath
corresponds to the path to a .yaml
predicted coordinates file; subtomogram_size
corresponds to the size of the subtomograms specified in number of voxels; and output_dir
is the path to the directory where the extracted subtomograms should be saved.