PhysioPipe is a collection of targets
target factories for the Physio ecosystem. Each factory
returns a list of target objects for one standard analysis, so
a whole reproducible _targets.R is a couple of lines and
you still get targets’ incremental re-runs and byte-level
provenance.
This vignette builds factories and inspects the target objects they
produce. It does not run a pipeline
(tar_make()), which would need the ecosystem analysis
packages and, for a report, the Quarto CLI.
tar_ecg_hrv() expands to the standard resting-ECG HRV
pipeline
(read -> lead -> R-peaks -> RR -> {HRV time, HRV freq} -> summary,
plus a tachogram figure and a Parquet export):
ecg <- tar_ecg_hrv()
length(ecg)
#> [1] 10
vapply(ecg, function(t) t$settings$name, character(1))
#> [1] "ecg_files" "ecg_pe" "ecg_lead" "ecg_peaks" "ecg_rr"
#> [6] "ecg_hrv_time" "ecg_hrv_freq" "ecg_hrv" "ecg_fig" "ecg_parquet"Each element is a targets target object:
A real _targets.R just splices the list in:
EEG band power, EMG amplitude/fatigue, and EDA skin-conductance each
have a factory. With source = NULL they point at a seeded
synthetic signal so the pipeline runs out of the box; pass an
expression to read real data instead.
Give tar_ecg_hrv() several record bases and it switches
to dynamic branching (one branch per record) and adds a combined cohort
table:
pp_simulate() makes a clearly-synthetic
PhysioExperiment for exercising a pipeline’s mechanics (not
for making claims):
pe <- pp_simulate("eeg")
pe
#> class: PhysioExperiment
#> dim: 2001 x 4
#> assays(1): raw
#> samplingRate: 250 Hz
#> channels(4): EEG1, EEG2, EEG3, EEG4
#> colData names(1): labelSmall pure helpers assemble pipeline outputs – e.g. stacking per-record cohort branches into one table:
?tar_ecg_hrv, ?tar_eeg_bandpower,
?tar_emg_features, ?tar_eda_scr – the
single-modality factories.?tar_physio_report – a Quarto report target (needs
tarchetypes + Quarto).?pp_write_parquet – the language-neutral interchange
seam that keeps a pipeline orchestrator-agnostic.