Skip to main content
Version: 24.2

Datasets

API: Dataset upload failure

When uploading datasets via the Seqera UI or CLI, some steps are automatically done on your behalf. To upload datasets via the Seqera API, additional steps are required:

  1. Explicitly define the MIME type of the file being uploaded.
  2. Make two calls to the API:
    1. Create a dataset object.
    2. Upload the samplesheet to the dataset object.

Example:

Step 1: Create the dataset object.

curl -X POST "https://api.cloud.seqera.io/workspaces/$WORKSPACE_ID/datasets/" -H "Content-Type: application/json" -H "Authorization: Bearer $TOWER_ACCESS_TOKEN" --data '{"name":"placeholder", "description":"A placeholder for the data we will submit in the next call"}'

Step 2: Upload the datasheet into the dataset object.

curl -X POST "https://api.cloud.seqera.io/workspaces/$WORKSPACE_ID/datasets/$DATASET_ID/upload"  -H "Accept: application/json"  -H "Authorization: Bearer $TOWER_ACCESS_TOKEN"  -H "Content-Type: multipart/form-data" -F "file=@samplesheet_full.csv; type=text/csv"

You can also use the tower-cli to upload the dataset to a particular workspace:

tw datasets add --name "cli_uploaded_samplesheet" ./samplesheet_full.csv

Datasets converted to 'application/vnd.ms-excel' data type

This is a known issue when using Firefox browser with Seqera versions older than 22.2.0. You can either upgrade to 22.2.0 or higher, or use Chrome.

Seqera displays this error for this issue:

"Given file is not a dataset file. Detected media type: 'application/vnd.ms-excel'. Allowed types: 'text/csv, text/tab-separated-values'"

TSV-formatted datasets not shown

An issue was identified in Seqera version 22.2 which caused TSV datasets to be unavailable in the input data drop-down menu on the launch screen. This has been fixed in version 22.4.1.