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

# CSV Parameter Import

> Every workflow in Latch allows you to import a CSV containing values for its parameters. This is another way to import data when doing bulk runs of a workflow.

<Info>
  The goal of this feature is intended to streamline bringing in your experiment
  data when running workflows into Latch and we would love to hear from you on
  ways this could be improved. And to be completely honest the best way to use
  the CSV import is to write a script that will automatically generate a CSV
  based on your data.
</Info>

## Preparing Your CSV

* Each row of the CVS will be imported as one run of the workflow and each column for that row will be imported to its corresponding parameter.

<img src="https://mintcdn.com/latchbio/rSliEwubl8sq_Ts8/images/frame5.png?fit=max&auto=format&n=rSliEwubl8sq_Ts8&q=85&s=87c6c8a42b55fcef16b55aa7b1568a19" alt="" width="922" height="252" data-path="images/frame5.png" />

* Each parameter has a column name that the importer can use automatically map them (we don't expose these anywhere yet but we're working on it), but CSV columns can also be mapped manually to a parameter.
* Each parameter has specific formatting requirements to be properly imported. (I'm gonna work on the documentation for all of the formatting standards because this can be a pain to get right.)
* If you're exporting it from a spreadsheet application you're using here are some guides:
  * [Excel](https://support.microsoft.com/en-us/office/import-or-export-text-txt-or-csv-files-5250ac4c-663c-47ce-937b-339e391393ba)
  * [Numbers](https://support.apple.com/guide/numbers/export-to-excel-or-another-file-format-tan3b922d4ad/mac)
  * [Google Sheets](https://support.airtable.com/hc/en-us/articles/203423579-How-to-export-a-spreadsheet-from-another-source)

### Adding File Paths to your CSV

If one of the columns in your CSV requires a file path, you have to ensure that the file path matches that on Latch.

<Steps>
  <Step title="To do so, click on the file you are interested in.">
    <img src="https://mintcdn.com/latchbio/MyGUG0Q2iaPqX-v6/images/registry/select-file-csv.png?fit=max&auto=format&n=MyGUG0Q2iaPqX-v6&q=85&s=2151931f0eb2d033822991948a39f05c" className="h-40 border-slate-100 border rounded-md" width="1728" height="1080" data-path="images/registry/select-file-csv.png" />
  </Step>

  <Step title="On the right sidebar, select “Copy” to copy the file path of your file.">
    <img src="https://mintcdn.com/latchbio/MyGUG0Q2iaPqX-v6/images/registry/copy-path-csv.png?fit=max&auto=format&n=MyGUG0Q2iaPqX-v6&q=85&s=aac1be2d0693dc3ab5cb61c812a3ce5d" className="h-40 border-slate-100 border rounded-md" width="1728" height="1080" data-path="images/registry/copy-path-csv.png" />
  </Step>

  <Step title="Paste the file path into the CSV." />
</Steps>

## Using CSV Import

CSV Import is not available for Bulk RNAseq, which instead has the option of using Salmon’s selective alignment method and sample conditions for differential expression analysis.

<Steps>
  <Step title="Click the 'Import Bulk Data' button at the top right of the workflow parameters section.">
    Some Workflows also have a CSV template you can use to import your data.

    <img src="https://mintcdn.com/latchbio/MyGUG0Q2iaPqX-v6/images/registry/import-csv.png?fit=max&auto=format&n=MyGUG0Q2iaPqX-v6&q=85&s=ba8a1ddd2bcb2f99898f367cac763783" className="h-40 border-slate-100 border rounded-md" width="1728" height="1080" data-path="images/registry/import-csv.png" />
  </Step>

  <Step title="Select your CSV from your data on Latch.">
    <img src="https://mintcdn.com/latchbio/MyGUG0Q2iaPqX-v6/images/registry/select-csv.png?fit=max&auto=format&n=MyGUG0Q2iaPqX-v6&q=85&s=16caa89a634cdbec9c8e8495fa81bdd6" className="h-40 border-slate-100 border rounded-md" width="1409" height="750" data-path="images/registry/select-csv.png" />

    or select from your computer

    <img src="https://mintcdn.com/latchbio/MyGUG0Q2iaPqX-v6/images/registry/drag-csv.png?fit=max&auto=format&n=MyGUG0Q2iaPqX-v6&q=85&s=632313b395e3a9942022441dcf56f14d" className="h-40 border-slate-100 border rounded-md" width="1409" height="750" data-path="images/registry/drag-csv.png" />
  </Step>

  <Step title="The importer will then automatically try to match the columns in your CSV to its corresponding parameter. ">
    When a column is matched to a parameter it will either show:

    1. A green check mark which means all of values in that column have passed the validation and are formatted correctly for that parameter.

    <img src="https://mintcdn.com/latchbio/MyGUG0Q2iaPqX-v6/images/registry/csv-format-correctly.png?fit=max&auto=format&n=MyGUG0Q2iaPqX-v6&q=85&s=dc009b2b40d2e44e3dc16143746ec9df" className="h-40 border-slate-100 border rounded-md" width="1728" height="1080" data-path="images/registry/csv-format-correctly.png" />

    — or —

    2. A red warning triangle which means that some of the data in the matched column is formatted incorrectly for that parameter.

    <img src="https://mintcdn.com/latchbio/MyGUG0Q2iaPqX-v6/images/red-warning.png?fit=max&auto=format&n=MyGUG0Q2iaPqX-v6&q=85&s=75342b6a6226c8ea089f81754c8a2f0f" className="h-40 border-slate-100 border rounded-md" width="904" height="88" data-path="images/red-warning.png" />

    Any errors can be fixed in the next step.

    If the importer is unable to automatically match a column it won't display any icon. You can manually map it to a parameter by clicking the input and selecting its corresponding parameter.

    <img src="https://mintcdn.com/latchbio/OY3WpKhZ3Sm_DsN1/images/importer.gif?s=c78f8e332abdd99b8f5738e07271bca5" className="h-40 border-slate-100 border rounded-md" width="600" height="155" data-path="images/importer.gif" />
  </Step>

  <Step title="You will then be able to review and edit all of the data before importing.">
    Any cells with errors will be marked with a red warning triangle which you can hover over to view details on the formatting error. You click into the cell to edit and fix any errors before importing.

    <img src="https://mintcdn.com/latchbio/rBOhi8AJn1gA0vrv/images/cells.gif?s=25bc4a13ffce483e8a8c94efc5a4a4fe" className="h-40 border-slate-100 border rounded-md" width="600" height="241" data-path="images/cells.gif" />
  </Step>
</Steps>
