permedcoe


Namepermedcoe JSON
Version 0.0.10 PyPI version JSON
download
home_pagehttps://github.com/PerMedCoE/permedcoe
SummaryThis package provides the common interface for the Building Blocks.
upload_time2023-03-30 13:53:55
maintainer
docs_urlNone
authorPerMedCoE Project
requires_python>=3.6, <4
license
keywords permedcoe
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # HPC/Exascale Centre of Excellence in Personalised Medicine

## Base Building Block

This package provides the base for all **Building Blocks (BBs)** developed in the **HPC/Exascale Centre of Excellence in Personalised Medicine** ([PerMedCoE](https://permedcoe.eu/)) project.

## Table of Contents

- [HPC/Exascale Centre of Excellence in Personalised Medicine](#hpcexascale-centre-of-excellence-in-personalised-medicine)
  - [Base Building Block](#base-building-block)
  - [Table of Contents](#table-of-contents)
  - [User instructions](#user-instructions)
    - [Requirements](#requirements)
    - [Installation](#installation)
    - [Command line](#command-line)
      - [Option execute:](#option-execute)
      - [Option template:](#option-template)
      - [Option deploy:](#option-deploy)
    - [Public API](#public-api)
    - [Uninstall](#uninstall)
  - [Developer instructions](#developer-instructions)
    - [Building block](#building-block)
  - [License](#license)
  - [Contact](#contact)

## User instructions

### Requirements

- Python >= 3.6
- [Singularity](https://singularity.lbl.gov/docs-installation)

### Installation

There are two ways to install this package (from Pypi and manually):

- From Pypi:

  This package is publicly available in Pypi:

  ```shell
  pip install permedcoe
  ```

  or more specifically:

  ```shell
  python3 -m pip install permedcoe
  ```

- From source code:

  This package provides an automatic installation script:

  ```shell
  ./install.sh
  ```

### Command line

  This package provides the `permedcoe` command:

  ```shell
  $ permedcoe -h
  usage: permedcoe [-h] [-d] [-l {debug,info,warning,error,critical}]
                 {execute,x,template,t,deploy,d} ...

  positional arguments:
    {execute,x,template,t,deploy,d}
      execute (x)         Execute a building block.
      template (t)        Shows an example of the requested template.
      deploy (d)          Download and deploy the requested workflow or building block.

  options:
    -h, --help            show this help message and exit
    -d, --debug           Enable debug mode. Overrides log_level (default: False)
    -l {debug,info,warning,error,critical}, --log_level {debug,info,warning,error,critical}
                          Set logging level. (default: error)
  ```
#### Option execute:

- It enables to execute single building blocks or applications:

  ```shell
  $ permedcoe execute -h
  usage: permedcoe execute [-h] {building_block,bb,application,app} ...

  positional arguments:
    {building_block,bb,application,app}
      building_block (bb)
                          Execute a building block.
      application (app)   Execute an application.

  optional arguments:
    -h, --help            show this help message and exit
  ```

  - In particular for building blocks:

    ```shell
    $ permedcoe execute building_block -h
    usage: permedcoe execute building_block [-h] name [parameters ...]

    positional arguments:
      name        Building Block to execute
      parameters  Building Block parameters (default: None)

    options:
      -h, --help  show this help message and exit
    ```

    Specifying the particular building block to execute (must be installed), provides more detailed information:

    ```shell
    $ permedcoe execute building_block MaBoSS_BB -h
    usage: permedcoe [-h] [-c CONFIG] [-d] [-l {debug,info,warning,error,critical}] [--tmpdir TMPDIR]
                 [--processes PROCESSES] [--gpus GPUS] [--memory MEMORY] [--mount_points MOUNT_POINTS]
                 {default,sensitivity} ...

      This building block uses MaBoSS to screen all the possible knockouts of a given Boolean model. It
      produces a candidate gene list formatted as a text file (single gene per row). More information on
      MaBoSS can be found in [Stoll G. et al. (2017)](https://academic.oup.com/bioinformatics/article-
      lookup/doi/10.1093/bioinformatics/btx123) and in the [MaBoSS GitHub
      repository](https://github.com/maboss-bkmc/MaBoSS-env-2.0).

      positional arguments:
        {default,sensitivity}

      options:
        -h, --help            show this help message and exit
        -c CONFIG, --config CONFIG
                              (CONFIG) Configuration file path
        -d, --debug           Enable Building Block debug mode. Overrides log_level
        -l {debug,info,warning,error,critical}, --log_level {debug,info,warning,error,critical}
                              Set logging level
        --tmpdir TMPDIR       Temp directory to be mounted in the container
        --processes PROCESSES
                              Number of processes for MPI executions
        --gpus GPUS           Requirements for GPU jobs
        --memory MEMORY       Memory requirement
        --mount_points MOUNT_POINTS
                              Comma separated alias:folder to be mounted in the container

    ```

  - In particular for building blocks:

    ```shell
    $ permedcoe execute application -h
    usage: permedcoe execute application [-h] [-w {none,pycompss,nextflow,snakemake}]
                                        [-f FLAGS [FLAGS ...]]
                                        name [parameters [parameters ...]]

    positional arguments:
      name                  Application to execute
      parameters            Application parameters (default: None)

    optional arguments:
      -h, --help            show this help message and exit
      -w {none,pycompss,nextflow,snakemake}, --workflow_manager {none,pycompss,nextflow,snakemake}
                            Workflow manager to use (default: none)
      -f FLAGS [FLAGS ...], --flags FLAGS [FLAGS ...]
                            Workflow manager flags (default: None)
    ```

#### Option template:

- It available to create a skeleton of a building block or an application:

  ```shell
  $ permedcoe template -h
  usage: permedcoe template [-h] [-t {all,pycompss,nextflow,snakemake}]
                            {bb,building_block,app,application} name

  positional arguments:
    {bb,building_block,app,application}
                          Creates a Building Block or Application template.
    name                  Building Block or Application name.

  optional arguments:
    -h, --help            show this help message and exit
    -t {all,pycompss,nextflow,snakemake}, --type {all,pycompss,nextflow,snakemake}
                          Application type. (default: all)
  ```

#### Option deploy:

- It available to deploy an existing Building Block or Workflow in a **local machine (e.g. laptop)**:

  ```shell
  $ permedcoe deploy -h
  usage: permedcoe deploy [-h] {building_block,bb,workflow,wf} ...

  positional arguments:
    {building_block,bb,workflow,wf}
      building_block (bb)
                          A specific building block.
      workflow (wf)       A specific workflow.

  options:
    -h, --help            show this help message and exit
  ```

For the deployment in supercomputers, please contact PerMedCoE: <https://permedcoe.eu/contact/>.

### Public API

The `permedcoe` package provides a set of public decorators, parameter type definition and functions to be used in the Building Block implementation.

- Public decorators:

    ```python
    from permedcoe import container
    from permedcoe import constraint
    from permedcoe import binary
    from permedcoe import mpi
    from permedcoe import task
    ```

- Parameter type definition:

    ```python
    from permedcoe import Type
    from permedcoe import FILE_IN
    from permedcoe import FILE_OUT
    from permedcoe import FILE_INOUT
    from permedcoe import DIRECTORY_IN
    from permedcoe import DIRECTORY_OUT
    from permedcoe import DIRECTORY_INOUT
    from permedcoe import StdIOStream
    from permedcoe import STDIN
    from permedcoe import STDOUT
    from permedcoe import STDERR
    ```

- Functions:

    ```python
    from permedcoe import get_environment
    from permedcoe import set_debug
    from permedcoe import invoker
    ```

- Classes:

    ```python
    from permedcoe import Arguments
    ```

### Uninstall

Uninstall can be done as usual `pip` packages:

There are two ways to uninstall this package, that depends on the way that it was installed (from Pypi or using `install.sh`):


- From Pypi:

  ```shell
  pip uninstall permedcoe
  ```

  or more specifically:

  ```shell
  python3 -m pip uninstall permedcoe
  ```

- From manual installation (using `install.sh`):

  ```shell
  ./uninstall.sh
  ```

  And then the folder can be cleaned as well using the `clean.sh` script.

  ```shell
  ./clean.sh
  ```

## Developer instructions

### Building block

If you are willing to implement your Building Block (BB), check the following repositories,
where you will find documentation, tutorials, and BB/application samples:

- [Documentation](https://permedcoe.readthedocs.io/en/latest/)
- [Tutorial](https://permedcoe.readthedocs.io/en/latest/04_creating/04_tutorial/tutorial.html)
- [basic_application](https://github.com/PerMedCoE/basic_application)
- [Lysozyme_in_water](https://github.com/PerMedCoE/Lysozyme_in_water)

## License

[Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)

## Contact

<https://permedcoe.eu/contact/>

This software has been developed for the [PerMedCoE project](https://permedcoe.eu/), funded by the European Commission (EU H2020 [951773](https://cordis.europa.eu/project/id/951773)).

![](https://permedcoe.eu/wp-content/uploads/2020/11/logo_1.png "PerMedCoE")



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/PerMedCoE/permedcoe",
    "name": "permedcoe",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6, <4",
    "maintainer_email": "",
    "keywords": "PerMedCoE",
    "author": "PerMedCoE Project",
    "author_email": "infoPerMedCoE@bsc.es",
    "download_url": "https://files.pythonhosted.org/packages/5f/bb/154b8136dcc58bd9336560928efc036721017dac77fd5239acb2d8d84b27/permedcoe-0.0.10.tar.gz",
    "platform": null,
    "description": "# HPC/Exascale Centre of Excellence in Personalised Medicine\n\n## Base Building Block\n\nThis package provides the base for all **Building Blocks (BBs)** developed in the **HPC/Exascale Centre of Excellence in Personalised Medicine** ([PerMedCoE](https://permedcoe.eu/)) project.\n\n## Table of Contents\n\n- [HPC/Exascale Centre of Excellence in Personalised Medicine](#hpcexascale-centre-of-excellence-in-personalised-medicine)\n  - [Base Building Block](#base-building-block)\n  - [Table of Contents](#table-of-contents)\n  - [User instructions](#user-instructions)\n    - [Requirements](#requirements)\n    - [Installation](#installation)\n    - [Command line](#command-line)\n      - [Option execute:](#option-execute)\n      - [Option template:](#option-template)\n      - [Option deploy:](#option-deploy)\n    - [Public API](#public-api)\n    - [Uninstall](#uninstall)\n  - [Developer instructions](#developer-instructions)\n    - [Building block](#building-block)\n  - [License](#license)\n  - [Contact](#contact)\n\n## User instructions\n\n### Requirements\n\n- Python >= 3.6\n- [Singularity](https://singularity.lbl.gov/docs-installation)\n\n### Installation\n\nThere are two ways to install this package (from Pypi and manually):\n\n- From Pypi:\n\n  This package is publicly available in Pypi:\n\n  ```shell\n  pip install permedcoe\n  ```\n\n  or more specifically:\n\n  ```shell\n  python3 -m pip install permedcoe\n  ```\n\n- From source code:\n\n  This package provides an automatic installation script:\n\n  ```shell\n  ./install.sh\n  ```\n\n### Command line\n\n  This package provides the `permedcoe` command:\n\n  ```shell\n  $ permedcoe -h\n  usage: permedcoe [-h] [-d] [-l {debug,info,warning,error,critical}]\n                 {execute,x,template,t,deploy,d} ...\n\n  positional arguments:\n    {execute,x,template,t,deploy,d}\n      execute (x)         Execute a building block.\n      template (t)        Shows an example of the requested template.\n      deploy (d)          Download and deploy the requested workflow or building block.\n\n  options:\n    -h, --help            show this help message and exit\n    -d, --debug           Enable debug mode. Overrides log_level (default: False)\n    -l {debug,info,warning,error,critical}, --log_level {debug,info,warning,error,critical}\n                          Set logging level. (default: error)\n  ```\n#### Option execute:\n\n- It enables to execute single building blocks or applications:\n\n  ```shell\n  $ permedcoe execute -h\n  usage: permedcoe execute [-h] {building_block,bb,application,app} ...\n\n  positional arguments:\n    {building_block,bb,application,app}\n      building_block (bb)\n                          Execute a building block.\n      application (app)   Execute an application.\n\n  optional arguments:\n    -h, --help            show this help message and exit\n  ```\n\n  - In particular for building blocks:\n\n    ```shell\n    $ permedcoe execute building_block -h\n    usage: permedcoe execute building_block [-h] name [parameters ...]\n\n    positional arguments:\n      name        Building Block to execute\n      parameters  Building Block parameters (default: None)\n\n    options:\n      -h, --help  show this help message and exit\n    ```\n\n    Specifying the particular building block to execute (must be installed), provides more detailed information:\n\n    ```shell\n    $ permedcoe execute building_block MaBoSS_BB -h\n    usage: permedcoe [-h] [-c CONFIG] [-d] [-l {debug,info,warning,error,critical}] [--tmpdir TMPDIR]\n                 [--processes PROCESSES] [--gpus GPUS] [--memory MEMORY] [--mount_points MOUNT_POINTS]\n                 {default,sensitivity} ...\n\n      This building block uses MaBoSS to screen all the possible knockouts of a given Boolean model. It\n      produces a candidate gene list formatted as a text file (single gene per row). More information on\n      MaBoSS can be found in [Stoll G. et al. (2017)](https://academic.oup.com/bioinformatics/article-\n      lookup/doi/10.1093/bioinformatics/btx123) and in the [MaBoSS GitHub\n      repository](https://github.com/maboss-bkmc/MaBoSS-env-2.0).\n\n      positional arguments:\n        {default,sensitivity}\n\n      options:\n        -h, --help            show this help message and exit\n        -c CONFIG, --config CONFIG\n                              (CONFIG) Configuration file path\n        -d, --debug           Enable Building Block debug mode. Overrides log_level\n        -l {debug,info,warning,error,critical}, --log_level {debug,info,warning,error,critical}\n                              Set logging level\n        --tmpdir TMPDIR       Temp directory to be mounted in the container\n        --processes PROCESSES\n                              Number of processes for MPI executions\n        --gpus GPUS           Requirements for GPU jobs\n        --memory MEMORY       Memory requirement\n        --mount_points MOUNT_POINTS\n                              Comma separated alias:folder to be mounted in the container\n\n    ```\n\n  - In particular for building blocks:\n\n    ```shell\n    $ permedcoe execute application -h\n    usage: permedcoe execute application [-h] [-w {none,pycompss,nextflow,snakemake}]\n                                        [-f FLAGS [FLAGS ...]]\n                                        name [parameters [parameters ...]]\n\n    positional arguments:\n      name                  Application to execute\n      parameters            Application parameters (default: None)\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      -w {none,pycompss,nextflow,snakemake}, --workflow_manager {none,pycompss,nextflow,snakemake}\n                            Workflow manager to use (default: none)\n      -f FLAGS [FLAGS ...], --flags FLAGS [FLAGS ...]\n                            Workflow manager flags (default: None)\n    ```\n\n#### Option template:\n\n- It available to create a skeleton of a building block or an application:\n\n  ```shell\n  $ permedcoe template -h\n  usage: permedcoe template [-h] [-t {all,pycompss,nextflow,snakemake}]\n                            {bb,building_block,app,application} name\n\n  positional arguments:\n    {bb,building_block,app,application}\n                          Creates a Building Block or Application template.\n    name                  Building Block or Application name.\n\n  optional arguments:\n    -h, --help            show this help message and exit\n    -t {all,pycompss,nextflow,snakemake}, --type {all,pycompss,nextflow,snakemake}\n                          Application type. (default: all)\n  ```\n\n#### Option deploy:\n\n- It available to deploy an existing Building Block or Workflow in a **local machine (e.g. laptop)**:\n\n  ```shell\n  $ permedcoe deploy -h\n  usage: permedcoe deploy [-h] {building_block,bb,workflow,wf} ...\n\n  positional arguments:\n    {building_block,bb,workflow,wf}\n      building_block (bb)\n                          A specific building block.\n      workflow (wf)       A specific workflow.\n\n  options:\n    -h, --help            show this help message and exit\n  ```\n\nFor the deployment in supercomputers, please contact PerMedCoE: <https://permedcoe.eu/contact/>.\n\n### Public API\n\nThe `permedcoe` package provides a set of public decorators, parameter type definition and functions to be used in the Building Block implementation.\n\n- Public decorators:\n\n    ```python\n    from permedcoe import container\n    from permedcoe import constraint\n    from permedcoe import binary\n    from permedcoe import mpi\n    from permedcoe import task\n    ```\n\n- Parameter type definition:\n\n    ```python\n    from permedcoe import Type\n    from permedcoe import FILE_IN\n    from permedcoe import FILE_OUT\n    from permedcoe import FILE_INOUT\n    from permedcoe import DIRECTORY_IN\n    from permedcoe import DIRECTORY_OUT\n    from permedcoe import DIRECTORY_INOUT\n    from permedcoe import StdIOStream\n    from permedcoe import STDIN\n    from permedcoe import STDOUT\n    from permedcoe import STDERR\n    ```\n\n- Functions:\n\n    ```python\n    from permedcoe import get_environment\n    from permedcoe import set_debug\n    from permedcoe import invoker\n    ```\n\n- Classes:\n\n    ```python\n    from permedcoe import Arguments\n    ```\n\n### Uninstall\n\nUninstall can be done as usual `pip` packages:\n\nThere are two ways to uninstall this package, that depends on the way that it was installed (from Pypi or using `install.sh`):\n\n\n- From Pypi:\n\n  ```shell\n  pip uninstall permedcoe\n  ```\n\n  or more specifically:\n\n  ```shell\n  python3 -m pip uninstall permedcoe\n  ```\n\n- From manual installation (using `install.sh`):\n\n  ```shell\n  ./uninstall.sh\n  ```\n\n  And then the folder can be cleaned as well using the `clean.sh` script.\n\n  ```shell\n  ./clean.sh\n  ```\n\n## Developer instructions\n\n### Building block\n\nIf you are willing to implement your Building Block (BB), check the following repositories,\nwhere you will find documentation, tutorials, and BB/application samples:\n\n- [Documentation](https://permedcoe.readthedocs.io/en/latest/)\n- [Tutorial](https://permedcoe.readthedocs.io/en/latest/04_creating/04_tutorial/tutorial.html)\n- [basic_application](https://github.com/PerMedCoE/basic_application)\n- [Lysozyme_in_water](https://github.com/PerMedCoE/Lysozyme_in_water)\n\n## License\n\n[Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)\n\n## Contact\n\n<https://permedcoe.eu/contact/>\n\nThis software has been developed for the [PerMedCoE project](https://permedcoe.eu/), funded by the European Commission (EU H2020 [951773](https://cordis.europa.eu/project/id/951773)).\n\n![](https://permedcoe.eu/wp-content/uploads/2020/11/logo_1.png \"PerMedCoE\")\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "This package provides the common interface for the Building Blocks.",
    "version": "0.0.10",
    "split_keywords": [
        "permedcoe"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5fbb154b8136dcc58bd9336560928efc036721017dac77fd5239acb2d8d84b27",
                "md5": "c9836f2f906e0e015042e5a9fc31bc0b",
                "sha256": "39a5fa04ce408fb5037a66cb410bb889c8b580ae927f511dd4cbb7d21d0a8204"
            },
            "downloads": -1,
            "filename": "permedcoe-0.0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "c9836f2f906e0e015042e5a9fc31bc0b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6, <4",
            "size": 33081,
            "upload_time": "2023-03-30T13:53:55",
            "upload_time_iso_8601": "2023-03-30T13:53:55.175898Z",
            "url": "https://files.pythonhosted.org/packages/5f/bb/154b8136dcc58bd9336560928efc036721017dac77fd5239acb2d8d84b27/permedcoe-0.0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-30 13:53:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "PerMedCoE",
    "github_project": "permedcoe",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "permedcoe"
}
        
Elapsed time: 0.07147s