# Background Subtraction

Formalin-fixed paraffin-embedded (FFPE) samples and certain tissue types such as liver or brain may have high auto-fluorescence that significantly impact signal-to-noise ratio (SNR). In turn, low SNR may reduce the accuracy of gating, clustering and downstream spatial analysis. To improve SNR, blank cycles corresponding to the estimated auto-fluorescence can be acquired and subtracted from raw marker intensities.

Successful background subtraction requires 1) a start blank cycle, 2) an end blank cycle and 3) channel exposure times.

| Cycle | Channel 1 | Channel 2       | Channel 3 | Channel 4 |
| ----- | --------- | --------------- | --------- | --------- |
| 1     | DAPI-1    | Blank           | Blank     | Blank     |
| 2     | DAPI-2    | Pan-cytokeratin | Ki67      | CD68      |
| 3     | DAPI-3    | CD4             | CD21      | SMA       |
| 4     | DAPI-4    | Blank           | Blank     | Blank     |

Biomarkers must not contain 'Blank' in its name. 'Empty' channels will not be used for background subtraction. If variable exposure times are used, use the shortest exposure time of the corresponding channel to reduce over-subtraction.

| Cycle | Channel 1 | Channel 2  | Channel 3  | Channel 4  |
| ----- | --------- | ---------- | ---------- | ---------- |
| 1     | 10 ms     | **500 ms** | **350 ms** | **500 ms** |
| 2     | 10 ms     | 500 ms     | 350 ms     | 600 ms     |
| 3     | 10 ms     | 500 ms     | 500 ms     | 500 ms     |
| 4     | 10 ms     | **500 ms** | **350 ms** | **500 ms** |

As a reference, default exposure times for Akoya-validated CODEX® conjugates are listed [here](https://help.codex.bio/codex/cim/microscope-specific-settings/exposure-time-optimization#recommended-exposure-times-for-codex).

Background signal is determined from the blank cycle. A multitude of CODEX experiments have demonstrated that over time (i.e., as cycle number increases) background can either increase or decrease, depending on tissue type and tissue preparation conditions. Thus, we subtract background from signal channels using both start and end blank channels to account for changes in autofluorescence during a CODEX experiment (Figure 1).&#x20;

Additionally, we recognize that differences in exposure times between start blank, end blank, and signal channel may affect background subtraction. To account for differences in exposure time we use a ratio of signal exposure time to blank exposure time (Figure 2).

![Figure 1. Background subtraction as a function of cycle number. Prior to subtraction, the intensity of start and end blank channels (i.e., autofluorescence at the beginning and end of the experiment) is scaled linearly by cycle number to account for changes in background intensity during the CODEX experiment. ](/files/-M2smNvzTUm9XgbZ9reX)

![Figure 2. Background subtraction as a function of cycle number and exposure time. To account for differences in exposure time between blank channels and signal channels background subtraction is applied using a ratio of signal exposure time to blank exposure time. We recommend setting blank exposure to the minimum signal channel exposure time.  ](/files/-M2smcMPK2Vm6TYxC0hi)


---

# 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://help.codex.bio/codex/processor/technical-notes/background-subtraction.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.
