-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
381 additions
and
364 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,84 @@ | ||
# Installation instructions | ||
## Setup environment | ||
|
||
Before installing, it is best to use a separate virtual environment for the installation. You can create a conda virtual environment as follows: | ||
|
||
The code can currently only be installed from git source. To install the code, first clone the repository: | ||
``` | ||
git clone git@github.com:bayer-int/phenx.git | ||
conda create -n phenex python=3.12 | ||
``` | ||
Then, change into the directory containing the code: | ||
|
||
If you do not have condas, you can install it by following the instructions `here <https://conda.io/projects/conda/en/latest/user-guide/install/index.html>`\_. | ||
phenx requires Python 3.9 or above. | ||
|
||
To use the virtual environment, activate it: | ||
|
||
``` | ||
cd phenx | ||
conda activate phenex | ||
``` | ||
# User installation | ||
|
||
Use these instructions if you do not plan to change code within phenx. | ||
With condas, sometimes you have explicitly reference python3.12; to avoid this, you can set up an alias: | ||
|
||
It is best to use a separate virtual environment for the installation. You can create a conda virtual environment as follows: | ||
``` | ||
conda create -n phenx python=3.11 | ||
alias python=python3.12 | ||
``` | ||
If you do not have conda, you can install it by following the instructions `here <https://conda.io/projects/conda/en/latest/user-guide/install/index.html>`_. | ||
phenx requires Python 3.9 or above. | ||
|
||
To use the virtual environment, activate it: | ||
## Source installation | ||
|
||
The code can currently only be installed from git source. To install the code, first clone the repository: | ||
|
||
``` | ||
git clone git@github.com:Bayer-Group/PhenEx.git | ||
``` | ||
|
||
Then, change into the directory containing the code: | ||
|
||
``` | ||
conda activate phenx | ||
cd PhenEx | ||
``` | ||
|
||
Use these instructions if you do not plan to change code within PhenEx. | ||
|
||
After activating the virtual environment, install the required dependencies with | ||
|
||
``` | ||
pip install -r requirements.txt | ||
``` | ||
and install phenx with | ||
|
||
and install PhenEx with | ||
|
||
``` | ||
pip install . | ||
``` | ||
Check that the installation has succeeded: | ||
``` | ||
python3.11 -c "import phenx;print(phenx.__version__)" | ||
``` | ||
This will display the installed version of phenx. | ||
|
||
If you wish to use phenx within a Jupyter notebook, you can install the Jupyter kernel with | ||
### Running the tests | ||
|
||
A good way to check your source installation is to run the extensive test suite that PhenEx comes with. You can do so by running: | ||
|
||
``` | ||
python3.11 -m ipykernel install --user --name phenx --display-name "Python (phenx)" | ||
pytest | ||
``` | ||
That's it! Proceed to the :ref:`Demos`. | ||
|
||
# Pip installation | ||
Coming soon! | ||
from the root directory of the project. | ||
|
||
# Docker installation | ||
## Installing Jupyter | ||
|
||
We also support an installation via Docker. You may want to try the Docker installation if you have trouble with the standard installation. | ||
If you wish to use PhenEx within a Jupyter notebook, you can install the Jupyter kernel with | ||
|
||
You can generate a docker image with | ||
``` | ||
docker build -t phenx:latest . | ||
``` | ||
and then run it with | ||
python3.12 -m ipykernel install --user --name phenex --display-name "PhenEx" | ||
``` | ||
docker run --entrypoint /bin/bash -v $(pwd):/phenx -it phenx:latest | ||
``` | ||
This will drop you into a shell inside the docker container with the current directory (i.e. the source code directory) mounted at `/phenx`. | ||
|
||
That's it! Proceed to the [tutorials](tutorials.md). | ||
|
||
## Pip installation | ||
|
||
Coming soon! | ||
|
||
## Check installation | ||
|
||
Check that the installation has succeeded: | ||
|
||
# Running the tests | ||
A good way to check your installation is to run the extensive test suite that phenx comes with. You can do so by running: | ||
``` | ||
pytest | ||
python3.12 -c "import phenex;print(phenex.__version__)" | ||
``` | ||
from the root directory of the project. | ||
|
||
This will display the installed version of PhenEx. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
# My Documentation | ||
# PhenEx Tutorials | ||
|
||
Here is a Jupyter Notebook: | ||
Click on the link below to see the corresponding notebook! | ||
|
||
![Tutorial](CodelistPhenotype_Tutorial.ipynb) | ||
- [Codelist Phenotype](tutorials/phenotypes/CodelistPhenotype_Tutorial.ipynb) | ||
- [Measurement Phenotype](tutorials/phenotypes/MeasurementPhenotype_Tutorial.ipynb) | ||
- [Arithmetic Phenotype](tutorials/phenotypes/ArithmeticPhenotype_Tutorial.ipynb) | ||
- [Logic Phenotype](tutorials/phenotypes/LogicPhenotype_Tutorial.ipynb) |