Giter Site home page Giter Site logo

nbisweden / ena-upload-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from usegalaxy-eu/ena-upload-cli

0.0 2.0 0.0 230 KB

ENA upload tool - script your Open Data upload to the European Nucleotide Archive

License: MIT License

Python 100.00%

ena-upload-cli's Introduction

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

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

Installation

pip install ena-upload-cli

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
  --version             show program's version number 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.

Supported columns for viral sample submissions

Viral samples are validated by ENA using the ENA virus pathogen checklist. The columns supported in the sample tsv table used by this tool are:

Column name Cardinality
alias mandatory
status auto_filled
accession auto_filled
title mandatory
scientific_name mandatory
taxon_id auto_filled
sample_description mandatory
collection_date mandatory
geographic_location mandatory
host_common_name mandatory
host_subject_id mandatory
host_health_state mandatory
host_sex mandatory
host_scientific_name mandatory
collector_name mandatory
collecting_institution mandatory
isolate mandatory
submission_date auto_filled
geographic_location_region recommended
geographic_location_latitude recommended
geographic_location_longitude recommended
host_age recommended

IMPORTANT: Columns That are mandatory and auto_filled have to be present in the table. Recommended ones can be added, but should not be present if not being used.

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

ena-upload-cli's People

Contributors

bedroesb avatar dyusuf avatar bgruening avatar tpall avatar

Watchers

James Cloos avatar  avatar

ena-upload-cli's Issues

Evaluate for local pipelines

Requirements

  • Validate fastq and fasta file contents
  • Gzip if necessary
  • Generate md5 if missing
  • Validate using md5 if available
  • Robust file transfer/resume
  • Consensus sequence submissions
  • Custom attributes

To do:
???

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.