> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bioptimus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# bioptimus.preprocess.omics.base

Base classes for omics preprocessing.

## OmicsPreprocessor

```python theme={null}
class OmicsPreprocessor(ABC)
```

Base class for omics array transformations.

Each subclass implements [`process`](/sdk-reference/preprocess/omics/base#process) (forward) and optionally [`reverse`](/sdk-reference/preprocess/omics/base#reverse) (inverse).  Calling the instance delegates to [`process`](/sdk-reference/preprocess/omics/base#process).

***

#### process

```python theme={null}
@abstractmethod
def process(matrix: np.ndarray) -> np.ndarray
```

Applies the transform (forward direction).

<ParamField body="matrix">
  Input array to transform.
</ParamField>

**Returns**:

Transformed array.

***

#### reverse

```python theme={null}
def reverse(matrix: np.ndarray) -> np.ndarray
```

Undo the transform (inverse direction).

Raises `NotImplementedError` for irreversible transforms.

<ParamField body="matrix">
  Transformed array to invert.
</ParamField>

**Returns**:

Array in the original space.

## OmicsPipeline

```python theme={null}
class OmicsPipeline(steps: list[OmicsPreprocessor])
```

Chains multiple [`OmicsPreprocessor`](/sdk-reference/preprocess/omics/base#omicspreprocessor) steps sequentially.

Forward:  input → step\[0] → step\[1] → … → output Reverse:  output → step\[-1].reverse → … → step\[0].reverse → input

***

#### process

```python theme={null}
def process(matrix: np.ndarray) -> np.ndarray
```

Applies all pipeline steps in sequence.

<ParamField body="matrix">
  Input array to transform.
</ParamField>

**Returns**:

Array after applying all steps.

***

#### reverse

```python theme={null}
def reverse(matrix: np.ndarray) -> np.ndarray
```

Applies all pipeline steps in reverse order.

<ParamField body="matrix">
  Transformed array to invert.
</ParamField>

**Returns**:

Array in the original space.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.