The goal of ravepipeline is to provide pipeline infrastructure for Reproducible Analysis and Visualization of
Intracranial Electroencephalography (RAVE
). The package
defines high-level class to build, compile, set, execute, and share
neuroscience pipelines. Both R
and Python
are
supported with Markdown
and shiny
dashboard
templates for extending and building customized pipelines.
We offers several built-in pipelines, see repository rave-ieeg/rave-pipelines for details.
More documentation is available at rave.wiki
Please check out our full installation guide on how to install ‘RAVE’
For full features, please install additional packages:
# install.packages(c("remotes", "visNetwork", "rpymat"))
# Install development version
::install_github("dipterix/ravepipeline")
remotes
# Download built-in pipelines
::ravepipeline_finalize_installation()
ravepipeline
# Configure Python environment if needed
::configure_conda() rpymat
This example requires you to download RAVE demo data, which comes with the full installations.
The built-in pipelines include Power Explorer, a powerful tool to group stimuli for time-frequency analysis and visualization. Here’s an example of how to use it on our demo data set:
https://github.com/user-attachments/assets/75fe0f88-58ca-46ee-a831-f22abbaa5343
library(ravepipeline)
# list all the pipelines
pipeline_list()
# Run power explorer
<- pipeline("power_explorer")
power_explorer
# List all runnable pipeline targets
$target_table
power_explorer
# set inputs for analysis
$set_settings(
power_explorerproject_name = "demo",
subject_code = "DemoSubject",
loaded_electrodes = "13-16,24",
epoch_choice = "auditory_onset",
epoch_choice__trial_starts = -1L,
epoch_choice__trial_ends = 2L,
reference_name = "default",
baseline_settings = list(
window = list(c(-1, -0.5)),
scope = "Per frequency, trial, and electrode",
unit_of_analysis = "decibel"),
analysis_electrodes = "14",
first_condition_groupings = list(
list(label = "audio_visual", conditions = c("known_av", "meant_av", "last_av", "drive_av")),
list(label = "auditory_only", conditions = c("last_a", "drive_a", "known_a", "meant_a")),
list(label = "visual_only", conditions = c("last_v", "drive_v", "known_v", "meant_v"))),
condition_variable = "Condition",
analysis_settings = list(
list(label = "AudStart", event = "Trial Onset",
time = 0:1, frequency = c(70L, 150L))),
enable_second_condition_groupings = FALSE,
enable_custom_ROI = FALSE,
omnibus_includes_all_electrodes = TRUE
)
# Run pipeline to obtain the power of frequency over time
<- power_explorer$run("by_frequency_over_time_data")
time_freq_data
# Load up custom pipeline functions
<- power_explorer$shared_env()
pipeline_functions
# plot the result
$plot_by_frequency_over_time(time_freq_data)
pipeline_functions
# visualize the results
$visualize(glimpse = TRUE, aspect_ratio = 10) power_explorer