Sign inSign up

zhangzeyu/biore

By zhangzeyu

•Updated over 3 years ago

Biomedical Relation Extraction Tool

Image
Machine learning & AI
0

369

zhangzeyu/biore repository overview

⁠Biomedical relation extraction

docker version

BIORE is a relation extraction tool including 5 fine-tuned models (semantic 'type', 'typecode', 'group', 'groupabb', 'noentity') baesd on PubMedBERT with task-specific continued pre-training to extract relations between key entities from biomedical literatures.


⁠Quick Start

⁠Docker and nvidia-docker installation

If you don't have docker, you should Install Docker⁠ and nvidia-docker⁠ (Optional for GPU).

⁠Pull BIORE image from Docker Hub⁠
CPU: docker pull zhangzeyu/biore:cpu
GPU: docker pull zhangzeyu/biore:gpu
⁠Setup

Start BIORE container:

CPU:

docker run -d --name=biore -it -v ~/biore:/root/biore -p 8888:8888 --ipc=host zhangzeyu/biore:cpu jupyter lab --no-browser --ip=0.0.0.0 --allow-root --NotebookApp.token= --notebook-dir='/root'

GPU:

docker run -d --name=biore --runtime=nvidia -it -v ~/biore:/root/biore -p 8888:8888 --ipc=host zhangzeyu/biore:gpu jupyter lab --no-browser --ip=0.0.0.0 --allow-root --NotebookApp.token= --notebook-dir='/root'

This will create a empty folder ~/biore from the host visible as /root/biore in the container, you can upload the pmid list file or NERed text data in PubTator format here. Such isolation reduces the chances of your containerized experiments overwriting or using wrong data.

⁠Relation extracion usage

Login Jupyter lab at "host ip":8888 and open a terminal.

bin/bash
cd /root/biore

$ python

(optional) Get NERed text data from PubTator by pmids of interest, a folder named 'import' will be automatically generated:
Input: a file containing a column of pmids.
>>> from pmid2pubtator import *
>>> pmid2pubtator('input file')

Perform relation extraction on NERed text data in PubTator format:
Input: a folder containing PubTator format txt file.
>>> from bre_pubtator import *
>>> bre_pubtator('input folder','select model')

⁠Citation

Zhang Z, Fang M, Wu R, et al. Large-Scale Biomedical Relation Extraction Across Diverse Relation Types: Model Development and Usability Study on COVID-19 [J]. J Med Internet Res, 2023, 25: e48115.

⁠Licensing

BIORE is MIT licensed.

Tag summary

Content type

Image

Digest

sha256:46f700ef2…

Size

2.1 GB

Last updated

over 3 years ago

docker pull zhangzeyu/biore