API Reference

This is the API reference of DRCME. If you are interested in running standard analysis tasks, please look at the scripts reference page for more information.

drcme.ephys_morph_clustering: Combined electrophysiology and morphology clustering

The drcme.ephys_morph_clustering module contains functions for performing joint clustering of electrophysiology and morphology data.

Functions

ephys_morph_clustering.clustjaccard(y_true, …)

Calculate Jaccard coefficient

ephys_morph_clustering.coclust_rates(shared, …)

Calculate co-clustering rates between clusters

ephys_morph_clustering.consensus_clusters(results)

Determine consensus clusters from multiple variations

ephys_morph_clustering.gmm_combo_cluster_calls(…)

Add Gaussian mixture model clustering results

ephys_morph_clustering.hc_nn_cluster_calls(…)

Add agglomerative clustering results with connectivity constraints

ephys_morph_clustering.hc_combo_cluster_calls(…)

Add agglomerative hierarchical clustering results

ephys_morph_clustering.refine_assignments(…)

Reassign samples to the best-matched clusters

ephys_morph_clustering.spectral_combo_cluster_calls(…)

Add spectral clustering results

ephys_morph_clustering.subsample_run(…[, …])

Calculate Jaccard coefficients for subsampled clustering runs

drcme.load_data: Data handling of IPFX outputs

The drcme.load_data module contains functions for loading electrophysiology feature vectors processed by the IPFX package, as well as sPCA parameter files. In particular, it loads in HDF5-format files containing feature vectors processed by the run_feature_vector_extraction script.

Functions

load_data.define_spca_parameters(filename)

Load an sPCA parameters file

load_data.load_h5_data(h5_fv_file, params_file)

Load dictionary for sPCA processing from HDF5 file

drcme.post_gmm_merging: Merging Gaussian mixture model components

The drcme.post_gmm_merging module contains functions for merging Gaussian mixture model components together based on an entropy criterion as in Baudry et al. (2010).

Functions

post_gmm_merging.entropy_combi(tau, labels, …)

Merge clusters by entropy criterion and piecewise fit

post_gmm_merging.entropy_specific_merges(…)

Merge set of specified clusters by entropy criterion

post_gmm_merging.fit_piecewise(cumul_merges, …)

Fit entropy vs cumulative merge number with linear piecewise function

post_gmm_merging.order_new_labels(…)

Reorder cluster labels by similarity of centroids

drcme.prediction: Type label prediction

The drcme.prediction module contains wrapper functions for random forest classification.

Functions

prediction.rf_predict(train_df, …[, …])

Predict labels for test_df by random forest classification

drcme.spca: Sparse principal component analysis

The drcme.spca module contains functions for performing sparse principal component analysis.

Functions

spca.consolidate_spca(spca_results[, …])

Combine and z-score individual data set sPCs into single matrix

spca.orig_mean_and_std_for_zscore(…[, …])

Recover mean and standard deviation of z-scored sPCs

spca.select_data_subset(data_for_spca, …)

Select data sets and indices defined by spca_params

spca.spca_on_all_data(data_for_spca, spca_params)

Compute sPCA for multiple data sets with specified parameters

spca.spca_transform_new_data(spca_results, …)

Transform and z-score new data with existing loadings

spca.spca_zht(data, K, para[, type, sparse, …])

Perform sparse principal component analysis

drcme.tsne: t-SNE helper functions

The drcme.tsne module contains wrapper functions for applying t-SNE to the electrophysiology and morphology data.

Functions

tsne.combined_tsne(df_1, df_2[, perplexity, …])

Perform t-SNE on two data sets

tsne.dual_modal_tsne(ephys_df, morph_df[, …])

Perform t-SNE on electrophysiology and morphology data sets