To anyone who is regularly submitting data to the European Nucleotide Archive, this may sound familiar (anyone else may need some more context):
- You just wanted to create a new Umbrella Project and link your recently uploaded Project data to it.
- You just wanted to release an assembly you just uploaded into an existing public project (the only way to publish is via the API).
- Yes, there is an XML API but you forgot where the endpoint URL or what the syntax was and which action it supports.
- You don't want to manually create XML files each time and then upload them with CURL for repetitive actions.
To address these common pain points, I have written a little Perl script that wraps around the ENA XML interface to enable data brokers to do most of the stuff that you cannot via web-in. I simply call it ena.pl and have written it for my own purposes, but would like to share it with you.
You can try it here:
https://github.com/mdondrup/ena-tool/
Usage is super simple as a perl script with GetOpt::Long, e.g.:
## Add a new umbrella project. This can only be done via the API
ena.pl ADD umbrella --alias "project_alias" --description "Project description" --title "Project Title" \
--username "your_username" --password "your_password" --center "your institution"
## Modify an existing project
ena.pl MODIFY project --alias "project_alias" --description "Updated description" --title "Updated Title"\
--username "your_username" --password "your_password" --accession "accession_number" --center "your institution"
## Add your current projects to the Umbrella you created
ena.pl MODIFY umbrella --accession "umbrella_project_accession" \
--username "your_username" --password "your_password" \
--children "child_project_accession_1,child_project_accession_2" --center "your institution"
## Release a canceled or otherwise private dataset, etc. at a given date printing the intermediate XML:
ena.pl RELEASE object --accession EXXXXXXX --username user --pass "pass" --verbose --releasedate 2024-12-01
By default, all changes go to ENA's test system. To submit to production, add --prod
, use --center "your institution"
to set det data producer, defaults to EBP Norway.
As I said it is pure Perl and you cannot upload any raw data with it, you can use the ENA Java webin-cli for this. It also tries not to break anything, but ... Feel free to test it or criticize my Perl code.
This script is provided to you by ELIXIR Norway.