empiar-depositor


Nameempiar-depositor JSON
Version 1.6b30 PyPI version JSON
download
home_page
SummaryScript for depositing the data into EMPIAR using EMPIAR API
upload_time2023-08-16 13:22:28
maintainer
docs_urlNone
authorAndrii Iudin
requires_python
licenseApache License
keywords empiar deposition microscopy
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ================
EMPIAR depositor
================

.. image:: https://badge.fury.io/py/empiar-depositor.svg
    :target: https://badge.fury.io/py/empiar-depositor

.. image:: https://img.shields.io/pypi/pyversions/empiar-depositor
    :alt: PyPI - Python Version

.. image:: https://travis-ci.org/emdb-empiar/empiar-depositor.svg?branch=dev
    :target: https://travis-ci.org/emdb-empiar/empiar-depositor

.. image:: https://coveralls.io/repos/github/emdb-empiar/empiar-depositor/badge.svg?branch=dev
    :target: https://coveralls.io/github/emdb-empiar/empiar-depositor?branch=dev

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 `schema <https://github.com/emdb-empiar/empiar-depositor/blob/master/empiar_depositor/empiar_deposition.schema.json>`_. An
`example <https://github.com/emdb-empiar/empiar-depositor/blob/master/empiar_depositor/tests/deposition_json/working_example.json>`_ of such a file.

2. Download and install `ascp tool <https://www.ibm.com/aspera/connect/>`_ and/or install globus-cli (supported
version 1.7.0) with

   .. code:: bash

     pip install globus-cli==1.7.0

   Globus can be used as a separate upload option or as a fallback if Aspera fails.

3. Set the environmental variable for EMPIAR transfer 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

     .. code:: bash

       export EMPIAR_TRANSFER_PASS=<empiar_transfer_password>

   - On Windows execute

     .. code:: batch

       set EMPIAR_TRANSFER_PASS=<empiar_transfer_password>

4. Run the script as:

   .. code:: bash

     empiar-depositor [-h] [-a ASCP] [-g GLOBUS] [-f] [-e ENTRY_THUMBNAIL] [-r ENTRY_ID ENTRY_DIR] [-i] [-v] EMPIAR_TOKEN JSON_INPUT DATA

Positional arguments:
+++++++++++++++++++++

``EMPIAR_TOKEN``
~~~~~~~~~~~~~~~~
EMPIAR API token. You can generate it at
`https://empiar.org/deposition/api_token <https://empiar.org/deposition/api_token>`_. Alternatively, instead of the
token you can use your EMPIAR username and provide your password with **-p** optional argument (see below for more
information).

``JSON_INPUT``
~~~~~~~~~~~~~~
The location of the JSON with EMPIAR deposition information.

``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

``-p PASSWORD, --password PASSWORD``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Use basic authentication (username + password) instead of token authentication. If no password is provided for this
argument, then the user is prompted for a password.

``-a ASCP, --ascp ASCP``
~~~~~~~~~~~~~~~~~~~~~~~~
The location of the ascp executable. By default it is installed in ~/.aspera/connect/bin directory on Linux machines,
in ~/Applications/Aspera\\ Connect.app/Contents/Resources directory on Macs and in
C:\\Users\\<username>\\AppData\\Local\\Programs\\Aspera\\Aspera Connect\\bin on Windows.

``-g GLOBUS, --globus GLOBUS``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Use Globus if Aspera is not specified or Aspera transfer fails. Requirement: globus-cli installed and an endpoint
created. Specify your unique user identifier (UUID) as the input parameter.

``-f, --globus-force-login``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Force login to Globus. Login even if the globus-cli already has valid login credentials. Any existing credentials will
be removed from local storage and globally revoked.

``-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.

``-gu USERNAME_RIGHTS, --grant-rights-usernames USERNAME_RIGHTS``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``-ge EMAIL_RIGHTS, --grant-rights-emails EMAIL_RIGHTS``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``-gu ORCID_RIGHTS, --grant-rights-usernames ORCID_RIGHTS``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Grant rights based on usernames, emails or ORCiDs. ``USERNAME_RIGHTS``, ``EMAIL_RIGHTS`` and ``ORCID_RIGHTS`` are
comma separated lists of usernames, emails, ORCiDs and rights in format `username:rights`, `email:rights` and
`orcid:rights`. Rights can be 1 - Owner, 2 - View only, 3 - View and Edit, 4 - View, Edit and Submit. There can be
only one deposition owner.

``-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 -a ~/Applications/Aspera\ Connect.app/Contents/Resources/ascp 0123456789 ~/Documents/empiar_deposition_1.json ~/Downloads/micrographs

.. code:: bash

  empiar-depositor -a ~/Applications/Aspera\ Connect.app/Contents/Resources/ascp 0123456789 ~/Documents/empiar_deposition_1.json ~/Downloads/micrographs -gu johndoe:1,jamessmith:3

.. code:: bash

  empiar-depositor -a ~/Applications/Aspera\ Connect.app/Contents/Resources/ascp 0123456789 ~/Documents/empiar_deposition_1.json ~/Downloads/micrographs -gu johndoe:4,jamessmith:1 -ge jeremycarpenter@email.com:3 -go 0000-0000-0000-0001:2,0000-0000-1000-0002:4

.. code:: bash

  empiar-depositor -r 10 ABC123 -e ~/Downloads/dep_thumb.png 0123456789 -g 01234567-89a-bcde-fghi-jklmnopqrstu ~/Documents/empiar_deposition_1.json ~/Downloads/micrographs

.. code:: bash

  empiar-depositor -a ~/Applications/Aspera\ Connect.app/Contents/Resources/ascp my_empiar_user -p my_empiar_password ~/Documents/empiar_deposition_1.json ~/Downloads/micrographs
            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "empiar-depositor",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "EMPIAR,deposition,microscopy",
    "author": "Andrii Iudin",
    "author_email": "andrii@ebi.ac.uk, andrii.iudin@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/b9/04/76a7e6b9927dfc50792b685969bf883eb14afbf51c6a98472bc4c2f70502/empiar-depositor-1.6b30.tar.gz",
    "platform": null,
    "description": "================\nEMPIAR depositor\n================\n\n.. image:: https://badge.fury.io/py/empiar-depositor.svg\n    :target: https://badge.fury.io/py/empiar-depositor\n\n.. image:: https://img.shields.io/pypi/pyversions/empiar-depositor\n    :alt: PyPI - Python Version\n\n.. image:: https://travis-ci.org/emdb-empiar/empiar-depositor.svg?branch=dev\n    :target: https://travis-ci.org/emdb-empiar/empiar-depositor\n\n.. image:: https://coveralls.io/repos/github/emdb-empiar/empiar-depositor/badge.svg?branch=dev\n    :target: https://coveralls.io/github/emdb-empiar/empiar-depositor?branch=dev\n\nCommand line tool for depositing data into `Electron Microscopy Public Image Archive\n<https://empiar.org>`_.\n\nHow to use\n----------\n\nPlease follow these steps:\n\n1. Create a JSON file according to the `schema <https://github.com/emdb-empiar/empiar-depositor/blob/master/empiar_depositor/empiar_deposition.schema.json>`_. An\n`example <https://github.com/emdb-empiar/empiar-depositor/blob/master/empiar_depositor/tests/deposition_json/working_example.json>`_ of such a file.\n\n2. Download and install `ascp tool <https://www.ibm.com/aspera/connect/>`_ and/or install globus-cli (supported\nversion 1.7.0) with\n\n   .. code:: bash\n\n     pip install globus-cli==1.7.0\n\n   Globus can be used as a separate upload option or as a fallback if Aspera fails.\n\n3. Set the environmental variable for EMPIAR transfer password to the one that EMPIAR team has provided you with. Please\nnote that this is not the API token from 1) and is a separate password from the one that you create when registering\nEMPIAR user.\n\n   - On Linux and Mac OS X execute\n\n     .. code:: bash\n\n       export EMPIAR_TRANSFER_PASS=<empiar_transfer_password>\n\n   - On Windows execute\n\n     .. code:: batch\n\n       set EMPIAR_TRANSFER_PASS=<empiar_transfer_password>\n\n4. Run the script as:\n\n   .. code:: bash\n\n     empiar-depositor [-h] [-a ASCP] [-g GLOBUS] [-f] [-e ENTRY_THUMBNAIL] [-r ENTRY_ID ENTRY_DIR] [-i] [-v] EMPIAR_TOKEN JSON_INPUT DATA\n\nPositional arguments:\n+++++++++++++++++++++\n\n``EMPIAR_TOKEN``\n~~~~~~~~~~~~~~~~\nEMPIAR API token. You can generate it at\n`https://empiar.org/deposition/api_token <https://empiar.org/deposition/api_token>`_. Alternatively, instead of the\ntoken you can use your EMPIAR username and provide your password with **-p** optional argument (see below for more\ninformation).\n\n``JSON_INPUT``\n~~~~~~~~~~~~~~\nThe location of the JSON with EMPIAR deposition information.\n\n``DATA``\n~~~~~~~~\nThe location of the data that you would like to upload to EMPIAR. It should contain directories that correspond to the\nimage set directories specified in the JSON file.\n\nOptional arguments:\n+++++++++++++++++++\n\n``-h, --help``\n~~~~~~~~~~~~~~\nShow help message and exit\n\n``-p PASSWORD, --password PASSWORD``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nUse basic authentication (username + password) instead of token authentication. If no password is provided for this\nargument, then the user is prompted for a password.\n\n``-a ASCP, --ascp ASCP``\n~~~~~~~~~~~~~~~~~~~~~~~~\nThe location of the ascp executable. By default it is installed in ~/.aspera/connect/bin directory on Linux machines,\nin ~/Applications/Aspera\\\\ Connect.app/Contents/Resources directory on Macs and in\nC:\\\\Users\\\\<username>\\\\AppData\\\\Local\\\\Programs\\\\Aspera\\\\Aspera Connect\\\\bin on Windows.\n\n``-g GLOBUS, --globus GLOBUS``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nUse Globus if Aspera is not specified or Aspera transfer fails. Requirement: globus-cli installed and an endpoint\ncreated. Specify your unique user identifier (UUID) as the input parameter.\n\n``-f, --globus-force-login``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nForce login to Globus. Login even if the globus-cli already has valid login credentials. Any existing credentials will\nbe removed from local storage and globally revoked.\n\n``-e ENTRY_THUMBNAIL, --entry-thumbnail ENTRY_THUMBNAIL``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nThumbnail image that will represent your deposition on EMPIAR pages. Minimum size is 400 x 400, preferred format is png.\nIf none is provided, then the image from the related EMDB entry will be used.\n\n``-r ENTRY_ID ENTRY_DIR, --resume ENTRY_ID ENTRY_DIR``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nResume Aspera upload or re-deposit an entry. The entry has to be successfully created as specifying EMPIAR entry ID and\nentry 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.\n\n``-gu USERNAME_RIGHTS, --grant-rights-usernames USERNAME_RIGHTS``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n``-ge EMAIL_RIGHTS, --grant-rights-emails EMAIL_RIGHTS``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n``-gu ORCID_RIGHTS, --grant-rights-usernames ORCID_RIGHTS``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nGrant rights based on usernames, emails or ORCiDs. ``USERNAME_RIGHTS``, ``EMAIL_RIGHTS`` and ``ORCID_RIGHTS`` are\ncomma separated lists of usernames, emails, ORCiDs and rights in format `username:rights`, `email:rights` and\n`orcid:rights`. Rights can be 1 - Owner, 2 - View only, 3 - View and Edit, 4 - View, Edit and Submit. There can be\nonly one deposition owner.\n\n``-i, --ignore-certificate``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nActivate this flag to skip the verification of SSL certificate.\n\n``-v, --version``\n~~~~~~~~~~~~~~~~~\nShow program's version number and exit\n\nExamples:\n+++++++++\n\n.. code:: bash\n\n  empiar-depositor -a ~/Applications/Aspera\\ Connect.app/Contents/Resources/ascp 0123456789 ~/Documents/empiar_deposition_1.json ~/Downloads/micrographs\n\n.. code:: bash\n\n  empiar-depositor -a ~/Applications/Aspera\\ Connect.app/Contents/Resources/ascp 0123456789 ~/Documents/empiar_deposition_1.json ~/Downloads/micrographs -gu johndoe:1,jamessmith:3\n\n.. code:: bash\n\n  empiar-depositor -a ~/Applications/Aspera\\ Connect.app/Contents/Resources/ascp 0123456789 ~/Documents/empiar_deposition_1.json ~/Downloads/micrographs -gu johndoe:4,jamessmith:1 -ge jeremycarpenter@email.com:3 -go 0000-0000-0000-0001:2,0000-0000-1000-0002:4\n\n.. code:: bash\n\n  empiar-depositor -r 10 ABC123 -e ~/Downloads/dep_thumb.png 0123456789 -g 01234567-89a-bcde-fghi-jklmnopqrstu ~/Documents/empiar_deposition_1.json ~/Downloads/micrographs\n\n.. code:: bash\n\n  empiar-depositor -a ~/Applications/Aspera\\ Connect.app/Contents/Resources/ascp my_empiar_user -p my_empiar_password ~/Documents/empiar_deposition_1.json ~/Downloads/micrographs",
    "bugtrack_url": null,
    "license": "Apache License",
    "summary": "Script for depositing the data into EMPIAR using EMPIAR API",
    "version": "1.6b30",
    "project_urls": null,
    "split_keywords": [
        "empiar",
        "deposition",
        "microscopy"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b90476a7e6b9927dfc50792b685969bf883eb14afbf51c6a98472bc4c2f70502",
                "md5": "32f8050fcb99956f85d289754f008617",
                "sha256": "75224926804008824a359896cb760bc048fd35dc345faaf9d3697b0447be9008"
            },
            "downloads": -1,
            "filename": "empiar-depositor-1.6b30.tar.gz",
            "has_sig": false,
            "md5_digest": "32f8050fcb99956f85d289754f008617",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 147322,
            "upload_time": "2023-08-16T13:22:28",
            "upload_time_iso_8601": "2023-08-16T13:22:28.599642Z",
            "url": "https://files.pythonhosted.org/packages/b9/04/76a7e6b9927dfc50792b685969bf883eb14afbf51c6a98472bc4c2f70502/empiar-depositor-1.6b30.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-16 13:22:28",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "empiar-depositor"
}
        
Elapsed time: 0.10294s