# samples list

## samples list

### Synopsis

```shell
omics workbench samples list
  [--max-results]
  [--page]
  [--page-size]
  [--storage-id]
  [--platform-type]
  [--instrument-id]
  [--workflow]
  [--workflow-version]
  [--state,[--state]]
  [--family-id,[--family-id]]
  [--sample,[--sample]]
  [--sex,[--sex]]
  [--perspective]
  [--search]
  [--created-since]
  [--created-until]
  [--analyzed]
  [--not-analyzed]
```

### Description

List all samples that are indexed from platforms with comprehensive filtering and pagination options.

### Examples

List all samples

```shell
omics workbench samples list
```

List max 10 samples from a specific platform type and storage account.

```shell
omics workbench samples list
  --max-results 10
  --platform-type pacbio
  --storage-id my-aws-account
```

List samples that have been analyzed (processed by workflows)

```shell
omics workbench samples list --analyzed
```

List samples from specific families with male sex

```shell
omics workbench samples list
  --family-id family-001
  --family-id family-002
  --sex MALE
```

List samples created within a specific time range that have been processed by a workflow

```shell
omics workbench samples list
  --workflow workflow-123
  --state COMPLETE
  --created-since 2023-01-01
  --created-until 2023-12-31
```

Search for samples by ID pattern

```shell
omics workbench samples list --search "HG00"
```

List samples from workflow perspective (shows all samples with analysis status for a workflow)

```shell
omics workbench samples list
  --perspective workflow
  --workflow workflow-123
```

## Flags:

### `--max-results`=`NUMBER`

Limit the maximum number of results printed to the console.

### `--page`=`NUMBER`

Used to set the offset page number. This allows for jumping into an arbitrary page of results.

### `--page-size`=`NUMBER`

Used to set the number of results returned per page (default 100). Reducing the page size can help with poor internet connections.

### `--storage-id`=`STORAGE_ID`

Returns samples associated with the specified storage account ID.

### `--platform-type`=`PLATFORM_TYPE`

Returns samples associated with the specified platform type (e.g., `pacbio`, `custom`).

### `--instrument-id`=`INSTRUMENT_ID`

Returns samples associated with the specified instrument ID.

### `--workflow`=`WORKFLOW_ID`

Returns samples that were processed by the specified workflow. If the workflow version is not specified, returns all workflow versions. When `--perspective` is set to `workflow`, this flag is required.

### `--workflow-version`=`WORKFLOW_VERSION_ID`

Returns samples that were processed by the specified workflow version. If the workflow is not specified, returns all workflows.

### `--state`=`STATE`

Returns samples with workflows in the specified states. This flag can be used multiple times to filter by multiple states.

Valid States: `QUEUED`, `INITIALIZING`, `RUNNING`, `COMPLETE`, `EXECUTOR_ERROR`, `SYSTEM_ERROR`, `CANCELED`, `NOT_PROCESSED`

### `--family-id`=`FAMILY_ID`

Returns samples that are part of the specified families. This flag can be used multiple times.

### `--sample`=`SAMPLE_ID`

Returns samples with the specified ID. This flag can be used multiple times to filter by multiple sample IDs.

### `--sex`=`SEX`

Returns samples with the specified sex. This flag can be used multiple times.

Valid Values: `MALE`, `FEMALE`, `UNKNOWN_SEX`, `OTHER_SEX`

### `--perspective`=`PERSPECTIVE_TYPE`

Returns samples from the specified perspective. If not specified, returns samples from the default perspective. If perspective is set to `workflow`, then the `--workflow` flag is required. When the perspective is set to `workflow`, all samples are returned with a flag indicating whether they were processed by the specified workflow or not.

Valid Values: `DEFAULT`, `WORKFLOW`

### `--search`=`TEXT`

Searches samples by the specified search term. The search term is matched against sample ID in a case-insensitive way.

### `--created-since`=`DATE|DATETIME`

Returns samples created after the specified date. The timestamp can be in ISO date format (`YYYY-MM-DD`) or datetime format (`YYYY-MM-DDTHH:MM:SS.sssZ`).

Examples: `2022-11-23`, `2022-11-23T23:59:59.999Z`

### `--created-until`=`DATE|DATETIME`

Returns samples created before the specified date. The timestamp can be in ISO date format (`YYYY-MM-DD`) or datetime format (`YYYY-MM-DDTHH:MM:SS.sssZ`).

Examples: `2022-11-23`, `2022-11-23T23:59:59.999Z`

### `--analyzed`

Returns samples that have been analyzed (have associated workflow runs). This is a convenience flag that filters for samples with states: `QUEUED`, `INITIALIZING`, `RUNNING`, `COMPLETE`.

### `--not-analyzed`

Returns samples that have not been analyzed (no associated workflow runs). This is a convenience flag that filters for samples with state: `NOT_PROCESSED`.


---

# 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://docs.omics.ai/products/command-line-interface/reference/workbench/samples-list.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.
