Skip to main content

Command Line Interface to upload data to the European Nucleotide Archive

Project description

Python application BioConda version Pipy version European Galaxy server DOI

ENA upload tool

About

The program submits experimental data and respective metadata to the European Nucleotide Archive (ENA). The metadata should be provided in separate tables corresponding to the following ENA objects:

  • STUDY
  • SAMPLE
  • EXPERIMENT
  • RUN

The program to perform the following actions:

  • add: add an object to the archive
  • modify: modify an object in the archive
  • cancel: cancel a private object and its dependent objects (under development)
  • release: release a private object immediately to the public (under development)

After a successful submission, new tsv tables will be generated with the ENA accession numbers filled in along with a submission receipt.

Tool dependencies

  • curl
  • python 3.5+ including following packages:
    • Genshi
    • lxml
    • pandas

Installation

pip install ena-upload-cli

Be aware that Windows can give problems with the curl commands executed by the script. Check that curl is available in your PATH.

Usage

Minimal:  ena-upoad-cli --action {add,modify,cancel,release} --center CENTER_NAME  --secret SECRET

All supported arguments:
  -h, --help            show this help message and exit
  --action {add,modify,cancel,release}
                         add: add an object to the archive
                         modify: modify an object in the archive
                         cancel: cancel a private object and its dependent objects
                         release: release a private object immediately to public
  --study STUDY         table of STUDY object
  --sample SAMPLE       table of SAMPLE object
  --experiment EXPERIMENT
                        table of EXPERIMENT object
  --run RUN             table of RUN object
  --data [FILE [FILE ...]]
                        data for submission
  --center CENTER_NAME  specific to your Webin account
  --tool TOOL_NAME      Specify the name of the tool this submission is done with. Default: ena-upload-cli
  --tool_version TOOL_VERSION
                        Specify the version of the tool this submission is done with. Default: current version of tool
  --secret SECRET       .secret file containing the password of your Webin account
  -d, --dev             Flag to use the dev/sandbox endpoint of ENA.
  --vir                 Flag to use the viral sample template.

Mandatory arguments: --action, --center and --secret.

ENA Webin

A Webin can be made here if you don't have one already. The --webin_id parameter makes use of the full username looking like: Webin-XXXXX. Visit Webin online to check on your submissions or dev Webin to check on test submissions.

The .secret.yml file

To avoid exposing your credentials through the terminal history, it is recommended to make use of a .secret.yml file, containing your password and username keywords. An example is given in the root of this directory.

dev instance

By default the submission will be done using following url to ENA: https://www.ebi.ac.uk/ena/submit/drop-box/submit/?auth=ENA

Use the --dev flag if you want to do a test submission using the tool by the sandbox dev instance of ENA: https://wwwdev.ebi.ac.uk/ena/submit/drop-box/submit/?auth=ENA. A TEST submission will be discarded within 24 hours.

The data files

Supported data

  • Read data
  • Genome Assembly
  • Transcriptome Assembly
  • Template Sequence
  • Other Analyses

Most files uploaded to the ENA FTP server need to be compressed.

More information on how ENA wants to receive the files can be found here.

Tool overview

inputs:

  • metadata tables
    • examples in example_table
    • Please define actions in status column e.g. add, modify, cancel, release
    • to perform bulk submission of all objects, the aliases ids in different ENA objects should be in the association where alias ids in experiment object link all objects together
  • experimental data
    • examples in example_data

outputs:

  • In the same directory of inputs
  • metadata tables with updated info in status and other relevant columns, e.g:
    • updated status: added, modified, canceled, released
    • accession ids
    • submission date

Test the tool

test command: add metadata and sequence data

ena_upload --action add --center 'your_center_name' --study example_tables/ENA_template_studies.tsv --sample example_tables/ENA_template_samples.tsv --experiment example_tables/ENA_template_experiments.tsv --run example_tables/ENA_template_runs.tsv --data example_data/*gz --dev --secret .secret.yml

test command: modify metadata

ena_upload --action modify --center 'your_center_name' --study example_tables/ENA_template_studies-2020-05-01T1421.tsv --dev --secret .secret.yml

test command for viral data

ena_upload --action add --center 'your_center_name' --study example_tables/ENA_template_studies.tsv --sample example_tables/ENA_template_samples_vir.tsv --experiment example_tables/ENA_template_experiments.tsv --run example_tables/ENA_template_runs.tsv --data example_data/*gz --dev --vir --secret .secret.yml

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ena-upload-cli-0.2.7.tar.gz (44.1 kB view details)

Uploaded Source

Built Distribution

ena_upload_cli-0.2.7-py3-none-any.whl (50.3 kB view details)

Uploaded Python 3

File details

Details for the file ena-upload-cli-0.2.7.tar.gz.

File metadata

  • Download URL: ena-upload-cli-0.2.7.tar.gz
  • Upload date:
  • Size: 44.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for ena-upload-cli-0.2.7.tar.gz
Algorithm Hash digest
SHA256 3c821f00c7c3e794dc368374713209d5289ad30ef30d21a6aed1e7253df4b359
MD5 4343b79b108f199ab8ba7320cbbfeed8
BLAKE2b-256 2342bf74dc2770b15adb396905c7ac8d69b483e0519bbad68d164ba55ee7c47e

See more details on using hashes here.

Provenance

File details

Details for the file ena_upload_cli-0.2.7-py3-none-any.whl.

File metadata

  • Download URL: ena_upload_cli-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 50.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for ena_upload_cli-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 86b4d0dd1537eacf12a283646f13abaa54815f97a2cbbe88a3868a3fe10937d2
MD5 794878ed48f8474bf652a90c3358536e
BLAKE2b-256 0dff631d1247f1768e4261b8b7233ec7728ea23361af5d9aff59e5248342615d

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page