# Phase 2: Define responders

Classify participants into immune response groups using unsupervised clustering (Example 1) or predefined biological thresholds (Example 2). The resulting responder labels will guide further analysis and visualization of immune response patterns.

This phase presents two distinct methods to create the `ResponderStatus` column. Choose one path, or potentially run both for comparison.

<details>

<summary>Example 1: <strong>Multivariate Clustering (Using integrated</strong> <a href="https://github.com/atomiclaboratory/immunaut">immunaut </a>package<strong>)</strong></summary>

1. Navigate to **Discovery** -> **t-SNE Analysis**

<figure><img src="https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2F3EQtM3va3qlDgmIZDZkP%2FFF_Phase%202_tSNE%20Anlaysis_annotated.png?alt=media&#x26;token=e5a9deec-5134-466b-bf93-1532d642376d" alt=""><figcaption></figcaption></figure>

2. Expand **Column Selection**

   * Select all `*fold_change` variables

   ![](https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2FHrXM64kkxbgan7Gmqkt3%2FFF_Phase%202_tSNE%20Anlaysis_Column%20Selection_annotated.png?alt=media\&token=121e1a34-d0e2-49cc-b02e-b0fd78e69cf0)
3. Expand **Cluster Settings**

   * Set **Target Clusters Range** to between 2 and 4

   ![](https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2FtqPPQYGuTctsQdnqupln%2FFF_Phase%202_tSNE%20Anlaysis_Cluster%20Range_annotated.png?alt=media\&token=2ee8cb05-a85b-480a-a667-5f3c21cf9f85)

{% hint style="info" %}

### Experimental Options

Feel free to experiment and observe the effects of other t-SNE side panel settings, such as:

* Section **Column Selection**
  * `Grouping Variable`,  `Color Variable`
* Section **Clustering Settings**
  * `Clustering Algorithm`, `K`, `Pick 'Best Cluster' Method`
* Section **t-SNE Settings**
  * `Perplexity`, `Exaggeration Factor`, `Theta`, `Maximum Iterations,` `Learning Rate (Eta)`
* Section **Dataset Settings**
  * `Dataset analysis type`
* Section **Theme Setting**
  * `Theme`, `Color`, `Legend position`, `Font size`, `Point size`, `Ratio`, `Plot size`
    {% endhint %}

4. Click the **Plot Image** Button
5. Navigate to **Clustered t-SNE analysis** to visualize clusters

<figure><img src="https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2FSEll71cFkj5JZ0l5r4e3%2FFF_Phase%202_tSNE%20Anlaysis_View%20Clusters_annotated.png?alt=media&#x26;token=93e81c65-b080-429a-80ab-f471e0de0c35" alt=""><figcaption></figcaption></figure>

6. Navigate to **Dataset Analysis**
   * Based on the heatmap, note the distinguishing features between clusters
   * In this case:
     * **Cluster 1:** Upregulated cellular response and IVPM binding
     * **Cluster 2:** Upregulated antibody response

<figure><img src="https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2FkaWapWigvRBVUgrBoyZO%2FFF_Phase%202_tSNE%20Anlaysis_Dataset%20Analysis_annotated.png?alt=media&#x26;token=df7017b6-7e5f-4c8e-9559-3d3d00af4fde" alt=""><figcaption></figcaption></figure>

7. Click **Actions** -> **Save to workspace**
   * Enter a desired file name for the new dataset and click ok
   * This saves a new dataset to your dashboard with an added column **pandora\_clusters -** you can now continue using this newly created dataset.

<figure><img src="https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2FvtR7K13CaenqiCe3yvzj%2FFF_Phase%202_tSNE%20Anlaysis_Save%20Clustered%20Dataset_annotated.png?alt=media&#x26;token=dbb6c478-9694-4de1-a429-f9159125580c" alt=""><figcaption></figcaption></figure>

</details>

<details>

<summary>Example 2: <strong>Manual Definition Based on Biological Thresholds (Requires manual pre-processing)</strong></summary>

#### Define Responder Status Rule

1. Define "High Responders" as anyone with `h1_hai_gmt_fold_change` >= 4 **OR** `h3_hai_gmt_fold_change` >= 4
   1. This rule is based on a commonly accepted threshold in immunology for high responders, based on an antibody titer increase of fourfold or more[<sup>1</sup>](https://www.cdc.gov/mmwr/preview/mmwrhtml/rr6207a1.htm).

#### Implement the Rule

1. Use any tool like Python, R, Excel, etc on the dataset. For this example, Excel is used
2. Create a new column called `ResponderStatus`

<figure><img src="https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2FkdA9mr2ODLHHclVCcSnP%2FFF_Phase2_Dataset_Create%20ResponderStatus_annotated.png?alt=media&#x26;token=818513ef-6c9e-49bc-bd87-244b409bfc74" alt=""><figcaption><p>Create ReponderStatus column in FluFighters.csv dataset using Excel</p></figcaption></figure>

3. Search for variable `h1_hai_gmt_fold_change` in the Excel sheet

<figure><img src="https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2Fy9Z4bF6R39kEHpegwumS%2FFF_Phase2_Dataset_Search%20h1.png?alt=media&#x26;token=d888e3a9-b74f-4f9c-b42f-7b71c055a5a6" alt=""><figcaption><p>Search for h1_hai_gmt_fold_change in FluFighters.csv datset using Excel</p></figcaption></figure>

4. Filter by `h1_hai_gmt_fold_change` ≥ 4

<figure><img src="https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2FWimfquhgdEfM7lmjdywF%2FFF_Phase2_Dataset_Filter%20h1.png?alt=media&#x26;token=c9194fec-9579-4b94-8413-e7c3cad3a663" alt=""><figcaption><p>Filter by h1_hai_gmt_fold_change ≥ 4 in FluFighters.csv dataset using Excel</p></figcaption></figure>

5. Define high responders
   1. Set filtered rows under `ResponderStatus` to 1 to indicate high responders.

<figure><img src="https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2Fg4HleQA0jYhGq9j5M4P1%2FFF_Phase2_Dataset_Define%20High%20Responders%20h1_annotated.png?alt=media&#x26;token=1936ff10-6101-4eae-95f5-d71c2684880b" alt=""><figcaption><p>Set filtered rows under ResponderStatus to 1 in FluFighters.csv dataset using Excel</p></figcaption></figure>

6. Remove filter
7. Repeat steps 3 -6 for `h3_hai_gmt_fold_change`
8. Filter `ResponderStatus` column to view rows not equal to 1

<figure><img src="https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2FyC1bloQXfBwzPPnXMvpK%2FFF_Phase2_Dataset_Filter%20Low%20responders_annotated.png?alt=media&#x26;token=09de7ea7-b14f-4405-8c11-1f53d0938cd6" alt=""><figcaption><p>Filter by ResponderStatus does not equal 1 in FluFighters.csv dataset using Excel</p></figcaption></figure>

9. Define low responders
   1. Set the filtered row values for `ResponderStatus` to 0 to indicate low responders

<figure><img src="https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2F58zJVWB2kR6yZqi9iX2J%2FFF_Phase2_Dataset_Define%20Low%20Responders_annotated.png?alt=media&#x26;token=00d19cea-76f9-4d9e-b5a7-117dff426e18" alt=""><figcaption><p>Set filtered rows under ResponderStatus to 0 in FluFighters.csv dataset using Excel</p></figcaption></figure>

10. Save the .csv file under a new name

#### Verify Definition

1. Launch PANDORA
2. Upload your new .csv file with the added `ResponderStatus` column to the **Workspace**

<figure><img src="https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2FdLceijuUTuvNhDdG8rT4%2FFF_Phase%202_Workspace_Upload%20Manual%20Responders.png?alt=media&#x26;token=f2ae42f6-c3e2-4e46-9ee9-1de82dd985a4" alt=""><figcaption></figcaption></figure>

1. Select the file and navigate to[ **Discovery** -> **Data Overview**](https://app.gitbook.com/s/9LdC62ZpkxqvCBTPwVZU/data-analysis/discovery#overview)
2. Expand **Column Selection**
   1. Select the `ResponderStatus` column & another column of choice
   2. Click the **Plot Image** button

<figure><img src="https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2Fdt1MAko5kyLUJnvx4ZR9%2FFF_Phase%202_Data%20Overview_Manual%20Responder%20Column%20Select_cropped.png?alt=media&#x26;token=a64f94c6-9402-490b-b516-bb5c6cdfe136" alt="" width="375"><figcaption></figcaption></figure>

3. Check the distribution plot to see counts of "High Responder" vs "Low Responder"
   1. Here we see about an equal proportion of "High Responders" and "Low Responders," indicating suitability for use in further analysis.

<figure><img src="https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2FH9oFD7OHQylgCJ7HGL1l%2FFF_Phase2_Table%20Plot%20Manual%20Responders.png?alt=media&#x26;token=b10b396d-224b-44b4-8dbb-d22884bef4f3" alt="" width="375"><figcaption></figcaption></figure>

</details>

References

1. Centers for Disease Control and Prevention. 2013. Prevention and control of seasonal   &#x20;influenza with vaccines. Recommendations of the advisory committee on immunization practices - United States, 2013-2014. \[Published erratum appears in   &#x20;2013 MMWR Recomm. Rep. 62: 906.] MMWR Recomm. Rep. 62: 1–43.

You’ve now defined the responder variable, which classifies individuals based on immune response. This classification will guide the predictive models developed later.
