This is a web application for predicting drug-like compounds that may induce cholestasis. The methodology is based on the article we published: https://pubs.acs.org/doi/10.1021/acs.jcim.3c00945.
Components for building the application:
-
The application itself (streamchol.py)
-
The pickle files for the individual models
-
Requirements.txt
-
Dockerfile
Additional files for testing:
-
Training series (final_predictions_app.csv)
-
A test set (test.xlsx)
A docker container (https://www.docker.com/), fully configured can be downloaded from DockerHub and installed using:
docker run -d -p 8501:8501 parodbe/streamchol_app
Then, the StreamChol will be accesible from a web browser at address http://localhost:8501
These steps will guide you through running the app directly on your local machine without Docker.
Ensure your system meets the following requirements:
- R: Version 4.0 or higher
- Rtools (Windows only)
- Microsoft Build Tools (Windows only)
- Python: Version 3.8 or higher (if applicable)
- Properly configured environment variables (details below)
- Download the latest version of R from CRAN.
- Install R:
- macOS: Drag the R package to the Applications folder.
- Windows: Run the
.exe
installer and follow the on-screen instructions. - Linux: Use your package manager:
sudo apt update sudo apt install r-base
- Verify the installation:
R --version
- Download Rtools from Rtools for Windows.
- Install Rtools and ensure that its path is added to your system environment variables.
- Verify the installation:
R CMD config --ldflags
- Download and install Microsoft Build Tools from Visual Studio Build Tools.
- During installation, select the following:
- Workload: "Desktop Development with C++".
- Individual Components:
- MSVC Compiler
- Windows 10/11 SDK
- CMake tools (optional but recommended)
- Verify the installation:
cl
- Add the R installation directory to your
PATH
:- Example:
C:\Program Files\R\R-4.4.2\bin\x64
- Example:
- Verify:
R --version
- Add the Rtools directory to your
PATH
:- Example for Rtools44:
C:\rtools44\usr\bin C:\rtools44\x86_64-w64-mingw32.static.posix\bin
- Example for Rtools44:
- Verify:
gcc --version
- Add the directory containing
cl.exe
to yourPATH
:- Example:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\<version>\bin\Hostx64\x64
- Example:
- Verify:
cl
Run the following in an R console:
install.packages(c("httk", "dplyr", "stringr"))
# Add any other packages your app requires
If your app uses Python, install the required libraries:
-
Install Python:
python --version
Make sure Python is in your
PATH
. -
Install dependencies:
pip install -r requirements.txt
-
To activate in the app.py file the following steps to set the R environment:
os.environ["R_HOME"] = 'C:/Program Files/R/R-4.4.12' os.environ["PATH"] = 'C:/Program Files/R/R-4.4.2/bin/x64' + ";" + os.environ["PATH"]
-
Run streamlit app.py
http://localhost:8501
The homepage design of StreamChol was inspired by SerotoninAI (Łapińska et al., 2023). Specifically, the code from lines 72 to 120. We acknowledge its influence in guiding our initial interface layout, while all functionalities, objectives, and workflows of StreamChol were developed separately.