# Job: Check for Corrupt Particles

## Description

Checks if the particle files on disk are corrupt. The job will read the header of each file and compute the expected file size based on the `ny`, `nx` and `nz` values. If the expected file size of a file doesn't match the actual file size on disk, the job will mark the particle as corrupt. In CryoSPARC v4.6.1+, the job will also by default check for NaN values in the particle stack files, and mark the particles as corrupt if any are found. The job issues a warning for each file that is found corrupt.

![A corrupted .mrc file](/files/B1dxAvZHZ0O3jPx8bVcd)

The job will produce an output that includes only the non-corrupt particle files. This output can be used for downstream processing. In CryoSPARC v4.6.1+, the job will run through all input particles, produce warnings, and then throw and error fail at the end if any files were found to be corrupt. The job can then either be marked as complete in order to use the filtered output, or it can be run with the "Fail if corruption is detected" flag off.

In CryoSPARC v4.6.1+, the job is also able to check a checksum in the MRC header to ensure that all the data in the file is intact. The checksum is only produced for MRC files written in v4.6.1+. The "verify file checksums" parameter is off by default.

## Input

* Particles

## Output

* Particles

## Common Next Steps

You can use the output of the job to carry on processing, since the output only contains files that were found to be intact and not corrupt.

After any corrupt files have been identified, you can then find the files on the filesystem and try to rectify the issue that lead to the corruption.


---

# 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/utilities/job-check-for-corrupt-particles.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.
