NeuroStatX is a command-line toolbox to perform statistical analysis on neuroscience data. It has been developed mainly as part of my PhD project, which aims to understand the relationship between the brain, cognition, and behavior; hence, the focus on neuroscience data. As my project goes forward, new functionalities and scripts will be added. Contributions are welcome!
Note
NeuroStatX also offers a strong testing infrastructure to ensure robust and reproducible results when applicable. Unit tests are already implemented for most functions, and CLI scripts are tested to ensure proper execution.
Warning
It is highly recommended to install neurostatx into a python virtual
environment. To do so, please follow these steps:
pipx install virtualenv
# Set up the virtualenv.
virtualenv --python 3.11 /path/to/your/destination/folder/
# Activate your newly created environment
source /path/to/your/destination/folder/bin/activateThen, to install through PyPI, simply use pip:
pip install neurostatxThis library uses poetry to manage dependencies. To install it, use pipx with the following command:
pip install pipx
pipx ensurepath
pipx install poetryWarning
Poetry is creating is own virtual environment by default. Therefore, be sure to deactivate all of your virtual environment before continuing on with the installation.
To install NeuroStatX and all of its dependencies, run this set of commands:
git clone https://github.com/gagnonanthony/NeuroStatX.git
cd NeuroStatX/
poetry installNote
The poetry install command will install all required dependencies as well
as setting up a virtual environment. To access the library environment, use:
poetry shell from the project root directory. This will activate the
project's python environment in your current shell.
To access your environment from other directories, use this command (from
within the project directory), you might need to modify ~/.bashrc to your
specific login shell (ex: MacOS sometimes uses zsh, so ~/.zshrc or
~/.zprofile):
ENVPATH=$(poetry env info --path)
echo "export NeuroStatXPATH=${ENVPATH}" >> ~/.bashrcRestart your terminal. You should now be able to activate the poetry
environment by using: source $NeuroStatXPATH/bin/activate from anywhere.
Important
Graphviz is an external dependencies required to visualize semplot from the
semopy package used within NeuroStatX. If you do not have Graphviz
installed on your machine, please run the following if you are on Linux
sudo apt get graphviz or brew install graphviz if you are on MacOS.
