Skip to main content

Data Cleaning and Analysis Pipeline for Hyperscanning Research

Project description

Hypline

Python License: MIT CI CD

Hypline is a command-line toolbox for cleaning and analyzing data from hyperscanning studies involving dyadic conversations. Its commands are modular: each does one job — transcribe audio, generate features, denoise fMRIPrep BOLD — and runs on its own. Run end to end, they prepare everything an encoding model needs — transcripts, features, confounds, and denoised BOLD — all organized in one BIDS-style dataset.

Hypline implements the encoding-model approach of Zada et al. (2026), Neuron (10.1016/j.neuron.2025.11.004), which used fMRI hyperscanning and language-model features to study the shared neural systems for speech production and comprehension in real-time dyadic conversations.

Installation

pip install hypline

Also installable with uv (uv add hypline) or poetry (poetry add hypline). This installs the hypline command:

hypline --help

[!NOTE] hypline transcribe decodes audio through FFmpeg, which must be installed separately and on your PATH. Other commands do not need it.

The pipeline

Hypline's commands compose into a pipeline. Each reads from a shared dataset root and writes its outputs back into the same tree, along two independent branches — a stimulus branch and an fMRIPrep branch — that prepare the two sides an encoding model later joins:

Command Branch Reads Writes
transcribe stimulus stimulus audio word-level transcripts
featuregen phonemic stimulus transcripts phonemic features (+ confounds)
featuregen semantic stimulus transcripts semantic features (+ confounds)
featuregen spectral stimulus stimulus audio spectral features (TR-aligned)
featuregen syntactic stimulus transcripts syntactic features
confoundgen phonemic stimulus phonemic features conf-phonemic confounds
confoundgen semantic stimulus semantic features conf-semantic confounds
denoise fMRIPrep preprocessed BOLD, fMRIPrep confounds denoised BOLD (desc-denoised)

featuregen phonemic also generates the matching phonemic confounds by default, so you rarely call confoundgen phonemic directly. You do not have to run every step — run transcribe alone for transcripts, or denoise alone to clean fMRIPrep BOLD, as long as each command's inputs exist.

Quick start

Once your files sit where hypline expects (see the dataset layout), every command takes the dataset root and discovers its inputs from there — you never pass file paths. End to end, the whole pipeline is three commands:

# stimulus branch: audio → transcripts → features (+ phonemic confounds, auto)
hypline transcribe data/ --audio-ext .wav
hypline featuregen phonemic data/

# fMRIPrep branch: clean the BOLD with a motion + drift model, read straight
# from fMRIPrep's confounds table
hypline denoise data/ \
  --columns trans_x,trans_y,trans_z,rot_x,rot_y,rot_z,cosine

After this, data/ holds phonemic features plus desc-denoised BOLD — the two sides an encoding model needs.

Documentation

Full guides and per-command reference live at the project documentation. New to hypline? Walk through a full run on the example dataset, or read The hypline dataset layout — every command depends on it.

License

Released under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hypline-0.3.0a1.tar.gz (473.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hypline-0.3.0a1-py3-none-any.whl (87.1 kB view details)

Uploaded Python 3

File details

Details for the file hypline-0.3.0a1.tar.gz.

File metadata

  • Download URL: hypline-0.3.0a1.tar.gz
  • Upload date:
  • Size: 473.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.15

File hashes

Hashes for hypline-0.3.0a1.tar.gz
Algorithm Hash digest
SHA256 e6fa3316aaf660938bed1db45dcfdbb540c537759400e2cd6bb8795de210e7c6
MD5 f15fcbe5a79164e45d63921b256bd61a
BLAKE2b-256 61f7218be153d815dd79ac14aa85918bddae90edca25c08a30abf8cce99070d5

See more details on using hashes here.

File details

Details for the file hypline-0.3.0a1-py3-none-any.whl.

File metadata

  • Download URL: hypline-0.3.0a1-py3-none-any.whl
  • Upload date:
  • Size: 87.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.15

File hashes

Hashes for hypline-0.3.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 d466cf88572c7adaf7645e424db261d4a9c00f3903ad8b7ba78568fa2287122a
MD5 17b92d5d5f55133320f02a2ed300ee1b
BLAKE2b-256 71be8b6b46db344f23745161256d11a5423e22ff3155485c4894d7d1b3fae048

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page