Metadata-Version: 2.1
Name: BRAD-Chat
Version: 0.0.3
Summary: This package connects large language models with bioinformatics workflows.
Author: Joshua Pickard
Author-email: jpic@umich.edu
Requires-Python: >=3.10,<3.13
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: aiohappyeyeballs (==2.4.3)
Requires-Dist: aiohttp (==3.10.9)
Requires-Dist: aiosignal (==1.3.1)
Requires-Dist: annotated-types (==0.7.0)
Requires-Dist: anyio (==4.6.0)
Requires-Dist: appdirs (==1.4.4)
Requires-Dist: asgiref (==3.8.1)
Requires-Dist: asttokens (==2.4.1)
Requires-Dist: attrs (==24.2.0)
Requires-Dist: backoff (==2.2.1)
Requires-Dist: bcrypt (==4.2.0)
Requires-Dist: beautifulsoup4 (==4.12.3)
Requires-Dist: biopython (==1.84)
Requires-Dist: blinker (==1.8.2)
Requires-Dist: boto3 (==1.35.37)
Requires-Dist: botocore (==1.35.37)
Requires-Dist: bs4 (==0.0.2)
Requires-Dist: build (==1.2.2.post1)
Requires-Dist: cachelib (==0.9.0)
Requires-Dist: cachetools (==5.5.0)
Requires-Dist: certifi (==2024.8.30)
Requires-Dist: charset-normalizer (==3.4.0)
Requires-Dist: chroma-hnswlib (==0.7.3)
Requires-Dist: chromadb (==0.5.1)
Requires-Dist: click (==8.1.7)
Requires-Dist: cohere (==5.9.0)
Requires-Dist: colorama (==0.4.6)
Requires-Dist: coloredlogs (==15.0.1)
Requires-Dist: colorlog (==6.8.2)
Requires-Dist: comm (==0.2.2)
Requires-Dist: contourpy (==1.3.0)
Requires-Dist: cssselect (==1.2.0)
Requires-Dist: cycler (==0.12.1)
Requires-Dist: dataclasses-json (==0.6.7)
Requires-Dist: decorator (==5.1.1)
Requires-Dist: deprecated (==1.2.14)
Requires-Dist: distro (==1.9.0)
Requires-Dist: durationpy (==0.9)
Requires-Dist: executing (==2.1.0)
Requires-Dist: fake-useragent (==1.5.1)
Requires-Dist: fastapi (==0.115.0)
Requires-Dist: fastavro (==1.9.7)
Requires-Dist: filelock (==3.16.1)
Requires-Dist: flask (==3.0.3)
Requires-Dist: flask-caching (==2.3.0)
Requires-Dist: flatbuffers (==24.3.25)
Requires-Dist: fonttools (==4.54.1)
Requires-Dist: frozenlist (==1.4.1)
Requires-Dist: fsspec (==2024.9.0)
Requires-Dist: gget (==0.28.6)
Requires-Dist: google-auth (==2.35.0)
Requires-Dist: googleapis-common-protos (==1.65.0)
Requires-Dist: greenlet (==3.1.1)
Requires-Dist: grpcio (==1.66.2)
Requires-Dist: h11 (==0.14.0)
Requires-Dist: httpcore (==1.0.6)
Requires-Dist: httptools (==0.6.1)
Requires-Dist: httpx (==0.27.2)
Requires-Dist: httpx-sse (==0.4.0)
Requires-Dist: huggingface-hub (==0.25.2)
Requires-Dist: humanfriendly (==10.0)
Requires-Dist: idna (==3.10)
Requires-Dist: importlib-metadata (==8.4.0)
Requires-Dist: importlib-resources (==6.4.5)
Requires-Dist: ipython (==8.28.0)
Requires-Dist: ipywidgets (==8.1.5)
Requires-Dist: itsdangerous (==2.2.0)
Requires-Dist: jedi (==0.19.1)
Requires-Dist: jinja2 (==3.1.4)
Requires-Dist: jiter (==0.6.1)
Requires-Dist: jmespath (==1.0.1)
Requires-Dist: joblib (==1.4.2)
Requires-Dist: jsonpatch (==1.33)
Requires-Dist: jsonpointer (==3.0.0)
Requires-Dist: jupyterlab-widgets (==3.0.13)
Requires-Dist: kiwisolver (==1.4.7)
Requires-Dist: kubernetes (==31.0.0)
Requires-Dist: langchain (>=0.3.7,<0.4.0)
Requires-Dist: langchain-chroma (>=0.1.4,<0.2.0)
Requires-Dist: langchain-community (>=0.3.7,<0.4.0)
Requires-Dist: langchain-nvidia-ai-endpoints (>=0.3.5,<0.4.0)
Requires-Dist: langchain-openai (>=0.2.9,<0.3.0)
Requires-Dist: langchain-text-splitters (>=0.3.2,<0.4.0)
Requires-Dist: langsmith (==0.1.132)
Requires-Dist: lxml (==5.3.0)
Requires-Dist: lxml-html-clean (==0.3.1)
Requires-Dist: markdown-it-py (==3.0.0)
Requires-Dist: markupsafe (==3.0.1)
Requires-Dist: marshmallow (==3.22.0)
Requires-Dist: matplotlib (==3.9.2)
Requires-Dist: matplotlib-inline (==0.1.7)
Requires-Dist: mdurl (==0.1.2)
Requires-Dist: mmh3 (==5.0.1)
Requires-Dist: monotonic (==1.6)
Requires-Dist: mpmath (==1.3.0)
Requires-Dist: multidict (==6.1.0)
Requires-Dist: mypy-extensions (==1.0.0)
Requires-Dist: mysql-connector-python (==8.0.29)
Requires-Dist: networkx (==3.3)
Requires-Dist: numpy (==1.26.4)
Requires-Dist: oauthlib (==3.2.2)
Requires-Dist: onnxruntime (==1.19.2)
Requires-Dist: openai (>=1.55.0,<2.0.0)
Requires-Dist: opentelemetry-api (==1.27.0)
Requires-Dist: opentelemetry-exporter-otlp-proto-common (==1.27.0)
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc (==1.27.0)
Requires-Dist: opentelemetry-instrumentation (==0.48b0)
Requires-Dist: opentelemetry-instrumentation-asgi (==0.48b0)
Requires-Dist: opentelemetry-instrumentation-fastapi (==0.48b0)
Requires-Dist: opentelemetry-proto (==1.27.0)
Requires-Dist: opentelemetry-sdk (==1.27.0)
Requires-Dist: opentelemetry-semantic-conventions (==0.48b0)
Requires-Dist: opentelemetry-util-http (==0.48b0)
Requires-Dist: orjson (==3.10.7)
Requires-Dist: overrides (==7.7.0)
Requires-Dist: packaging (==23.2)
Requires-Dist: pandas (==2.2.3)
Requires-Dist: parameterized (==0.9.0)
Requires-Dist: parse (==1.20.2)
Requires-Dist: parso (==0.8.4)
Requires-Dist: pexpect (==4.9.0)
Requires-Dist: pillow (==10.4.0)
Requires-Dist: posthog (==3.7.0)
Requires-Dist: prompt-toolkit (==3.0.48)
Requires-Dist: propcache (==0.2.0)
Requires-Dist: protobuf (==4.25.5)
Requires-Dist: ptyprocess (==0.7.0)
Requires-Dist: pure-eval (==0.2.3)
Requires-Dist: pyasn1 (==0.6.1)
Requires-Dist: pyasn1-modules (==0.4.1)
Requires-Dist: pydantic (==2.9.2)
Requires-Dist: pydantic-core (==2.23.4)
Requires-Dist: pydantic-settings (==2.5.2)
Requires-Dist: pyee (==11.1.1)
Requires-Dist: pygments (==2.18.0)
Requires-Dist: pyparsing (==3.1.4)
Requires-Dist: pypdf (==5.0.1)
Requires-Dist: pypika (==0.48.9)
Requires-Dist: pyppeteer (==2.0.0)
Requires-Dist: pyproject-hooks (==1.2.0)
Requires-Dist: pyquery (==2.0.1)
Requires-Dist: python-dateutil (==2.9.0.post0)
Requires-Dist: python-dotenv (==1.0.1)
Requires-Dist: pytz (==2024.2)
Requires-Dist: pyyaml (==6.0.2)
Requires-Dist: regex (==2024.9.11)
Requires-Dist: requests (==2.32.3)
Requires-Dist: requests-html (==0.10.0)
Requires-Dist: requests-mock (==1.12.1)
Requires-Dist: requests-oauthlib (==2.0.0)
Requires-Dist: requests-toolbelt (==1.0.0)
Requires-Dist: rich (==13.9.2)
Requires-Dist: rsa (==4.9)
Requires-Dist: s3transfer (==0.10.3)
Requires-Dist: safetensors (==0.4.5)
Requires-Dist: scikit-learn (==1.5.2)
Requires-Dist: scipy (==1.14.1)
Requires-Dist: seaborn (==0.13.2)
Requires-Dist: semantic-router (==0.0.46)
Requires-Dist: sentence-transformers (==3.1.1)
Requires-Dist: shellingham (==1.5.4)
Requires-Dist: six (==1.16.0)
Requires-Dist: sniffio (==1.3.1)
Requires-Dist: soupsieve (==2.6)
Requires-Dist: sqlalchemy (==2.0.35)
Requires-Dist: stack-data (==0.6.3)
Requires-Dist: starlette (==0.38.6)
Requires-Dist: sympy (==1.13.3)
Requires-Dist: tabulate (==0.9.0)
Requires-Dist: tenacity (==8.5.0)
Requires-Dist: threadpoolctl (==3.5.0)
Requires-Dist: tiktoken (==0.8.0)
Requires-Dist: tokenizers (==0.20.0)
Requires-Dist: torch (==2.2.2)
Requires-Dist: tqdm (==4.66.5)
Requires-Dist: traitlets (==5.14.3)
Requires-Dist: transformers (==4.45.2)
Requires-Dist: typer (==0.12.5)
Requires-Dist: types-requests (==2.31.0.6)
Requires-Dist: types-urllib3 (==1.26.25.14)
Requires-Dist: typing-extensions (==4.12.2)
Requires-Dist: typing-inspect (==0.9.0)
Requires-Dist: tzdata (==2024.2)
Requires-Dist: urllib3 (==1.26.20)
Requires-Dist: uvicorn (==0.31.1)
Requires-Dist: uvloop (==0.20.0)
Requires-Dist: w3lib (==2.2.1)
Requires-Dist: watchfiles (==0.24.0)
Requires-Dist: wcwidth (==0.2.13)
Requires-Dist: websocket-client (==1.8.0)
Requires-Dist: websockets (==10.4)
Requires-Dist: werkzeug (==3.0.4)
Requires-Dist: widgetsnbextension (==4.0.13)
Requires-Dist: wrapt (==1.16.0)
Requires-Dist: yarl (==1.14.0)
Requires-Dist: zipp (==3.20.2)
Description-Content-Type: text/markdown

# BRAD: Bioinformatics Digital Assistant

Please see the projects main page available [here!](https://brad-bioinformatics-retrieval-augmented-data.readthedocs.io/_/downloads/en/latest/pdf/)

## Architecture
<div align="center">
  <img width="635" alt="brad-dl-vision" src="https://github.com/user-attachments/assets/da7a1722-28ca-44e8-b45f-4350b7b29305">
</div>

## Installation

Brad can be installed directly from pip:

```
pip install -U BRAD-Chat
```
<br>
<br>

## Web Server deployment

BRAD can be deployed as a web server to interact and experiment with its functionalities.

The BRAD web server is written with react.js for the frontend and flask backend.

The recommended method is to use docker.



### Docker instructions
=======
## [BRAD-Examples](https://github.com/Jpickard1/BRAD-Examples/tree/main)

- **GUI Tutorial**  
  A simple tutorial for how to use BRAD's Graphical User Interface.

- [**Hello World**](https://github.com/Jpickard1/BRAD-Examples/blob/main/Hello-World/Example-0.ipynb)  
  A simple "Hello, World!" example to help you understand the basics of using the BRAD chatbot.

- [**Search and Retrieval-Augmented Generation (RAG)**](https://github.com/Jpickard1/BRAD-Examples/blob/main/RAG-SCRAPE/Example-1.ipynb)  
  Demonstrates how to use BRAD to scrape online data and integrate it into a Retrieval-Augmented Generation pipeline.

- [**Using the Scanpy Package with BRAD**](https://github.com/Jpickard1/BRAD-Examples/blob/main/Scanpy/Example-2.ipynb)  
  Explores how BRAD can streamline workflows involving **Scanpy**, including preprocessing and visualization of single-cell data.

- [**Biomarker Selection Pipeline**](https://github.com/Jpickard1/BRAD-Examples/blob/main/DMD-Biomarkers/Example-3.ipynb)  
  Illustrates how BRAD can assist in selecting biomarkers from datasets using machine learning and bioinformatics tools.

## Development

#### Docker
The Docker build can be used to deploy brad without having to install packages manually.
after installing either docker desktop or docker engine [docker intsallation](https://docs.docker.com/desktop/), you can follow one of the following commands to install and run BRAD


1. Use with docker compose:
```
cd deployment
docker compose up -d
```

2. OR with just docker 

```
docker run -e OPENAI_API_KEY=your_open_ai_key -e  PYDANTIC_SKIP_VALIDATING_CORE_SCHEMAS='True' -p 5001:5000 -p 3000:3000  brad:full_frontend
```

3. To build the dockerfile yourself:

```
docker build -t brad:local .
```

Then proceed to http://localhost:3000 to view the frontend
<br>
<br>

### Development Environment

To contribute or make your own modifications to BRAD, A separate development environment needs to be set up. Follow the instructions below to set up your environment

Download the BRAD repository
```
git clone https://github.com/Jpickard1/BRAD.git
cd BRAD
```
<br>

Update ./BRAD/config/config.json to your preference
( specifically update the log_path key to point somewhere on your local system )
<br>

Make sure python is installed and then install the requirements
>Our recommendation is to use conda and setup a separate conda environment to ensure package discrepencies

```
pip install -r requirements_frozen.txt
```  
<br>

Install node=v20.18.0 and npm=10.8.2 from the (website)[https://nodejs.org/en/download/package-manager]  or by using nvm
>Our recommendation is to use nvm
```
https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.nvm/nvm.sh \
nvm install 20.18.0 \
nvm use 20.18.0

# install the necessary packages
npm install --prefix ./brad-chat
```

Start BRAD backend with 
```
PYDANTIC_SKIP_VALIDATING_CORE_SCHEMAS=True OPENAI_API_KEY=<your_open_api_key> flask --app app run --host=0.0.0.0 --port=5000
```

Start BRAD frontend with 
```
cd brad-chat
npm start
```

This will start BRAD Backend at - http://localhost:3000  
And the BRAD frontend at - http://localhost:5000

<br>
<br>

### Documentation

To build the projects documentation in the ReadTheDocs html formatting, in the `docs/` directory, run the command `make html`. This will populate the `docs/build/html` directory with the webpages. The `docs/build/` directory is excluded from git but *will* automatically be built when pushing to main.

During the build, the `tutorials/` directory is automatically pulled in to the source by copying all jupyter notebooks. These are included in the user guide section of the documentation.

To remove the documentation from `docs/build/` run `make clean` from the same directory where you built it.

<br>

## Cite Us

```
@article{pickard2024bioinformatics,
  title={Language Model Powered Digital Biology},
  author={Pickard, Joshua and Choi, Marc Andrew and Oliven, Natalie and
          Stansbury, Cooper and Cwycyshyn, Jillian and Galioto, Nicholas
          and Gorodetsky, Alex and Velasquez, Alvaro and Rajapakse, Indika},
  journal={arXiv preprint arXiv:2409.02864},
  url={https://arxiv.org/abs/2409.02864},
  year={2024}
}
```

