bids-conversion
БесплатноБез исполняемых скриптовНе проверенUse this skill for "convert to BIDS", "BIDS format", "create BIDS dataset", "BIDS sidecar", "participants.tsv", "events.tsv", "EEG BIDS", "EMG BIDS", "MEG…
Об этом скилле
BIDS Conversion
Convert neuroscience datasets to Brain Imaging Data Structure (BIDS) format. Supports EEG, EMG, MEG, fMRI, and behavioral data with proper file naming, JSON sidecars, and metadata.
When to Use
- Converting raw data files to BIDS format
- Creating or fixing BIDS metadata (JSON sidecars, TSV files)
- Validating BIDS compliance
- Setting up a new BIDS dataset from scratch
- Converting between data formats (e.g., .set to .edf, .vhdr to .bdf)
BIDS Directory Structure
dataset/
dataset_description.json
participants.tsv
participants.json
README
CHANGES
sub-01/
sub-01_scans.tsv
eeg/
sub-01_task-rest_eeg.set
sub-01_task-rest_eeg.json
sub-01_task-rest_channels.tsv
sub-01_task-rest_electrodes.tsv
sub-01_task-rest_coordsystem.json
sub-01_task-rest_events.tsv
emg/
sub-01_task-grasp_emg.edf
sub-01_task-grasp_emg.json
sub-01_task-grasp_channels.tsv
sub-01_task-grasp_events.tsv
anat/
sub-01_T1w.nii.gz
sub-01_T1w.json
derivatives/
pipeline-name/
sub-01/
File Naming Convention
sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_run-<index>]_<suffix>.<extension>
- sub: subject identifier (required, alphanumeric, no special chars)
- ses: session (optional, for longitudinal studies)
- task: task name (required for functional data)
- acq: acquisition parameters (optional)
- run: run index (optional, for repeated acquisitions)
- suffix: data type (eeg, emg, meg, bold, T1w, events, channels, electrodes)
Conversion Workflow
Step 1: Inventory Source Data
Identify:
- Data format (BrainVision .vhdr, EEGLAB .set, EDF .edf, BDF .bdf, NIfTI .nii.gz)
- Number of subjects and sessions
- Task names and conditions
- Channel types (EEG, EMG, EOG, ECG, misc)
- Events/markers in the data
- Coordinate system for electrode positions
Step 2: Create Dataset Scaffold
import json
from pathlib import Path
def create_bids_scaffold(root: str, subjects: list[str], tasks: list[str], modality: str = "eeg"):
root = Path(root)
root.mkdir(exist_ok=True)
# dataset_description.json
desc = {
"Name": "Dataset Name",
"BIDSVersion": "1.9.0",
"DatasetType": "raw",
"License": "CC0",
"Authors": ["Last, First"],
"DatasetDOI": "",
"GeneratedBy": [{"Name": "Manual conversion"}]
}
(root / "dataset_description.json").write_text(json.dumps(desc, indent=2))
# participants.tsv
with open(root / "participants.tsv", "w") as f:
f.write("participant_id\tage\tsex\thand\n")
for sub in subjects:
f.write(f"sub-{sub}\tn/a\tn/a\tn/a\n")
# Create subject directories
for sub in subjects:
for task in tasks:
(root / f"sub-{sub}" / modality).mkdir(parents=True, exist_ok=True)
Step 3: Convert Data Files
EEG (EEGLAB .set)
EEGLAB .set files are BIDS-compatible as-is. Copy and rename:
cp source.set sub-01/eeg/sub-01_task-rest_eeg.set
cp source.fdt sub-01/eeg/sub-01_task-rest_eeg.fdt # if separate .fdt file
EEG (BrainVision .vhdr)
BrainVision files come in triplets (.vhdr, .vmrk, .eeg). All three must be renamed consistently:
cp source.vhdr sub-01/eeg/sub-01_task-rest_eeg.vhdr
cp source.vmrk sub-01/eeg/sub-01_task-rest_eeg.vmrk
cp source.eeg sub-01/eeg/sub-01_task-rest_eeg.eeg
Update internal references in .vhdr and .vmrk to point to renamed files.
EEG (EDF/BDF)
Copy and rename:
cp source.edf sub-01/eeg/sub-01_task-rest_eeg.edf
EMG
EMG follows the same pattern but uses the emg directory and suffix:
cp source.edf sub-01/emg/sub-01_task-grasp_emg.edf
Step 4: Create JSON Sidecars
EEG sidecar (required fields)
{
"TaskName": "rest",
"TaskDescription": "Eyes-open resting state recording",
"InstitutionName": "University Name",
"InstitutionAddress": "Address",
"Manufacturer": "BioSemi",
"ManufacturersModelName": "ActiveTwo",
"SamplingFrequency": 512,
"EEGChannelCount": 64,
"EOGChannelCount": 2,
"EMGChannelCount": 0,
"ECGChannelCount": 0,
"MiscChannelCount": 0,
"TriggerChannelCount": 1,
"PowerLineFrequency": 60,
"EEGPlacementScheme": "10-20",
"EEGReference": "CMS/DRL",
"EEGGround": "n/a",
"SoftwareFilters": "n/a",
"HardwareFilters": {"Highpass": {"HalfAmplitudeCutoffHz": 0.01}},
"RecordingType": "continuous",
"RecordingDuration": 300
}
EMG sidecar (required fields)
{
"TaskName": "grasp",
"TaskDescription": "Grasping task with force measurement",
"SamplingFrequency": 2000,
"EMGChannelCount": 8,
"PowerLineFrequency": 60,
"EMGPlacementScheme": "bipolar",
"EMGReference": "differential",
"Manufacturer": "Delsys",
"ManufacturersModelName": "Trigno",
"RecordingType": "continuous"
}
Step 5: Create TSV Files
channels.tsv
name type units sampling_freq
Установить bids-conversion в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл bids-conversion?
Use this skill for "convert to BIDS", "BIDS format", "create BIDS dataset", "BIDS sidecar", "participants.tsv", "events.tsv", "EEG BIDS", "EMG BIDS", "MEG BIDS", "fMRI BIDS", "BIDS validator", "channel locations", "electrode positions", "BIDS metadata", or when the user wants to convert neuroscience data to Brain Imaging Data Structure (BIDS) format or validate BIDS compliance.
Как установить скилл bids-conversion?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bids-conversion запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic