shMoSeq

Paper

GitHub

License

State-based hierarchical MoSeq (shMoSeq) is a method for discovering high-level states in animal behavior. Given low-level behavior labels (e.g. MoSeq syllables), shMoSeq fits a hierarchical hidden Markov model to identify how behaviors are clustered over time.

For questions and discussion, join the MoSeq Slack workspace.

Installation

Note

If using Windows, make sure to run all the commands below from an Anaconda Prompt.

Note

State moseq supports the same platforms as jax. That is, it supports CPU and GPU installations on linux systems, and CPU installations on MacOS and Windows systems. GPU on WSL2 is considered ‘experimental’.

Create a new conda environment with python 3.10:

conda create -n shmoseq python=3.10
conda activate shmoseq

Then use pip to install the version of state moseq that you want:

pip install state-moseq # CPU only
pip install state-moseq[cuda] # NVIDIA GPU

To run state-moseq in jupyter, either launch jupyterlab directly from the shmoseq environment or register a globally-accessible jupyter kernel as follows:

python -m ipykernel install --user --name=shmoseq

Pedagogical tutorials