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

# The Analysis Studio

## What is the Analysis Studio?

The **Analysis Studio** is the Cosmos-Hub 2.0 suite of **Analysis Modules**, designed to help you explore and analyse the Cohort defined in an Analysis Project. It brings together a broad range of popular microbiome bioinformatics analyses as nine different Analysis Modules, including exploratory visualisations, alpha- and beta-diversity analysis, differential abundance testing, machine learning, and much more.

Each Analysis module can be fine tuned interactively, to produce publication-ready figures and statistical testing using dedicated parameters interactively and see results update as parameters change.

## Accessing the Analysis Studio

1. To access the Analysis Studio, navigate the 'Analysis Projects' section of the Study Dashboard and enter an Analysis Project by clicking on the 'Open' of the corresponding card. This will open the **Analysis Project Dashboard,** listing all instances (Analysis Snapshots) of the Analysis Studio currently available for Analysis Project. Visit [**Analysis Snapshots**](untitled-page-8) for more details on what Analysis Snapshots are and how to use them.

<img src="https://mintcdn.com/cmbio/IvW3mcdgB0VWEfpX/images/inside_study-1.jpeg?fit=max&auto=format&n=IvW3mcdgB0VWEfpX&q=85&s=c2f6f63a6c7ff8ba69ccc58a486bcba4" alt="Inside Study 1" width="2956" height="1056" data-path="images/inside_study-1.jpeg" />

1. Click on '**Open Current Analysis'** to enter the Analysis Studio for the current Analysis Project<br />

## A tour of the Analysis Studio

<img src="https://mintcdn.com/cmbio/9IPlECfVJPWdo6z4/images/Analysis_studio_interface.jpg?fit=max&auto=format&n=9IPlECfVJPWdo6z4&q=85&s=536a98ba8b1ef829bae28ab0dd451116" alt="Analysis Studio Interface" width="3566" height="1702" data-path="images/Analysis_studio_interface.jpg" />

1. **The Analysis Modules panel:**  Choose an Analysis Module among those available to load the Analysis Module Parameter Panel. <br /><br />Cosmos-Hub 2.0 includes nine analysis modules, each exploring your data in a different way. Select the one that fits your research question from the Module panel; each module's overview is linked below.
2. **The Analysis Module Parameter Panel**: the panel the parameters Each Analysis Module is customisable, and require to set Pre-processing and Analysis parameters.
3. **Analysis Output Viewer:** an embedded viewer (iFrame) that inetractively renders the figures, statistics, and tables the module produces for the set of parameters chose.
4. **Analysis Snapshots and Export control:** allows to download the current Analysis Studio output, save the current instance of the Analysis Studio, and control Analysis Snapshots.

## Running Analysis Modules

<Steps>
  <Step title="Select a module from the Analysis Modules Panel">
    <Note>
      If you any module is not available for your Analysis Project, you might not have selected it during Cohort and Analysis Project creation. Visit [Create a Cohort with Query Builder](untitled-page-5) to learn more.
    </Note>

    Choose a module from the module panel. You can learn more about each Analysis Module, read the module overviews available for each Analysis Module currently implemented on Cosmos-Hub 2.0.

    <CardGroup cols={3}>
      <Card title="Stacked Bar Chart" icon="chart-bar" horizontal href="/DAP_docs/stacked-bar-chart-overview" />

      <Card title="Heatmap" icon="table-cells" horizontal href="/DAP_docs/heatmap-overview" />

      <Card title="PCA Explorer" icon="braille" horizontal href="/DAP_docs/pca-explorer-overview" />

      <Card title="Rarefaction" icon="chart-line" horizontal href="/DAP_docs/rarefaction-analysis-overview" />

      <Card title="Alpha Diversity" icon="chart-simple" horizontal href="/DAP_docs/alpha-diversity-overview" />

      <Card title="Beta Diversity" icon="circle-nodes" horizontal href="/DAP_docs/beta-diversity-overview" />

      <Card title="Univariate Comparison" icon="chart-column" horizontal href="/DAP_docs/univariate-comparison-overview" />

      <Card title="ML Classification" icon="sitemap" horizontal href="/DAP_docs/ml-classification-overview" />

      <Card title="ML Regression" icon="chart-scatter" horizontal href="/DAP_docs/ml-regression-overview" />
    </CardGroup>
  </Step>

  <Step title="Adjust Pre-processing and Module parameters">
    Each Analysis module requires to set the parameters for the module. The Analysis Module Parameter Panel is divided into two sections:

    * **PREPROC**: this section includes parameters controlling data table pre-processing, i.e filtering samples or features from the data table before downstream analyis. Depending on the type of data currently available for the AP cohort, available parameter options might change. Learn more about Data table Pre-processing at [Pre-processing Overview](DAP_docs/preprocessing-overview).
    * **Analysis**: this section includes all Analysis Module-specific parameters. Analysis parameters  control how that particular analysis is run and displayed. To learn more on how to tune Analysis Modules and how to read their outputs, visit the guides available in the documentation (e.g: [Heatmap on Cosmos-Hub 2.0](DAP_docs/heatmaps-on-the-dap))

    <Frame>
      <img src="https://mintcdn.com/cmbio/7p4rs956XoZLGpew/images/image-7.png?fit=max&auto=format&n=7p4rs956XoZLGpew&q=85&s=7e13dc888add110c122c16b971107d17" alt="Image" width="412" height="594" data-path="images/image-7.png" />
    </Frame>
  </Step>

  <Step title="Run the Analysis Module">
    <Frame>
      <img src="https://mintcdn.com/cmbio/7p4rs956XoZLGpew/images/image-8.png?fit=max&auto=format&n=7p4rs956XoZLGpew&q=85&s=6c23d04eb2b134edb3e3652a84911892" alt="Image" width="373" height="85" data-path="images/image-8.png" />
    </Frame>

    Click '**Run and Apply**' button to start the Analysis Module using the current set of parameters.  

    Use the **Reset** button to return all parameters to their default values.

    <Tip>
      You can re-run a module as many times as you like. Changing parameters and clicking **Run and Apply** will recomputes the output.
    </Tip>
  </Step>

  <Step title="Read the Analysis Module output">
    Once the Analysis module finishes running, figures and tables will appear on the **Analysis Output Viewer.**
  </Step>
</Steps>

## Download the output of an Analysis Module

Click the **Export** button in the **Analysis Snapshots and Export control menu** to download all the figures and table generated by the current Analysis Module:

* Figures
* Statistical tables
* A record of the analysis parameter used
* The raw and pre-processed input data table
* The raw and pre-processed metadata

<Warning>
  Sometimes, when switching between modules, the output view or the parameter panel fails to load, and the center of the screen keeps showing a spinning 'Loading module...' circle. Reloading the output view fixes this; your parameters and saved snapshots are not affected.

  1. On the bottom-right of the Analysis Module interface, open the **Current Configuration** dropdown.
       <Frame>
         <img src="https://mintcdn.com/cmbio/7p4rs956XoZLGpew/images/image-12.png?fit=max&auto=format&n=7p4rs956XoZLGpew&q=85&s=ebbd26b4f41c561689d70934c77b9605" alt="Image" width="382" height="63" data-path="images/image-12.png" />
       </Frame>
  2. It shows information about the selected module, with a grey box listing the current parameters in JSON format. While the output view is stuck on 'Loading module...', this box is empty.
  3. Click **Reload iFrame** to refresh the output view and the parameter panel.
       <Frame>
         <img src="https://mintcdn.com/cmbio/7p4rs956XoZLGpew/images/image-13.png?fit=max&auto=format&n=7p4rs956XoZLGpew&q=85&s=ca7d82939c52d3ce14cdaf966d814176" alt="Image" width="141" height="42" data-path="images/image-13.png" />
       </Frame>

  If it still doesn't work, refresh the browser page and repeat these steps.
</Warning>

## Saving a Snapshot of your Analysis

**Analysis Modules** can include several parameters, which can make it difficult to reproduce a specific output from memory alone. In **Cosmos-Hub 2.0**, you can save an **Analysis Snapshot** of the current Analysis Studio state, preserving the configuration that generated a given figure.

Anyone with access to the current workspace can open the snapshot, review the same output and parameter settings, and continue the analysis from that point by adjusting the configuration further.

To save a Snapshot of your Analysis:

1. Click on the 'Save' button, in the **Analysis Snapshots and Export control menu.**
2. Choose a name and a description (optional) for the Analysis Snapshot

<img src="https://mintcdn.com/cmbio/rXnT_KRi2R3YfV3p/images/save_snapshot.jpg?fit=max&auto=format&n=rXnT_KRi2R3YfV3p&q=85&s=6e7a068fb06f8746119b748f237b3aba" alt="Save Snapshot" width="970" height="852" data-path="images/save_snapshot.jpg" />

To learn more about Snapshots and how to navigate them, visit [Analysis Snapshots](untitled-page-8).

## Next steps

<CardGroup cols={2}>
  <Card title="Analysis Snapshots" icon="camera" href="/overview" />
</CardGroup>
