Step 1: Create a TSV file for each assessment tool¶
Prerequisite
Your questionnaire data should be available in .csv format. Survey platforms like LimeSurvey provide export options for this. If one export file contains multiple questionnaires, you will split it in this step.
Export or digitise your data¶
Questionnaire data is typically collected through an online survey tool (e.g. LimeSurvey) and exported as .csv or .sav. If you have pen-and-paper data, digitise it first.
Example raw export (full_survey_export_V2.csv):
| VPCode | BDI_Item1 | BDI_Item2 | BDI_ItemX | PHQ9_Item1 | PHQ_Item2 | PHQ_ItemX |
|---|---|---|---|---|---|---|
| PHWEE | 2 | 2 | 3 | stimme nicht zu | 3 | stimme voll und ganz zu |
| AWEEE | 1 | 1 | 2 | 4 | stimme nicht zu | 2 |
Clean your data¶
Before annotating, remove entries that should not be in the dataset — for example, test entries, survey previews, or participants who only answered one question and then dropped out.
Separate questionnaires into individual files¶
BIDS requires one .tsv file per assessment tool. Split the raw export accordingly. For non-standardised questionnaires, group semantically related items together.
Each file must have participant_id as its first column.
Example structure after splitting:
phenotype/
├── autism_quotient_10.tsv
├── beck_depression_inventory.tsv
├── patient_health_questionnaire.tsv
├── empathy_quotient_10.tsv
└── toronto_alexithymia_scale.tsv
Naming: Use the name of the questionnaire as the file name (e.g. beck_depression_inventory.tsv).
Convert response values to numbers¶
BIDS requires that all response values in the .tsv are numeric. Textual responses (e.g. "stimme nicht zu", "not at all") must be converted to their numeric equivalents. The mapping between numbers and labels is documented in the accompanying .json file (Step 2).
Exception: Free-text responses given by participants may remain as text.
Example before and after:
| participant_id | PHQ9_Item1 | PHQ_Item2 | PHQ_ItemX |
|---|---|---|---|
| PHWEE | not at all | 3 | fully agree |
becomes:
| participant_id | PHQ9_Item1 | PHQ_Item2 | PHQ_ItemX |
|---|---|---|---|
| PHWEE | 0 | 3 | 5 |
Naming and completeness rules¶
- Each file must contain a
participant_idcolumn. - Column names for questionnaire items can be chosen freely.
- Every participant listed in
participants.tsvmust have a row in each<measurement_tool>.tsv. If a participant did not complete a questionnaire, fill their row withn/a.
Edge cases¶
| Situation | Solution |
|---|---|
| Pre-screening participants (no imaging data) | Store in a subdirectory (e.g. phenotype/pheno-extra/) and add it to .bidsignore |
| Drop-outs or varying questionnaires across participants | Include the participant in every .tsv, fill missing values with n/a |
| Longitudinal data (multiple sessions) | Add the session label to the file name: <measurement_tool>_ses-01.tsv, <measurement_tool>_ses-02.tsv |