> For the complete documentation index, see [llms.txt](https://docs.labatlas.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.labatlas.com/managing-your-organization/assay-types.md).

# Assay Types

Customizing assay workflows with Assay Types

## Overview

Assays in Lab Atlas are the smallest unit of work, typically repeatable work done in a wet lab or a data science environment. **Assay types** tell assays apart by the kind of work being done, and act as templates for it. An assay type can define:

* **Assay fields**: details recorded on every assay of that type, filled in by whoever creates the assay. For example, the antibody used or the plate layout.
* **Default tasks**: a ready-made task list copied into each new assay of that type, so a standard protocol is followed and recorded the same way every time. Default tasks can have [Results fields](https://docs.labatlas.com/using-lab-atlas/tasks.md#tasks-that-capture-data) that the assignee fills in when the task is done.

Every assay needs an assay type before it can start. Each organization comes with a built-in **Generic** type, which has no assay fields or default tasks, to use when nothing more specific fits.

## Finding assay types

Every member can browse the organization's assay types from **Assays → Assay types** in the sidebar. Click a type to see its details on the **Overview** tab, and the assays that use it on the **Assays** tab.

To change a type, open it and click **Edit**. Super Users and above can also manage assay types from **Settings → Organization → Assay types**, where each type's menu has **Edit**. Organization Admins also see **Delete** and **Deactivate** there (or **Reactivate** for an inactive type). An inactive type isn't offered on the assay form, but assays that already use it are unaffected.

## Adding new Assay Types

Click **New Assay Type** on the **Assay types** page, or **Add Assay Type** in Settings. The form has four sections. On wide screens, a **Preview** beside the form shows the New Assay form as it will look with your fields, and the tasks new assays will start with.

<figure><img src="https://content.gitbook.com/content/glJC7nRAfEL7RcemHr0z/blobs/XZrl3Jn9Ri73wO8YRrJT/image.png" alt=""><figcaption><p>Assay type details</p></figcaption></figure>

### 1. Details

* **Name**: Up to 64 characters. It must be unique in your organization.
* **Description**: Say what the assay type is for and when to choose it.

### 2. Assay fields

Assay fields are filled in by whoever creates the assay. To add one, click **Add Assay Field** and pick a type:

| Type          | Use it for                      |
| ------------- | ------------------------------- |
| **Text**      | Short free text                 |
| **Paragraph** | Long-form notes or observations |
| **Integer**   | Whole numbers, such as counts   |
| **Decimal**   | Measured values with decimals   |
| **Yes / No**  | A single yes-or-no answer       |
| **Choice**    | Picking from a set list         |
| **Date**      | A calendar date                 |
| **File**      | An uploaded attachment          |

Then give the field a name. Each field row has:

* A **Required** switch. A required field must be filled in before an assay of this type can start.
* **Show details**, which opens:
  * **Helper text**, shown under the field on the New Assay form.
  * **Default value**, used to pre-fill the field. File fields have no default.
  * For a **Choice** field, its options. Use **Add option** to add more.
* **Stored as**: the key the field's value is saved under, for example in the REST API. It's set from the name, and can't be changed once the field is saved.

Drag a row to change the order the fields appear in on the assay form. You can also use **Alt** with the up and down arrow keys. Use the row's **⋮** menu to **Duplicate** or remove a field.

### 3. Default tasks

Default tasks are copied into each new assay of this type. To add one, type what needs to be done and press **Enter**. Expand a task to add a description and **Results fields**, which the assignee fills in when the task is done. Results fields use the same eight types as assay fields.

Default tasks don't have an assignee or due date. Those are set on each assay.

### 4. Attributes

Attributes are name–value tags that describe the assay type itself, such as the instrument it uses or its SOP.

### Saving

Click **Create assay type** to save. If anything is missing or invalid, a summary at the bottom of the form lists each problem. Click an item to jump to the field that needs fixing.

## Rules for fields

* A **Choice** field needs at least two different options. Its default value, if it has one, must be one of those options.
* Two fields can't have the same name. A new field also can't reuse the name of a field that was removed earlier.
* Once a field is saved, its type can't be changed, because existing assays already hold values of that type. To change it, add a new field and remove the old one.

## Editing an assay type

Open the type from the **Assay types** page and click **Edit**, or choose **Edit** from its menu in **Settings → Organization → Assay types**. The form shows a reminder that changes may affect existing assays:

* Changes to **assay fields** also apply to assays that already use the type.
* **Default tasks** are copied when an assay is created, so task changes only affect new assays.

Removing something doesn't happen straight away. A removed field or task is marked *Removed when you save*, with an **Undo** button. When you save:

* **A removed assay field** stops appearing on new and edited assays. Existing assays keep any values recorded for it.
* **A removed default task** is deleted from the type. New assays won't get it, but assays already created keep their copy, including anything recorded on it.
* **A field that becomes required** applies to existing assays too. The form warns you: *Now required. Existing assays without a value will be asked for one the next time someone edits them.*

Beside the form, a **When you save** list sums up each of these changes and says whether it affects existing assays or new assays only. Renaming the type doesn't change existing assays' codes or folders. Click **Save assay type** to save your changes.

## For administrators

* **Who can do what.** Every member except External Users can create and edit assay types. Only Organization Admins can deactivate, reactivate, or delete them. The same rules apply through the [REST API](https://docs.labatlas.com/developer-tools/rest-api-reference.md).
* **Deleting a type.** Assays that already use a deleted type keep it, but no new assays can be created with it. Deleting can't be undone, so consider deactivating the type instead.
* **Imported types.** When you [import data from Study Tracker](https://docs.labatlas.com/managing-your-organization/importing-data-from-study-tracker.md), a Choice field with fewer than two options is imported as a removed field, so it can't block edits to the assays that use it. A default value that isn't one of the field's options is dropped.
