# Job: Regroup 3D Classes

## Description

Regroup 3D is new job in CryoSPARC v4.4+ that regroups particles from an upstream classification job into a smaller set of ‘superclasses’ using a light-weight 3D-voxel-based spectral clustering approach.

## Input

* Particles (all classes), from 3D Classification, Heterogeneous Refinement, or Ab-Initio Reconstruction
* Volumes (all classes), from 3D Classification, Heterogeneous Refinement, or Ab-Initio Reconstruction. This is a [volumes group](https://guide.cryosparc.com/processing-data/all-job-types-in-cryosparc/utilities/split-volumes-group) input.
* \[Optional] Mask

## **Common Parameters**

* **Number of super classes**
  * Choose the number of classes that particles will be regrouped into. Must be at least one, and at most one less than the number of input classes
* **Minimum class size (particles)**
  * Only classes with this many particles will be included in the regrouping process; the excluded classes' particles will be output in "Remaining particles". This parameter may be useful when there are (near-)empty classes with poorly resolved volumes.
* **Manually exclude classes**
  * This may be set to a comma-separated zero-indexed list of upstream classes to exclude from the regrouping. The excluded classes' particles will be output in "Remaining particles".
* **Align pairs of classes**
  * If activated, this will ensure that volumes are aligned to each other on a pairwise basis before the regrouping occurs. This can help improve the quality of the clustering when processing datasets from jobs like Ab-Initio Reconstruction or Heterogeneous Refinement, which may not produce output classes that are in-register with each other.
* **Maximum shift (A)**
  * If pairwise alignment is enabled, this specifies the maximum distance (in Angstroms) between two volumes to search over during pairwise alignment
* **Spherical mask inner radius**
  * Inner radius (as a proportion of half the box size) of spherical mask to apply to volumes before regrouping. For example, a value of 1.0 results in a sphere with the same diameter as the box, while a value of 0.5 results in a sphere with a diameter half that of the box. If left empty, no spherical mask will be applied.
* **\[Legacy] Class alignment3D prefix**
  * By default, this parameter is set such that class assignments are expected to come from 3D classification. If using this job with an upstream heterogeneous refinement, this should be changed to the non-default value of `alignments_class_`.

## Output

* Regrouped particles and *per-superclass* particles
  * Note that all particle assignments are recomputed by maximizing over the class posteriors in the upstream dataset. Upstream posterior probabilities are ignored except as a proxy for class assignment. Regrouped particles are given ‘hard’ (one-hot) class posteriors based on the new set of superclasses.
* Volumes (all superclasses) and *per-superclass* average volumes
  * These volumes are the real-space *average* of class volumes that belong to each superclass, aligned to the largest class (if alignment was requested). To recover back-projected volumes from super-class particle assignments, use the Heterogeneous Reconstruction Only job with the `regrouped_particles` output group.
  * Note that the Volumes (all superclasses) output is a [volumes group](https://guide.cryosparc.com/processing-data/all-job-types-in-cryosparc/utilities/split-volumes-group) output (new in CryoSPARC v4.5). It includes a `series` result that contains a downloadable zip file of all volumes in the group.
* \[If supplied] Mask
* Remaining particles

## Common Next Steps

* Heterogeneous Reconstruction Only
* Further 3D classification


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guide.cryosparc.com/processing-data/all-job-types-in-cryosparc/variability/job-regroup-3d-classes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
