This page provides comprehensive documentation for all
functions used in the data processing, individual analysis, and
population analysis tutorials. Functions are organized by workflow stage
or package.
| Workflow Stage | Primary Functions | Purpose |
|---|---|---|
| Data Organization | organize_bird_files(),
create_npm_object() |
Structure raw data and initialize analysis object |
| Audio Processing | compute_wav_durations(),
create_audio_clip(),
create_template(),
detect_template(),
find_motif(),
find_bout() |
Process song recordings and identify vocal elements |
| Photometry Processing | read_photometry(),
process_photometry(), sync_epoch(),
find_transients(), filter_peaks() |
Process fiber photometry signals and detect neural events |
| Individual Analysis | create_segment_table(),
analyze_timing_shift(),
analyze_amplitude_shift(),
analyze_directional_cH() |
Analyze individual animal patterns |
| Population Analysis | combine_animal_results(),
analyze_td_metrics(),
analyze_amplitude_metrics(),
analyze_cH_metrics() |
Combine and analyze population-level patterns |
| Visualization | plot_heatmap(),
plot_transient_raster(), plot_td_panel(),
plot_amplitude_panel(), plot_cH_panel() |
Create figures and visualizations |
The ASAP (Automated Song Analysis Pipeline) package provides functions for processing audio recordings and analyzing vocal behavior.
compute_wav_durations() - Calculates
the total duration of all audio files.
create_audio_clip() - Extracts specific
time segments for manual template selection.
indices,
start_time, end_time,
clip_namescreate_template() - Defines a spectral
template for song syllable detection.
template_name,
clip_name, start_time, end_time,
freq_min, freq_maxdetect_template() - Finds all
occurrences of the template across recordings.
template_name,
day, indices, proximity_window,
thresholdfind_motif() - Identifies repeated
sequences of syllables (vocal motifs).
template_name,
pre_time, lag_timefind_bout() - Groups individual vocal
elements into singing bouts.
min_duration,
summary, gap_durationplot_heatmap() - Visualizes motif or
bout structure and patterns across development.
segment_type,
balanced, window, contrast,
reference_lines
The VNS (VocalNeuroSync) package provides functions for processing fiber photometry data and analyzing neural-vocal synchronization.
organize_bird_files() - Organizes raw
data files from individual animals into a structured format suitable for
analysis.
root_dir,
bird_id, dob, output_dir,
file_prefixes, file_extensionscreate_npm_object() - Creates the main
analysis object containing both photometry and audio data with
metadata.
base_path,
labels, imageArea, sensor,
fps, numChannelread_photometry() - Imports raw
photometry data.
qc_photometry() - Performs optional
quality control checks.
process_photometry() - Applies baseline
correction and processes the signal.
by_epoch,
epoch_window_quantilesync_epoch() - Synchronizes photometry
signals across epochs.
scale,
data_type, by_peak_valuefind_transients() - Detects dopamine
transients using peak detection algorithms.
method,
lag, threshold, influencefilter_peaks() - Measures peak
amplitude of dopamine signals within epochs.
create_segment_table() - Creates
segmented data tables for temporal analysis.
region,
window, n_segments, min_epoch,
method, data_typeanalyze_timing_shift() - Analyzes
temporal shifts in dopamine transients.
method,
segment_duration_ms, bandwidth,
highlight_positionanalyze_amplitude_shift() - Analyzes
amplitude shifts between early and late segments.
output,
segment_duration_ms, segments_per_label,
label_pairanalyze_amplitude_redistribution() -
Analyzes amplitude redistribution across segment pairs.
output,
segment_duration_ms, segments_per_label,
step_sizeanalyze_directional_cH() - Analyzes
directional conditional entropy between segments.
source_seg,
target_seg, outputanalyze_directional_info_flow() -
Analyzes directional information flow across development.
step_sizecombine_animal_results() - Combines
individual animal results into population datasets.
analyze_td_metrics() - Performs linear
mixed-effects modeling on temporal difference metrics.
analyze_amplitude_metrics() - Performs
linear mixed-effects modeling on amplitude metrics.
analyze_cH_metrics() - Performs linear
mixed-effects modeling on conditional entropy metrics.
analyze_within_window_trends() -
Analyzes trends within sliding temporal windows.
test_method,
window_size, plot_resultsanalyze_within_window_trends2() -
Alternative within-window analysis with mixed-effects models.
model,
test_method, window_size,
plot_resultsanalyze_within_window_info_flow() -
Analyzes information flow within sliding windows.
model,
window_size, plot_resultsplot_transient_raster() - Creates
raster plots of dopamine transients.
method,
window, region, ref_line,
point_size, jitter_heightplot_td_panel() - Creates panel plots
for temporal difference metrics.
show_title,
show_annotationsplot_amplitude_panel() - Creates panel
plots for amplitude metrics.
show_title,
show_annotationsplot_cH_panel() - Creates panel plots
for conditional entropy metrics.
plot_paired_metric_panel() - Creates
paired comparison plots for metrics.
window_size,
metric_order, ncolplot_paired_metric_panel2() -
Alternative paired comparison plots.
window_size,
ncol
# Install ASAP
remotes::install_github("LXiao06/ASAP")
# Or install local version
remotes::install_local("pkgs/ASAP_0.3.3.tar.gz", dependencies = TRUE)
# Install VNS
remotes::install_github("LXiao06/VocalNeuroSync")
# Or install local version
remotes::install_local("pkgs/VNS_0.0.0.9000.tar.gz", dependencies = TRUE)