moseq2_app package
Main Module
Main functions that facilitate all jupyter notebook functionality.
- moseq2_app.main.validate_inputs(inputs, progress_paths)
validate progress file input.
- Args:
inputs (list): list of progress path inputs. progress_paths (dict): dictionary of notebook progress paths.
- Returns:
error (bool): boolean flag for whether there is any error.
General Utilities Module
General utility functions.
- class moseq2_app.util.bcolors
Bases:
object
color UNICODE values used to color printed output.
- BOLD = '\x1b[1m'
- ENDC = '\x1b[0m'
- FAIL = '\x1b[91m'
- HEADER = '\x1b[95m'
- OKBLUE = '\x1b[94m'
- OKCYAN = '\x1b[96m'
- OKGREEN = '\x1b[92m'
- UNDERLINE = '\x1b[4m'
- WARNING = '\x1b[93m'
- moseq2_app.util.index_to_dataframe(index_path)
Read the index file into a dictionary and converts it into an editable DataFrame.
Args: index_path (str): Path to index file
Returns: index_data (dict): Dict object containing all parsed index file contents df (pd.DataFrame): Formatted dict in DataFrame form including each session’s metadata
- moseq2_app.util.merge_labels_with_scalars(sorted_index, model_path)
Compute all the syllable statistics to plot, including syllable scalars.
Args: sorted_index (dict): Sorted dict of modeled sessions model_fit (dict): Trained AR-HMM results dict model_path (str): Respective path to the AR-HMM model in use. max_sylls (int): Maximum number of syllables to include
Returns: df (pd.DataFrame): Dataframe containing all of the mean syllable statistics scalar_df (pd.DataFrame): Dataframe containing the frame-by-frame scalar and label data
- moseq2_app.util.read_and_clean_config(config_file)
read config files and reset incorrect parameters
- Args:
config_file (dict): path to the config file
- Returns:
config_data (dict): dictionary of config data.
- moseq2_app.util.setup_model_folders(progress_paths)
Create model-specific folders
Args: progress_paths (dict): dictionary of notebook progress paths.
Returns: model_dict (dict): dictionary for model specific paths such as model_session_path, model_path, syll_info, syll_info_df and crowd_dir
- moseq2_app.util.update_config(path: str) dict
update config.yaml with new paramters used.
- Args:
path (str): path to config file.
- moseq2_app.util.update_model_paths(desired_model, model_dict, progress_filepath)
Update relevant model paths in progress.yaml when specific model is chosen
Args: desired_model (str): file name of the desired specific model model_dict (dict): dictionary for model specific paths such as model_session_path, model_path, syll_info, syll_info_df and crowd_dir progress_filepath (str): path to progress.yaml
Returns: progress_paths (dict): dictionary of paths in the analysis
- moseq2_app.util.uuid_lookup(target_uuid, uuid_dict_source)
Look up session infomtion with full/partial uuid. Helper function for users to look up uuid after running interactive_scalar_summary
Args: target_uuid (str): full or partial uuid the user wants to look up. uuid_dict (dict): dictionary from interactive_scalar_summary widget that has all the session information
- moseq2_app.util.write_yaml(data, file)
write dictionary to yaml
- Args:
data (dict): dictionary of data to be written to yaml file (str): string of yaml file name.
Subpackages
- moseq2_app.flip package
- Submodules
- Flip - Controller Module
- Flip - Widgets Module
FlipClassifierWidgets
FlipClassifierWidgets.changed_selected_session()
FlipClassifierWidgets.clear_on_click()
FlipClassifierWidgets.curr_frame_update()
FlipClassifierWidgets.facing_range_callback()
FlipClassifierWidgets.on_delete_selection_clicked()
FlipClassifierWidgets.on_selected_range_value()
FlipClassifierWidgets.start_stop_frame_range()
FlipClassifierWidgets.update_state_on_selected_range()
- Module contents
- moseq2_app.gui package
- moseq2_app.roi package
- moseq2_app.stat package
- moseq2_app.stat package
- Submodules
- Stats - Controller Module
- Stats - View Module
bokeh_plotting()
colorscale()
draw_stats()
format_graphs()
format_plot()
format_stat_plot()
format_trans_graph_edges()
get_aux_stat_dfs()
get_ci_vect_vectorized()
get_datasources()
get_difference_legend_items()
get_group_node_syllable_info()
get_legend_items()
get_minmax_tp()
get_neighbors()
get_node_labels()
get_syllable_info()
get_trans_graph_group_stats()
plot_dendrogram()
plot_interactive_transition_graph()
set_fill_color()
set_grouping_colors()
set_node_colors_and_sizes()
set_node_labels()
setup_graph_hover_renderers()
setup_hovertool()
setup_node_and_edge_interactions()
setup_slider()
setup_syllable_search()
setup_trans_graph_tooltips()
- Stats - Widgets Module
- Module contents
- moseq2_app.viz package
- Submodules
- Viz - Controller Module
CrowdMovieComparison
CrowdMovieComparison.crowd_movie_preview()
CrowdMovieComparison.generate_crowd_movie_divs()
CrowdMovieComparison.get_mean_group_dict()
CrowdMovieComparison.get_pdf_plot()
CrowdMovieComparison.get_selected_session_syllable_info()
CrowdMovieComparison.get_session_mean_syllable_info_df()
CrowdMovieComparison.set_default_cm_parameters()
SyllableLabeler
- Viz - View Module
- Viz - Widgets Module
- Module contents