> ## 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.

# Uploading Sequencing Data

> The Cosmos-Hub supports importing raw FASTQ data for both amplicon and shotgun metagenomic workflows using multiple upload sources.

<Warning>
  **Samples are analyzed on a per-sample basis**, and uploading requires pre-purchased sample credits. Contact [info@cosmos-hub.com](mailto:info@cosmos-hub.com) for pricing.
</Warning>

# There are 4 upload methods to choose from:

<CardGroup cols="2">
  <Card title="Upload from your Computer" icon="upload" iconType="solid" horizontal>
    Upload local FASTQ, SRA, or BAM files via drag-and-drop.
  </Card>

  <Card title="Link a BaseSpace Account" icon="dna" iconType="solid" horizontal>
    Connect your Illumina BaseSpace account and import data directly.
  </Card>

  <Card title="Import from NCBI SRA" icon="database" iconType="solid" horizontal>
    Use public SRA accession numbers to fetch data.
  </Card>

  <Card title="Use the Command Line Interface" icon="rectangle-terminal" iconType="solid" horizontal="false" href="/docs/api-documentation">
    Use our CLI or API for large batch uploads and automation.

    (Click for API documentation)
  </Card>
</CardGroup>

***

# Select Your Data Type

<Tabs>
  <Tab title="Amplicon (16S / ITS)">
    Amplicon pipelines are used to identify bacterial or fungal communities based on specific genes. These workflows support both ****single-end and paired-end****  reads.

    <AccordionGroup>
      <Accordion title="Requirements" defaultOpen icon="check">
        * **Read type**: Paired-end or single-end
        * **Min samples**: 10 (for ASV/DADA2 workflows)
        * **File size**: ≤ 1 GB uncompressed (250 MB compressed)
        * **PHRED score** ≥ 20
        * **Formats**: `.fastq.gz`, `.fq.gz`, `.fasta.gz`, `.sra.gz`
        * **Paired-end naming**:
          * `SampleID_R1_001.fastq.gz`
          * `SampleID_R2_001.fastq.gz`
        * Reads must **overlap ≥ 15 bp**
        * **Watch the 16S Tutorial Video**

                  <iframe width="560" height="315" src="https://www.youtube.com/embed/QOpRLdqmEQc?si=bTu_L6hXY7n0pIDR&fs=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen />
      </Accordion>

      <Accordion title="Workflow Options" defaultOpen icon="hand">
        * **ASV 16S rRNA Profiling** (DADA2-based)
        * **OTU ITS rRNA Profiling** (QIIME2-based)
      </Accordion>

      <Accordion title="Common Pitfals" defaultOpen icon="stop">
        * Filenames with **spaces or special characters** will break pairing
        * Unpaired files will appear as "Single-read samples"
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="Shotgun Metagenomics">
    Shotgun workflows analyze entire microbial genomes and functional markers. These require **paired-end** reads and support large files.

    <AccordionGroup>
      <Accordion title="Requirements" defaultOpen icon="check">
        * **Read type**: Paired-end only
        * **File size**: ≤ 50 GB
        * **PHRED score** ≥ 20
        * **Formats**: `.fastq.gz`, `.bam`, `.fq.gz`, `.sra.gz`
        * **Naming**:
          * `SampleID_R1.fastq.gz`
          * `SampleID_R2.fastq.gz`
      </Accordion>

      <Accordion title="Host Removal" defaultOpen icon="person">
        * Select host genome (e.g., Human, Mouse, Pig)
        * If using **CHAMP**, select **"None"** — it performs built-in host filtering
      </Accordion>

      <Accordion title="Workflow Options" defaultOpen icon="hand">
        * **CHAMP**: Human-specific taxonomic & functional profiling
        * **Kepler**: Host-agnostic taxonomic profiling
        * **Host-Agnostic Functional Profiling**: MetaCyc, GO, EC, Pfam, CAZy
        * **AMR/Virulence Marker Detection** *(requires add-on module)*
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="SRA Upload">
    The [Sequence Read Archive (SRA)](https://www.ncbi.nlm.nih.gov/sra) is a publicly accessible database of raw sequencing data hosted NCBI. It contains high-throughput sequencing data from numerous research projects worldwide, covering a wide range of study types and organisms, including metagenomic and microbiome studies. Researchers deposit their sequencing reads in SRA to make data publicly available in accordance with scientific publication practices, fostering transparency and reproducibility in science. This is typically referenced in the paper with a [BioProject](https://www.ncbi.nlm.nih.gov/bioproject) number in the Data Availability section.

    <Check>
      **Why Import SRA Data for Microbiome Analysis?**

      **Access to Publicly Available Data**: Researchers can leverage publicly available SRA datasets to replicate studies, validate findings, or perform meta-analyses against their own data.

      **Cost Efficiency**: Using existing SRA datasets reduces the need for sequencing of new samples when performing secondary analyses or meta-analyses. By importing previously published data, users can rapidly evaluate different datasets or integrate multiple studies without the need to collect and sequence new samples.

      **Extended Contextual Analysis**: By analyzing previously published microbiome datasets from SRA, researchers can add context to their own data. This can provide valuable insights by comparing microbiomes across different populations, environments, diseases, or experimental conditions.

      **Data Reuse for Novel Insights**: Many research questions can be answered by revisiting older datasets with new hypotheses or more advanced analysis techniques. The Cosmos-Hub allows users to explore data from fresh perspectives using its comprehensive suite of microbiome analysis tools, potentially leading to novel discoveries.

      **Be sure to leverage the SRA Run Selector to export tables of SRA accession IDs as well as relevant metadata. Typically, original manuscripts need to be referenced for primer sequences.**
    </Check>
  </Tab>
</Tabs>

# Uploading Metadata

You can upload a metadata CSV during or after your data upload through the **Cohorts and Metadata** page.

<Frame>
  <img src="https://mintcdn.com/cmbio/1_URKzklO7hYjRsk/images/docs/1077f5109a9d2b2d1789ca39ed86bcbd69ed54faec05e643f9b64191db6ea1d3-Screenshot_2024-11-12_at_1.45.14_PM.png?fit=max&auto=format&n=1_URKzklO7hYjRsk&q=85&s=51c7b59e82eeb5c397b2d34c6803eeae" alt="Metadata Upload" width="2494" height="698" data-path="images/docs/1077f5109a9d2b2d1789ca39ed86bcbd69ed54faec05e643f9b64191db6ea1d3-Screenshot_2024-11-12_at_1.45.14_PM.png" />
</Frame>

***

# Workflow Selection

After upload, choose a workflow that matches your data type. The Cosmos-Hub will only show valid options based on your selections.

<Frame>
  <img src="https://mintcdn.com/cmbio/1_URKzklO7hYjRsk/images/docs/22e86b0b3d6b61d7324c7829568d7fef720b06198f91eb01e7795438fcee0934-Screenshot_2024-11-12_at_1.49.54_PM.png?fit=max&auto=format&n=1_URKzklO7hYjRsk&q=85&s=96c7a1aeeff0e05aefd6b52ab53de497" alt="Workflow Selection" width="2416" height="1116" data-path="images/docs/22e86b0b3d6b61d7324c7829568d7fef720b06198f91eb01e7795438fcee0934-Screenshot_2024-11-12_at_1.49.54_PM.png" />
</Frame>

***

<Warning>
  **Do not close your browser while uploading.** Progress is shown in the bottom-right. Allow up to 24 hours for processing. Results and statuses will appear in the **Cohorts and Metadata** section.
</Warning>

<Warning>
  Occasionally a sample will fail to upload. Here are a number of possible causes:

  * Poor internet connection
  * Internet connection interruption
  * Browser closed while uploading
  * Incorrect primer pairs
  * Corrupted or low quality data files
</Warning>

Other notes:

* If a sample fails to upload, you can retry it
* If a sample is not in the proper format or fails to run for another reason, the status will show “failed” and you will not be charged credits.
* If you have problems uploading or with a failed sample, [please submit a help ticket](www.cosmos-hub.com/support) or email us at [help@cosmos-hub.com](mailto:help@cosmos-hub.com).
