Giter VIP home page Giter VIP logo

mokapapp's Introduction

Moka Panel App (mokapapp)

MokaPapp Logo

mokapapp imports Panel App panels into the Viapath Genetics LIMS system (Moka).

Simply install, create a configuration file and run:

$ mokapapp-import -c config.ini

Features

  • Deactviates any deprecated Panel App panels in the Moka database
  • Builds MokaPanel objects with a unique hash for each panel's green and amber genes, required for import into Moka.
  • Performs data validation checks before import:
    • Are all panel hashes in dbo.Item?
    • Are all panel versions in dbo.Item?
    • Are all panel HGNC IDs in dbo.GenesHGNC_Current?
  • Raises an error if the Moka HGNC snapshot is outdated

Installation

Clone this repository and install with pip (tested on a Linux OS with python v3.6.5):

$ git clone https://github.com/moka-guys/mokapapp.git
$ pip install ./mokapapp

Usage

usage: mokapapp-import [-h] [-c CONFIG] [--logfile LOGFILE] [--head HEAD]

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        A mokapapp config.ini file
  --logfile LOGFILE     A file to write application log outputs
  --head HEAD           An integer limit for the number of PanelApp panels to process

Config file

mokapapp-import requires a config.ini file with Moka database connection details:

# Example config.ini
[mokadb]
server = 10.10.10.10
db = dbname
user = username
password = password

Tests

Unit tests in the tests/ directory are run using pytest. An auth.py file containing test server details must be present in tests/:

# Example auth.py
MOKADB = {
    'server': '10.10.10.100',
    'db': 'database',
    'user': 'username',
    'password': 'password'
}

Once this file has been created run all tests:

$ pytest .

Notes

  • Panel App gene confidence levels are converted to Green, Amber and Red colours as specified in Appendix A p.29 of the Panel App Handbook v5.5.

License

MIT License © 2019 Nana Mensah

mokapapp's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.