Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • master
1 result

Target

Select target project
No results found
Select Git revision
  • master
1 result
Show changes

Commits on Source 7

2 files
+ 135
32
Compare changes
  • Side-by-side
  • Inline

Files

+99 −0
Original line number Diff line number Diff line
Database Manager
================

This tool provide the preparation of Databases for several bioinformaticians tools.
The preparated databases can be used on the working computer or can be saved on the cloud Server(Amazon Web Service S3)
so that other computer can be able to download the data from there. It's also possible to delete some undesirable 
databases on the working computer and/or in the Cloud.

Supported Databases with associated tools:

* Uniprot-Swissprot [Blast, Ghostx]
* CARD [Blast, Ghostx]
* Pfam [hmmer]

Installation
------------

Prerequisites:

* Python (Version >= 3.7)
* Git

Install for user::

    pip install git+https://git.computational.bio.uni-giessen.de/cfankep/psotdb.git

Install for developer::

    #checkout repository
    git clone git+https://git.computational.bio.uni-giessen.de/cfankep/psotdb.git

    #install
    pip3 install -e .


Using Database Manager
----------------------

For the general help use::

    dbman --help

Checkout which databases are available::

    # in the S3 directory
    dbman list_remote_databases

    # in the local directory
    dbman list_local_databases 

Checkout which databases with associated transformations are available::

    dbman list_recipes

Prepare databases::

    # check the available optional parameters
    dbman prepare -h

    # run the standard preparation
    dbman prepare example/database exemple/tool

Transfer databases from the working computer to s3 Cloud::

    # check the available optional parameters
    dbman upload -h

    # run the standard transfer
    dbman upload example/database exemple/tool*

Transfer databases from s3 Cloud to working computer::

    # check the available optional parameters
    dbman download -h

    # run the standard download
    dbman download example/database exemple/tool*

Delete undesirable databases::

    # from the local directory
    dbman delete example/database example/tool* local

    # from the s3 cloud directory
    dbman delete example/database example/tool* s3

remplace the standard directory to save the data::

    # change local directory with the environment variable
    export DBMAN_DBDIR = example/path

    # change remote directory with the environment variable
    export DBMAN_S3DIR = example/path

The standard directories(local and remote) can also be change with optional parameters. 



(*) For upload, download and delete of the raw databank instead of 'example/tool' enter 'raw'.   
+36 −32
Original line number Diff line number Diff line
@@ -85,8 +85,8 @@ def get_remote_databases_directory(args):
    web_dir = 's3://db_storage'
    if args.store:
        web_dir = args.store
    elif 'S3_DBDIR' in os.environ:
        web_dir = os.environ['S3_DBDIR']
    elif 'DBMAN_S3DIR' in os.environ:
        web_dir = os.environ['DBMAN_S3DIR']
    return web_dir


@@ -347,6 +347,8 @@ def download(args):
def delete(args):
    if args.database in data.keys():
        if args.tool in data[args.database]['tool'].keys() or args.tool == "raw":
            frage = input('Do you want to continue (Y/N)? ')
            if frage.lower() == 'y':
                if args.place == 'local':
                    version = get_local_json_version(args)
                    dbman_dir = get_local_databases_directory(args)
@@ -377,6 +379,8 @@ def delete(args):
                        print("The {} files were successfully delete from: ".format(get_tool_directory_name(args, version)) + web_store)
                    else:
                        print("The {} files aren't existing in: ".format(get_tool_directory_name(args, version)) + web_store)
            else:
                print('delete canceled')
        else:
            print('Tool error. There are following possibility: {}'.format([tool for tool in data[args.database]['tool'].keys()]))
    else: