Scripts

These scripts are written to accomplish several common analysis tasks and illustrate the use of library functions. They typically take a JSON file with a format defined by its argschema parameters as their input.

Sparse PCA

Reducing the dimensionality of standardized electrophysiology data sets using sparse principal component analysis (sPCA).

run_spca_fit

Script to run sparse principal component analysis on electrophysiology feature vectors.

run_existing_spca_on_new_data

Script to apply an existing set of sPCA loadings to a new data set.

Dual-modality clustering

Clustering with both electrophysiology and morphology data at the same time.

run_ephys_morph_clustering

Script to cluster on combined electrophysiology and morphology data.

run_refine_unstable_coclusters

Script to merge cells from unstable clusters into the most similar stable ones.

Electrophysiology-only clustering

The electrophysiology clustering workflow to define e-types (as in Gouwens et al. (2019)) can be run with the included bash script. This calls a set of R scripts and Python scripts using a common input configuration file (described on the linked page).

The Python scripts included in this package are listed below:

run_post_r_merging

Script for determining how many GMM components to merge.

run_merge_unstable_clusters

Script for merging unstable clusters into stable ones.

Other utility scripts

Other scripts to perform various one-off tasks.

run_combined_tsne

Script to generate t-SNE coordinates using two electrophysiology sPCA files.

run_joint_ephys_morph_tsne

Script to generate t-SNE coordinates using electrophysiology and morphological features.

run_rf_prediction

Script to predict type labels for new data using a random forest classifier and training data.