xmipp3.protocols.protocol_cl2d_clustering module

class xmipp3.protocols.protocol_cl2d_clustering.XmippProtCL2DClustering(**args)[source]

Bases: ProtAnalysis2D, XmippProtocol

2D clustering protocol to group similar images (2D Averages or 2D Classes)

AVERAGES = 1
BOTH = 2
CLASSES = 0
clusterClasses()[source]

xmipp_cl2d_clustering -i path/to/inputAverages.mrcs -o path/to/outputDir -m 10 -M 20 -j 8

convertStep()[source]
createOutputSetOfAverages(inputSet2D, result_dict, output_dict)[source]
createOutputSetOfClasses(inputSet2D, result_dict, output_dict)[source]
createOutputStep()[source]
getClusterImagesPlot()[source]
getClusterPlot()[source]
read_clusters_from_txt(file_path)[source]

Reads a cluster dictionary from a .txt file formatted as: Cluster 0:

6

Cluster 1:

36 34 44

Args:

file_path (str): The path to the .txt file.

Returns:

dict: A dictionary where the key is the cluster number and the value is a list of associated numbers.