Skip to main content

Script for depositing the data into EMPIAR using EMPIAR API

Project description

Command line tool for depositing data into Electron Microscopy Public Image Archive.

How to use

Please follow these steps:

  1. Create a JSON file according to the structure provided in the example.

  2. Download and install ascp tool.

  3. Set the environmental variable for Aspera password to the one that EMPIAR team has provided you with. Please note that this is not the API token from 1) and is a separate password from the one that you create when registering EMPIAR user.

    • On Linux and Mac OS X execute

      export ASPERA_SCP_PASS=<empiar_aspera_password>
    • On Windows execute

      set ASPERA_SCP_PASS=<empiar_aspera_password>
  4. Run the script as:

    empiar-depositor [-h] [-e ENTRY_THUMBNAIL] [-r RESUME RESUME] [-i] [-v] EMPIAR_TOKEN JSON_INPUT ASCP_PATH DATA_PATH

Positional arguments:

EMPIAR_TOKEN

EMPIAR API token. Contact EMPIAR team to obtain it.

JSON_INPUT

The location of the JSON with EMPIAR deposition information.

ASCP

The location of the ascp executable. By default it is installed in ~/.aspera/connect/bin directory on Linux machines, in ~/Applications/AsperaConnect.app/Contents/Resources directory on Macs and in C:Users<username>AppDataLocalProgramsAsperaAspera Connectbin on Windows.

DATA

The location of the data that you would like to upload to EMPIAR. It should contain directories that correspond to the image set directories specified in the JSON file.

Optional arguments:

-h, --help

Show help message and exit

-e ENTRY_THUMBNAIL, --entry-thumbnail ENTRY_THUMBNAIL

Thumbnail image that will represent your deposition on EMPIAR pages. Minimum size is 400 x 400, preferred format is png. If none is provided, then the image from the related EMDB entry will be used.

-r ENTRY_ID ENTRY_DIR, --resume ENTRY_ID ENTRY_DIR

Resume Aspera upload or re-deposit an entry. The entry has to be successfully created as specifying EMPIAR entry ID and entry directory is required. All entry metadata will be replaced with the one provided in the JSON file. Aspera transfer will continue from where it stopped.

-i, --ignore-certificate

Activate this flag to skip the verification of SSL certificate.

-v, --version

Show program’s version number and exit

Examples:

empiar-depositor 0123456789 ~/Documents/empiar_deposition_1.json ~/Applications/Aspera\ Connect.app/Contents/\ Resources/ascp ~/Downloads/micrographs
empiar-depositor -r 10 ABC123 -e ~/Downloads/dep_thumb.png 0123456789 ~/Documents/empiar_deposition_1.json ~/\ Applications/Aspera\ Connect.app/Contents/Resources/ascp ~/Downloads/micrographs

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

empiar-depositor-1.6b3.tar.gz (8.5 kB view hashes)

Uploaded Source

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