Metadata-Version: 2.0
Name: empiar-depositor
Version: 1.4b1
Summary: Script for depositing the data into EMPIAR using EMPIAR API
Home-page: UNKNOWN
Author: Andrii Iudin
Author-email: andrii@ebi.ac.uk, andrii.iudin@gmail.com
License: Apache License
Description-Content-Type: UNKNOWN
Keywords: EMPIAR,deposition,microscopy
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 2.7
Requires-Dist: requests

================
EMPIAR depositor
================

Command line tool for depositing data into `Electron Microscopy Public Image Archive
<https://empiar.org>`_.

How to use
----------
Please follow these steps:

1. Create a JSON file according to the structure provided in the `example <https://empiar.org/deposition/json_submission>`_.

2. Download and install `ascp tool <http://downloads.asperasoft.com/connect2/>`_.

3. Set the environmental variable for Aspera password to the one that EMPIAR team has provided you with:

  * On Linux and Mac OS X run

  .. code:: bash

    export ASPERA_SCP_PASS=<empiar_aspera_password>

  * On Windows run

  .. code:: batch

    set ASPERA_SCP_PASS=<empiar_aspera_password>

4. Run the script as:

  .. code:: bash

    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.

``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. The entry has to be successfully created as specifying EMPIAR entry ID and entry directory is required. 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:
+++++++++

.. code:: bash

  empiar_depositor -t 0123456789 -j ~/Downloads/empiar_deposition_1.json -a ~/Applications/Aspera\ Connect.app/Contents/Resources/ascp -e ~/Downloads/dep_thumb.png -d ~/Downloads/micrographs

.. code:: bash

  empiar_depositor -t 0123456789 -j ~/Downloads/empiar_deposition_1.json -a ~/Applications/Aspera\ Connect.app/Contents/Resources/ascp -r 10 ABC123 -d ~/Downloads/micrographs``

