Skip to content

ZuoLabUCSC/moseq2-pca

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MoSeq2-PCA

Build Status

codecov

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

Features

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...

CLI Exclusive Function

  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.

Documentation

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.

Prerequisites

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

Example Outputs

Mouse Principal Components

Rat Principal Components

Scree Plot

Model-free Changepoint Distribution

Contributing

If you would like to contribute, fork the repository and issue a pull request.

About

v0.4.0 for moseq2_v021

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published