Modified on Wed, 07 Sep 2022 at 03:42 PM

Q: Why are uploads of Datasets via direct calls to the Tower API failing?

When uploading Datasets via the Tower GUI or CLI, some steps are automatically done on your behalf. Clients wishing to upload Datasets via direct calls to the API are required to undertake a few additional steps: * [ ] 1. Explicitly define the MIME type of the file they are uploading. 2. Make two calls to the API: 1. Create a Dataset object 2. Upload the samplesheet to the Dataset object.


# Step 1: Create the Dataset object
$ curl -X POST "$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 "$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

Q: Why is my uploaded Dataset not showing in the Tower Launch screen input field dropdown?

When launching a Nextflow workflow from the Tower GUI, the input field dropdown will only show Datasets whose mimetypes match the rules specified in the associated nextflow_schema.json file. If your Dataset has a mimetype different than what the pipeline expects, Tower will not present the file.

Example: The default nf-core RNASeq pipeline specifies that only files with a csv mimetype should be provided as an input file. If you created a Dataset of mimetype tsv, it would not appear as an input filed dropdown option.

Q: Can an input file mimetype restriction be added to the nextflow_schema.json file generated by the nf-core pipeline schema builder tool?

As of August 2022, it is possible to add a mimetype restriction to the nextflow_schema.json file generated by the nf-core schema builder tool but this must occur manually after generation, not during. Please refer to this RNASeq example to see how the mimetype key-value pair should be specified.

Q: Why are my datasets converted to 'application/' data type when uploading on a browser using Windows OS?

This is a known issue when using Firefox browser with the Tower version prior to 22.2.0. You can either (a) upgrade the Tower version to 22.2.0 or higher or (b) use Chrome.

For context, the Tower will prompt the message below if you encountered this issue.

"Given file is not a dataset file. Detected media type: 'application/'. Allo

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article