Giter Club home page Giter Club logo

ehr-phenolyzer's Introduction

EHR-phenolyzer

EHR-Phenolyzer is a python pipeline to automatically translate raw clinical notes into meaningfully ranked candidate causal genes. It might greatly shorten the time for disease causal genes identification and discovery.

PREREQUISITES

  1. Python 2.7 or Python 3.6
  2. metamap16.BINARY.Linux (2016) (needed only if choosing MetaMap as NLP processor)
  3. NCBO Annotator API KEY (needed only if choosing NCBO annotator as NLP processor)
  4. phenolyzer
  5. linux environment

INSTALLATION

Install python modules

This project manages a Python virtual environment with pipenv. If you don't have pipenv in your local environment, you may install it with:

$ pip install pipenv

Then you can create an exact copy of this project's dependencies using:

$ pipenv install 

hint: the virtual environment is build on Python 3.6, you will need to have Python 3.6 in your local environment. Otherwise, you may download it from https://www.python.org/downloads/

Install python modules manually

Alternatively, if you have trouble with pipenv or simply do not want to use it. You may also install the dependencies manually using:

$ pip install <package_name> 

The list of dependencies is specified in the packages section inside Pipfile.

Install MetaMap (needed only if choosing MetaMap as NLP)

  1. register at UMLS Terminology Services and obtain appropriate license (https://uts.nlm.nih.gov//license.html)
  2. download "MetaMap 2016V2 Linux Version" from https://metamap.nlm.nih.gov/MainDownload.shtml
  3. following the MetaMap installation instruction (https://metamap.nlm.nih.gov/Installation.shtml)
  4. export MetaMap executable binary to your linux system PATH (export PATH="/path/to/public_mm/bin:$PATH")

Get NCBO API Key (needed only if choosing NCBO annotator as NLP)

  1. register a new BioPortal Account (https://bioportal.bioontology.org/accounts/new)
  2. login to your account (https://bioportal.bioontology.org/login)
  3. at the user panel, click your user name at the upper left corner of the banner,and then choose "Account Settings"
  4. create a file named "ncbo.apikey.txt" under EHR-Phenozer lib/ folder ("see example ncbo.apikey.txt.example"), and then copy your API Key to the first line of this file

Get MedLEE XML output (needed only if choosing MedLEE as NLP)

  1. obtain an appropriate license to use MedLEE
  2. analyze clinical notes and generate XML output

Install Phenolyzer

  1. download Phenolyzer through "git clone https://github.com/WGLab/phenolyzer"
  2. install dependencies: Bioperl, Bio::OntologyIO and Graph::Directed
  3. export phenolyzer executable file to your linux system PATH ( export PATH="/path/to/phenolyzer:$PATH")

Install EHR-Phenolyzer

  1. git clone [email protected]:WGLab/EHR-Phenolyzer.git
  2. cd EHR-Phenolyzer
  3. python ehr_phenolyzer.py --help

TEST

python ehr_phenolyzer.py -i example/Kleyner_ANKRD11.txt -p kleyner -n "metamap" > ehr_phenolyzer.log

For more testing examples, please check and run the bash scripts under test/

USAGE

usage: ehr_phenolyzer.py [-h] -i INPUT [-p PREFIX] [-n NLP] [-d OUTDIR] [-k]
                         [-m OMIM] [-x OBO]

Get ranked gene ids based on EHR medical notes

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        medical note file in txt format (in case of using
                        medlee, the input is medlee xml format)
  -p PREFIX, --prefix PREFIX
                        the prefix for the output file
  -n NLP, --nlp NLP     type of NLP (metamap (default),medlee, NCBOannotator)
  -d OUTDIR, --outdir OUTDIR
                        the path to the output folder
  -k, --keeptmp         keep temporary files
  -m OMIM, --omim OMIM  path to the OMIM txt file
  -x OBO, --obo OBO     path to HPO obo file

One step from EHR records to ranked gene list.Before running, please install
Phenolyzer, and get the NLP tools ready.

About Input Data

OMIM data

The source file is available from OMIM as the morbidmap.txt file after you get access to OMIM. The gene names were further extracted from this source file, and the aliases gene names and offical gene names were grouped into one line separated by ",". This file can be found in the folder "db/"

HPO obo format data

The source file was download from http://purl.obolibrary.org/obo/hp.obo. This file can be also found in the folder 'db/'

medical notes file

Medical notes file should be in plain text format, and examples notes files can be found in folder "example/". However, if you use MedLEE as the NLP engine, the input file should be XML file processed by MedLEE.

License Agreement

By using the software, you acknowledge that you agree to the terms below:

For academic and non-profit use, you are free to fork, download, modify, distribute and use the software without restriction.

For commercial use, you are required to contact Columbia Technology Ventures to discuss licensing options.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

ehr-phenolyzer's People

Contributors

gangcai avatar kaichop avatar menggezhao avatar dependabot[bot] 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.