Preparing your files
Uploading your data is possible in a number of ways. In this article, we lay out some of the major options available to you for uploading or importing data.
For all upload options, we can accept either .fasta or .fastq files, and they can be optionally gzipped (e.g. .fastq.gz).
Illumina data
By default, if your reads are paired end (R1 and R2 files), we will automatically detect this and combine the paired files into one sample. Note that file names must end with either _R1 and _R2, or _1 and _2, followed immediately by the file extension (such as .fastq.gz), and must have the same beginning, for us to be able to detect that these are paired files.
You also have the option to combine files from multiple lanes of an Illumina sequencing run. E.g. if your Illumina file names contain _L001_R1.fastq.gz and _L002_R1.fastq.gz (plus optionally the _R2 versions, or higher _L00# lanes), this is a sample that was sequenced across multiple lanes, which will likely need to be combined. Note, this option is not on by default.
See the Web Browser section for more details on how to enable or disable these options.
Oxford Nanopore data
Similar to the Illumina files, if your reads are stored in multiple files (such as Oxford Nanopore Technology sequencing), where the filenames end with _0, _1, ... _n followed by the file extension, we will detect the _0 to _n in the file names and combine the data.
Upload options
Web Browser
The easiest way to upload your FASTQ/A files is going to the Upload Page, and drag&drop your files into the upload box provided! You can upload multiple samples at the same time. We will detect differences in file names to identify different samples.
On the upload page, at the top-right of the box to upload your samples into, you will find a settings wheel. This contains the options for combining multiple Illumina or ONT files into one sample.
While this is generally the easiest option to upload samples, some user's browsers can be slow or timeout, particularly with larger samples (e.g. >5Gb). In these cases, you may find programmatic upload to be more stable.
Programmatic Uploads
To complement the web interface, we also provide a command line interface (CLI) and Python client library for uploading files to One Codex. These tools enable programmatic, including fully automated, uploads to One Codex.
The CLI also supports several additional features:
Support for uploads >5GB
Automatically combines and interleaves paired-end files into a single sample
Saving and reloading API keys / login credentials
Installing the command-line tool
The command line interface is written in Python and accompanies our client library. It should be easily installable on most machines with the following command:
pip install onecodex # Note, Windows users may need to do `py -m pip install onecodex`
Uploading files via Command Line
If you haven't previously logged in, the following command will prompt you for your username and password and then save a ~/.onecodex file with your API key.
onecodex login
Note: You may be required to provide your API key to log in. If so, you will find your API key on your settings page. (Click your name at the top-right of the web interface to find the settings page).
In such cases, you will instead need to login with:
onecodex --api-key [your api key] login
The following command will automatically upload one or more FASTQs into your account, prompting you to interleave any paired-end data if applicable (which we recommend).
onecodex upload Sample1_R1_L001.fastq.gz Sample1_R2_L001.fastq.gz ...
More documentation for the CLI can be found here.
Importing data from BaseSpace
We've made it easy to upload data directly from your BaseSpace account to your One Codex account! Go to the Upload Page (click on Upload / Import from the left-hand navigation bar), and select the option for "Import from: BaseSpace".
You will first need to link your BaseSpace account to your One Codex account. Clicking the "Authorize" button will bring you to the BaseSpace login page. Login and follow the instructions to authorize the connection between BaseSpace and One Codex. You will only need to do this for the initial connection.
Once you log in with your BaseSpace credentials, you will see a list of your BaseSpace projects, and can expand to view the samples within each. We support both Samples and BioSamples, and allow you to toggle between the two, using the dropdown menu at the top-right of the table. Select the samples you wish to import (or "Select all" for a given BaseSpace project). Choose an optional One Codex project you wish to import the samples too, and click "Import".
Finally if you need to disconnect your BaseSpace account at any time, there is a button at the bottom-left of the page to do so.
Import from the SRA
Some users may wish to compare their own data with samples that are publicly available on the Sequence Read Archive (SRA), or perhaps re-analyze SRA samples using the One Codex pipeline. We've made it easier to import samples from the SRA into your account directly. You'll find this option on the Upload page.
Once you select to "Import from: SRA", you'll see the below screen. You can enter one or more accessions (comma-separated) to import at a given time. The accessions that are currently accepted will be shown below the text box.
It's not just individual samples or SRA runs that you can import. We even have an option to import an entire SRA Project. Once you enter a PRJNA accession, we will determine the number of SRA "Runs" to import as samples in the platform, so that you can confirm the project (before incurring charges).
We'll draw on the metadata on these projects and samples, both to create a corresponding project in your account, and to apply as metadata to each sample, so that you can more easily compare your samples.
Trying to import a project from which some samples were already imported, will not duplicate samples. It will only supplement the project with the missing samples.
Reach out to our team if you have any issues uploading data.





