Companion Data Page
The structure of behavioral variation within a genotype
Zach Werkhoven,
Alyssa Bravin, Kyobi Skutt-Kakaria, Pablo Reimers,
Luisa Pallares, Julien Ayroles, and
Benjamin de Bivort
Department of Organismic and Evolutionary Biology, Harvard University, Cambridge, MA 02138, USA.
** Corresponding author: debivort@oeb.harvard.edu
|
Data files (MATLAB 2018b)
Download a .zip of all these data files. |
decathlon_behavior_data.mat |
Contains data structs with assay behavioral data and descriptive behavior names from all 3
decathlon experiments (inbred Berlin-Kiso x2, outbred NEX x1) at
various stages of preprocessing, merging (two inbred fly experiments), and infilling of missing values. Summary of items:
- D_raw_unfilled - [3 x 1] struct array containing raw, unfilled, unmerged behavioral data
- D_zscored_unfilled - [3 x 1] struct array containing z-scored, unfilled, unmerged behavioral data
- D_als_filled - [3 x 1] struct array containing z-scored, ALS infilled, unmerged behavioral data
- D_als_filled_merged - [3 x 1] struct array containing z-scored, ALS infilled, merged behavioral data
The above structs contain the following fields:
- data - [nFlies x nBehaviors] behavior data from the decathlon assays
- fields - [nBehaviors x 1] behavior labels with format: Assay metric (day)
- n - [nBehaviors x nBehaviors] sample size for pairwise comparisons of behavior
- imputed - [nFlies x nBehaviors] logical array indicating ALS infilled data points
- meta - struct of experimental meta data for each data point and metric
|
decathlon_unsupervised_behavior_data.mat |
Contains data from unsupervised classification of spontaneous walking behavior. Summary of items:
- D_us - [2 x 1] unsupervised behavior data for inbred (1) and outbred (2) flies
Each struct contains the following fields:
- pdfs - [nFlies x nModes] probability density functions of behavioral modes for individual flies
- pdf_labels - [nModes x 1] labels for mode probabilities
- trans - [nFlies x nModes2] transition probabilities between modes for individual flies
- trans_labels - [nModes2 x 1] transition probability labels with format: P(mode0,mode1)
- strain - [nFlies x 1] array of experimental group labels (inbred = BK-iso, outbred = Nex)
- ID - [nFlies x 1] fly ID numbers
|
decathlon_rnaseq_data.mat |
Contains RNAseq reads from decathlon fly heads. Summary of items:
- D_seq - [3 x 1] RNAseq reads and meta data for inbred (1-2) and outbred (3) flies
Each struct contains the following fields:
- data - [nGenes x nFlies] raw read counts of each gene for individual flies
- geneID - [nGenes x 1] cell array of flyBase gene IDs
- ID - [nFlies x 1] array of fly ID numbers
|
decathlon_thermo_gal4_data.mat |
Contains clumpiness and switchiness data from the Gal4 thermogenetic manipulation, Y-Maze screen. Summary of items:
- D_thermo - struct of all screen data
Struct contains the following fields:
- gal4 - [nGenotypes x 1] cell array of Gal4 driver lines
- effector - [nGenotypes x 1] cell array of UAS-effectors
- clumpiness - struct of clumpiness scores (nBlocks x nFlies) broken down by experiment block
- switchiness - struct of switchiness scores (nBlocks x nFlies) broken down by experiment block
- speed - struct of speed scores (nBlocks x nFlies) broken down by experiment block
- bouts - struct of movement bout clumpiness scores (nBlocks x nFlies) broken down by experiment block
Order of experiment blocks is as follows:
- Stable low/permissive temp. (1hr)
- Ramp up low to high temp. (1hr)
- Stable high/restrictive temp. (1hr)
- Ramp down high to low temp. (1hr)
|
babam_dgrp_dn_data.mat |
Contains summary measures of behaviors from the BABAM screen, descending neuron screen, and DGRP database. Summary of items:
- D_babam - struct of BABAM Gal4 screen behavioral data
- D_dgrp_behavior - struct of DGRP behavioral data
- D_dgrp_phys - struct of DGRP physiological data
- DN_ctl - struct of control (unstimulated) descending neuron screen behavioral data
- DN_exp - struct of experimental (stimulated) descending neuron screen behavioral data
D_babam contains the following fields:
- data - [nLines x nBehaviors] array of line average behavioral measures
- fields - [nBehaviors x 1] cell array of behavior labels
D_dgrp structs contains the following fields:
- data - [nLines x nBehaviors] array of line average behavioral measures
- fields - [nBehaviors x 1] cell array of behavior labels
- imputed - [nLines x nBehaviors] logical array indicating values imputed by ALS infilling
DN structs contains the following fields:
- lines - [nLines x 1] cell array of line IDs
- DNs - [nLines x 1] cell array of descending neurons affected by each line
- on_pdfs - [nLines x 1] cell array of individual fly pdfs (nFLies x nBehaviors) for each line (stimulated)
- off_pdfs - [nLines x 1] cell array of individual fly pdfs (nFLies x nBehaviors) for each line (unstimulated)
- line_avg_on_pdfs - [nLines x nBehaviors] per line average PDF of behavioral modes (stimulated)
- line_avg_off_pdfs - [nLines x nBehaviors] per line average PDF of behavioral modes (unstimulated)
|
decathlon_enrichment_results.mat |
Contains RNAseq gene by behavior model p-values and results of the decathlon KEGG pathway enrichment analysis. Summary of items:
- D_rnaseq_models - struct of rnaseq gene by behavior linear model p-values and labels
- D_enrichment_results - struct bootstrapped KEGG pathway enrichment analysis results
D_rnaseq_models contains the following fields:
- pvals - cell array of model p-values, each element [nGenes x nBehaviors]
- fbgn - [nGenes x 1] cell array of FlyBase gene numbers
- kegg - [nGenes x 1] cell array of KEGG gene IDs
- gene_symbols - [nGenes x 1] cell array of gene symbols
- gene_names - [nGenes x 1] cell array of FlyBase gene names
- metric_labels - [nBehaviors x 1] cell array of behavior metric labels
D_enrichment_results contains the following fields:
- experiment - experimental batch name
- isogenic - boolean indicating whether batch was isogenic
- prob_gene_given_cat - [nPathways x nGenes] array of the combined probability of a gene and pathway both being significant
- cat_labels - [nPathways x 1] KEGG pathways significantly enriched in observed data
- gene_kegg_ids - [nGenes x 1] KEGG gene IDs associated with any significantly enriched pathway
- gene_labels - [nGenes x 1] gene names associated with any significantly enriched pathway
- gene_fb_gene_num - [nGenes x 1] cell array of FlyBase gene numbers associated with any significantly enriched pathway
- avg_min_pval - [nPathways x 1] -log10[minimum p-value] of enriched KEGG pathways
- shuffled_avg_min_pval - [nPathways x 1] -log10[minimum p-value] of enriched KEGG pathways in shuffled data
- avg_metrics_hit - [nPathways x 1] average number of metrics across bootstrap replicates associated with enriched pathways
- cat_id - [nPathways x 1] KEGG pathway ID numbers
- cat_genes - [nPathways x 1] cell array of lists of complete KEGG gene IDs associated with each enriched pathway (including those without significant gene by behavior model)
- p_metric - [nPathways x nBehaviors] array of probability of pathway both being associated with a behavior
- metric_labels - [nBehaviors x 1] behavioral metric labels
- apriori_cat_x_gene - [nAprioriGroups x 1] cell array of heatmaps of combined probability of a gene and pathway both being significant split by a priori groups.
|
Analysis, simulation, and visualization functions (MATLAB 2018b)
Download a .zip of all these functions. |
load_decathlon_structs.m |
Function: load_decathlon_structs.m
Description: load decathlon data structs from file decathlon_final_data.mat
Inputs:
- fdir - parent directory containing decathlon_final_data.mat
- var_name - variable name of struct to load (optional)
Outputs:
- D - decathlon data struct containing behavioral data, behavior names, and experimental meta data
Variable Names:
- D_raw_unfilled - [3 x 1] struct array containing raw, unfilled, unmerged behavioral data
- D_zscored_unfilled - [3 x 1] struct array containing z-scored, unfilled, unmerged behavioral data
- D_als_filled - [3 x 1] struct array containing z-scored, ALS infilled, unmerged behavioral data
- D_als_filled_merged - [3 x 1] struct array containing z-scored, ALS infilled, merged behavioral data
|
pair_decathlon_structs.m |
Function: pair_decathlon_structs.m
Description: Permutes the field order of decathlon data structs to match
and (optionally) collapses metrics in each struct into distilled form via PCA.
Inputs:
- D - array of decathlon data structs
- varargin - Name-Value pair options to specify how to pair and collapse fields.
Outputs:
- D_paired - array of paired/collapsed decathlon data structs
Name-Value Pairs:
- 'CollapseFields' - set fields to collapse into distilled metrics [ 'none' (default) | 'circadian' | 'all' ]
- 'CollapseMode' - set method of collapsing metrics [ 'PCA' (default) | 'average' ]
- 'Trim' - toggle trimming day of testing from field names [ false (default) | true ]
- 'PCs' - number of PCs to collapse each a priori group [ positive scalar or array (nGroups x 1) ]
|
impute_decathlon_structs.m |
Function: impute_decathlon_structs.m
Description: Infill missing values of decathlon behavioral matrices.
Inputs:
- D - array of decathlon data structs
- varargin - Name-Value pair options to specify imputation method and standardization.
Outputs:
- D_impute - array of infilled decathlon data structs
Name-Value Pairs:
- 'ImputeMode' - set imputation method [ 'als' (default) | 'mean |' 'regression' | 'knn' ]
- 'Standardize' - toggle z-scoring by experimental batch and behavioral metric [ true | false ]
|
cat_decathlon_structs.m |
Function: cat_decathlon_structs.m
Description: Concatenate data from one or more decathlon data structs into a single struct.
Inputs:
- D - array of decathlon data structs
- varargin - Name-Value pair options to specify any pre-processing for structs prior to concatenation.
Outputs:
- D_cat - concatenated decathlon data struct
Name-Value Pairs:
- 'ImputeMode' - set imputation method [ 'als' (default) | 'mean |' 'regression' | 'knn' ]
- 'Standardize' - toggle z-scoring by experimental batch and behavioral metric [ true | false ]
- 'CollapseFields' - set fields to collapse into distilled metrics [ 'none' (default) | 'circadian' | 'all' ]
- 'CollapseMode' - set method of collapsing metrics [ 'PCA' (default) | 'average' ]
- 'Trim' - toggle trimming day of testing from field names [ false (default) | true ]
- 'PCs' - number of PCs to collapse each a priori group [ positive scalar or array (nGroups x 1) ]
Note: this function is used to combine the first and second isogenic decathlons into a single dataset.
|
parse_fieldnames.m |
Function: parse_fieldnames.m
Description: Parse decathlon behavior field names from 'Assay metric (day)' format into component parts.
Inputs:
- fields - cell array of behavior field names
Outputs:
- assay - behavior assay name
- metric - behavior metric name
- day - behavior day of testing
|
plot_pca_bootstrap.m |
Function: plot_pca_bootstrap.m
Description: Plot variance explained for PCA performed on bootstrapped observed and shuffled data (null model)
Inputs:
- data - 2D data matrix to bootstrap
- nreps - number of bootstrap replicates
Optional Inputs:
- ci - confidence interval [ 95 (default)]
- mode - variance explained plotting mode [ 'noncummulative' (default) | 'cummulative' ]
- max_n - number of samples to draw in each replicate [ num observations (default)]
Outputs:
- null_exp - [nReps x nPC] variance explained for bootstrapped shuffled data
- obs_exp - [nReps x nPC] variance explained for bootstrapped observed data
- nkeep - number of PCs with observed variance explained >= shuffled variance explained
- plot_handles - handles to plot line and patch objects
See: Fig. 4C and Fig. S4D, S6A, S10A.
|
plotCorr.m |
Function: plotCorr.m
Description: Plot pairwise correlation matrices and (optionally) sort rows and columns via hierarchical clustering.
Inputs:
- data - [nObservations x nMetrics] data matrix
- varargin - plotting name-value pairs
Name-Value Pairs:
- 'Cluster' - hierarchically cluster rows and columns [true (default) | false]
- 'Ext' - figure export file format extension ['.fig' (default) ]
- 'FontSize' - metric label font size [6 (default) ]
- 'Labels' - metric labels [ none (default) | cell array of strings ]
- 'Options' - optional arguments to MATLABs corr function [ {'rows';'pairwise'} (default)]
- 'Parent' - target axes handles to plot matrices [ none (default) ]
- 'PvalPlot' - plot p-value matrices [true (default) | false]
- 'PvalPatch' - display patch to highlight significant correlations [true (default) | false]
- 'SavePath' - export path for figures [ none(default) ]
- 'Signed' - toggle absolute value of correlations [true (default) | false]
Outputs:
- null_exp - [nReps x nPC] variance explained for bootstrapped shuffled data
- obs_exp - [nReps x nPC] variance explained for bootstrapped observed data
- nkeep - number of PCs with observed variance explained >= shuffled variance explained
- plot_handles - handles to plot line and patch objects
See: Fig. 1E, 1G, 2E, 5A, 6A and Fig. S1A, S8A, S8B, S9, S10B.
|
PCARegressionCI.m |
Function: PCARegressionCI.m
Description: Create scatter plot with bootstrapped 95% confidence interval.
Inputs:
- data - [nFlies x 2] data to be plotted
- ah - axes handle to target plot/li>
Name-Value Pairs
- 'XLim' - x-axis limit specified in standard deviations
- 'YLim' - y-axis limit specified in standard deviations
- 'Plot' - toggles plotting on and off [ true (default) | false ]
Outputs:
- fit - struct containing regression parameters
See: Fig. 1F, 1H, 2E, 3D, 5F, 5G and Fig. S8C.
|
plot_metricDistributions.m |
Function: plot_metricDistributions.m
Description: Pair matching behavioral metrics across decathlon experiments and overlay their kernel density estimates.
Inputs:
- D - array of decathlon structs
Name-Value Pairs
- 'Labels' - [nMetrics x 1] cell array of metric labels
|
Figure scripts (MATLAB 2018b) |
plot_all_assay_tsne.m |
Script: plot_all_assay_tsne.m
Description: Plots t-SNE embeddings for individuals and behavioral metrics for all decathlon experiments.
Two behavioral metric embeddings are plotted, one colored by a priori group and one colored by assay.
See: Figure 1.
|
plot_apriori_grouped_corrmats.m |
Script: plot_apriori_grouped_corrmats.m
Description: Sorts behavioral metrics into a priori groupings and plots pairwise correlation matrices.
Additionally generates color coded a priori grouping and assay tabs.
See: Figure 1.
|
plot_all_assay_persistence.m |
Script: plot_all_assay_persistence.m
Description: Parses assay persistence data into unique combinations of assay x metric across days of testing.
and plot the correlation of each metric to itself across days of testing.
See: supplemental figure 1.
|
plot_imputation_comparison.m |
Script: plot_imputation_comparison.m
Description: Compare error between toy ground truth and imputed datasets infilled via mean, KNN, linear, and ALS imputation methods.
See: supplemental figure 4.
|
plot_all_corr_of_corr_bootstraps.m |
Script: plot_all_corr_of_corr_bootstraps.m
Description: Plot distributions of the correlation of pairwise correlations across
bootstrap replicates for all decathlon data structs as well as shuffled data.
See: supplemental figure 5.
|
plot_all_apriori_pca_bootstrap.m |
Script: plot_all_apriori_pca_bootstrap.m
Description: Plot PCA variance explained bootstrap for all a priori groups in all decathlon data structs.
Note: empty plots are due to uncollapsable a priori groups composed of a single metric.
See: supplemental figure 6A.
|
plot_pca_loadings.m |
Script: plot_pca_loadings.m
Description: Plot distilled matrix PC behavioral metric loadings for inbred and outbred flies.
See: supplemental figure 6B.
|
plot_all_rvalue_dist.m |
Script: plot_all_rvalue_dist.m
Description: Plot bootstrapped behavioral r-value and p-value distributions for inbred, outbred, and shuffled datasets.
Additionally estimates the false discovery rate for significant behavioral correlations.
See: supplemental figure 7.
|
plot_clump_switch_sig_pcs.m |
Script: plot_clump_switch_sig_pcs.m
Description: Plot correlation and p-value matrices for significantly correlated pairs of clumpiness and switchiness a priori group principle components.
Plot loadings for significant PCs.
See: supplemental figure 8.
|
plot_all_conncomp_drop.m |
Script: plot_all_conncomp_drop.m
Description: Plot toy dataset covariance matrices with varying effective dimensionality and cluster size.
Plot histograms of number of connected components across a parameter sweep of correlation thresholds.
See: supplemental figure 9.
|
plot_clump_switch_by_thermo_gal4_effector.m |
Script: plot_clump_switch_by_thermo_gal4_effector.m
Description: Create scatter plots and correlation bar plots for Y-Maze turn clumpiness and switchiness from the thermogenetic gal4 LDM screen.
See: Figure 3D-E.
|
plot_rnaseq_expression_and_model_heatmaps.m |
Script: plot_rnaseq_expression_and_model_heatmaps.m
Description: Plot heatmaps of the reads per million normalized (RPM) gene expression of all transcripts sequenced. Quantile normalize
expression data and create expression scree plots. Plot p-value
heatmaps for the gene by behavior linear models for all transcripts passing the minimum RPM threshold.
See: Figure 4B-D.
|
plot_kegg_enrichment_results.m |
Script: plot_kegg_enrichment_results.m
Description: Plot panels from the boostrapped KEGG enrichment analysis.
- Bootstrapped shuffled and unshuffled average minimum p-value bar plots.
- Bootstrapped average number metrics hit by average minimum p-value scatter plots.
- Average minimum p-value paired dot plots.
- KEGG pathway by gene boostrapped heatmaps split by a priori groups.
See: Figure 4E-G.
|
Unsupervised behavioral classification data (MATLAB 2018b)
|
run_tsne_analysis.m |
Script: run_tsne_analysis.m
Description: Load unsupervised behavior t-SNE embeddings, pre-process, and summarize with a collection of visualizations.
Note: requires dependencies from Motion-mapper.
See: Figure 2B-E,I.
|
fit_tsne_z_logspeed_gmm.m |
Function: fit_tsne_z_logspeed_gmm.m
Description: Fit a 2-component GMM to embedding speed data to identify threshold between state pauses and state transitions.
Inputs:
- z_speed - [nFlies x 1] cell array of individual fly t-SNE embedding speed time series
- plot_bool - [ true | false ] toggle plotting of GMM fit and threshold
Outputs:
- sigma - [nComponents x 1] array of component standard deviations
- z_thresh - t-SNE speed threshold
|
plot_density.m |
Function: plot_density.m
Description: Plot t-SNE density.
Inputs:
- density - [nBins x nBins] numeric array of t-SNE embedding PDF
- idx_map - [nBins x nBins] array of watershed indices
Name-Value Pairs:
- 'Parent' - target axes for plot
- 'CLim' - color axis limits
- 'Numbered' - toggles displaying text labels over each watershed [ false (default) | true ]
- 'OutlineDensity' - toggles displaying watershed boundaries [ false (default) | true ]
See: Figure 2B.
|
plot_mode_pdfs.m |
Function: plot_mode_pdfs.m
Description: Plots behavioral mode PDF heatmap (C) and watershed density map colored by average mode density (D).
Inputs:
- idxMap - [nBins x nBins] pixel map of watershed mode identities
- pdfs - [nFlies x nModes] array of individual fly behavior mode probability density functions
See: Figure 2C-D.
|
plot_individual_densities.m |
Function: plot_individual_densities.m
Description: Plots separate t-SNE densities for all individual flies.
Inputs:
- embeddings - struct containing embedding data for all flies
- sigma - standard deviation of density estimate kernel
- numPoints - number of bins (X and Y) to estimate density
- rangeVals - [2 x 1] numeric array of min and max bins
Embeddings struct contains the following fields:
- z_data - [nFlies x 1] cell array of individual fly t-SNE trajectories (each nFrames x 2)
- z_speed - [nFlies x 1] cell array of individual fly t-SNE speed (each nFrames x 1)
- label - [nFlies x 1] cell array of unique fly labels (strain + ID no.)
- strain - [nFlies x 1] cell array of fly line labels
- ID - [nFlies x 1] numeric array of fly ID numbers
- z_thresh - [nFlies x 1] t-SNE speed threshold defining boundary between mode pauses and transistions
See: Figure 2D.
|
plot_all_pdf_corr.m |
Function: plot_all_pdf_corr.m
Description: Plots behavioral mode PDF correlation matrices split by inbred/outbred flies.
Inputs:
- pdfs - [nFlies x nModes] array of individual fly behavior mode probability density functions
Outputs:
- cluster_perm - [nModes x 1] hierarchical clustering permutation of behavior modes
See: Figure 2E.
|
plot_genotype_densities.m |
Function: plot_genotype_densities.m
Description: Plots separate t-SNE densities for each fly line.
Inputs:
- embeddings - struct containing embedding data for all flies
- sigma - standard deviation of density estimate kernel
- numPoints - number of bins (X and Y) to estimate density
- rangeVals - [2 x 1] numeric array of min and max bins
- clim - [2 x 1] color axis limits
Embeddings struct contains the following fields:
- z_data - [nFlies x 1] cell array of individual fly t-SNE trajectories (each nFrames x 2)
- z_speed - [nFlies x 1] cell array of individual fly t-SNE speed (each nFrames x 1)
- label - [nFlies x 1] cell array of unique fly labels (strain + ID no.)
- strain - [nFlies x 1] cell array of fly line labels
- ID - [nFlies x 1] numeric array of fly ID numbers
- z_thresh - [nFlies x 1] t-SNE speed threshold defining boundary between mode pauses and transistions
|
plot_tsne_position_samples.m |
Function: plot_tsne_position_samples.m
Description: Plot individual X and Y t-SNE trajectory timeseries for all individuals.
Inputs:
- embeddings - struct containing embedding data for all flies
Embeddings struct contains the following fields:
- z_data - [nFlies x 1] cell array of individual fly t-SNE trajectories (each nFrames x 2)
- z_speed - [nFlies x 1] cell array of individual fly t-SNE speed (each nFrames x 1)
- label - [nFlies x 1] cell array of unique fly labels (strain + ID no.)
- strain - [nFlies x 1] cell array of fly line labels
- ID - [nFlies x 1] numeric array of fly ID numbers
- z_thresh - [nFlies x 1] t-SNE speed threshold defining boundary between mode pauses and transistions
|
mode_from_embeddingValues.m |
Function: mode_from_embeddingValues.m
Description: Assigns watershed mode to each frame based on t-SNE embedding position to generate a mode time series for each fly.
Inputs:
- density - [nBins x nBins] numeric array of t-SNE embedding PDF
- xx - [nBins x 1] center of each point embedding bin
- z - [nFlies x 1] cell array of t-SNE trajectories
Outputs:
- individual_modes - [nFlies x 1] cell array of mode assignments for each individual (nFrames x 1)
- unique_modes - [nModes x 1] numeric array of unique mode identities
- mode_pdfs - [nFlies x nModes] mode probability density functions for each fly
- idxMap - [nFlies x 1] cell array of fly line labels
|
modeBouts.m |
Function: modeBouts.m
Description: Segments individual mode time series into discrete bouts populated by a single mode.
Inputs:
- fID - [nFrames x 1] array of mode identity assigned to each frame
- modes - [nModes x 1] unique modes
- tDur - minimum bout length threshold (frames)
Outputs:
- starts - frame indices of mode bout starts (unfiltered)
- stops - frame indices of mode bout stops (unfiltered)
- durations - length in frames of each mode bout (unfiltered)
- sampleFrames - frame indices of mode bout starts (filtered)
- sampleDurations - length in frames of each mode bout (unfiltered)
|
make_all_tiled_mode_movies.m |
Function: make_all_tiled_mode_movies.m
Description: Generate tiled movie composed of individual movement bout.
Inputs:
- fID - [nFrames x 1] array of mode identity assigned to each frame
- modes - [nModes x 1] unique modes
- tDur - minimum bout length threshold (frames)
Outputs:
- starts - frame indices of mode bout starts (unfiltered)
- stops - frame indices of mode bout stops (unfiltered)
- durations - length in frames of each mode bout (unfiltered)
- sampleFrames - frame indices of mode bout starts (filtered)
- sampleDurations - length in frames of each mode bout (unfiltered)
|
modeMovie.m |
Function: modeMovie.m
Description: Segments individual mode time series into discrete bouts populated by a single mode.
Inputs:
- fID - [nFrames x 1] array of mode identity assigned to each frame
- modes - [nModes x 1] unique modes
- tDur - minimum bout length threshold (frames)
Outputs:
- starts - frame indices of mode bout starts (unfiltered)
- stops - frame indices of mode bout stops (unfiltered)
- durations - length in frames of each mode bout (unfiltered)
- sampleFrames - frame indices of mode bout starts (filtered)
- sampleDurations - length in frames of each mode bout (unfiltered)
|
getModeMovieVector.m |
Function: getModeMovieVector.m
Description: Segments individual mode time series into discrete bouts populated by a single mode.
Inputs:
- fID - [nFrames x 1] array of mode identity assigned to each frame
- modes - [nModes x 1] unique modes
- tDur - minimum bout length threshold (frames)
Outputs:
- starts - frame indices of mode bout starts (unfiltered)
- stops - frame indices of mode bout stops (unfiltered)
- durations - length in frames of each mode bout (unfiltered)
- sampleFrames - frame indices of mode bout starts (filtered)
- sampleDurations - length in frames of each mode bout (unfiltered)
|