This is a library for computing PCA components and scores from extracted mouse movies. Use this to compute features for modeling.
Latest version is 0.3.0
Below are the commands/functionality that moseq2-pca currently affords. They are accessible via CLI or Jupyter Notebook in moseq2-app.
Usage: moseq2-pca [OPTIONS] COMMAND [ARGS]...
Options:
--version Show the version and exit. [default: False]
--help Show this message and exit. [default: False]
Commands:
apply-pca Computes PCA Scores of extraction data given a...
clip-scores Clips specified number of frames from PCA scores at...
compute-changepoints Computes the Model-Free Syllable Changepoints based...
train-pca Trains PCA on all extracted results (h5 files) in...
clip-scores Clips specified number of frames from PCA scores at the beginning or end
Run any command with the --help
flag to display all available options and their descriptions.
MoSeq2 uses sphinx
to generate the documentation in HTML and PDF forms. To install sphinx
, follow the commands below:
pip install sphinx==3.0.3 sphinx_click==2.5.0
pip install sphinx-rtd-theme
pip install rst2pdf
All documentation regarding moseq2-extract can be found in the Documentation.pdf
file in the root directory,
an HTML ReadTheDocs page can be generated via running the make html
in the docs/
directory.
To generate a PDF version of the documentation, simply run make pdf
in the docs/
directory.
In order to use this package you must have already extracted your data via moseq2-extract.
If you aggregated your results into a single folder aggregate_results/
, use that directory as your input directory
for the train-pca
command.
It is also recommended to have also already generated a moseq2-index.yaml
file to store the path to your pca_scores
file as well.
- The index file is generated when aggregating the results in moseq2-extract
If you would like to contribute, fork the repository and issue a pull request.