Skip to content

Commit 82fcc0b

Browse files
ISMAILI AdamISMAILI Adam
authored andcommitted
doc modified and errors replaced by warnings
1 parent d16cce0 commit 82fcc0b

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

docs/Converters/GENFItoBIDS.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,24 @@ where:
9999
- For `participants.tsv` : `blinded_code`, `blinded_family`, `blinded_site`, `gender`.
100100
- For `sessions.tsv` : `age_at_visit`, `date_of_assessment`, `diagnosis`, `education`, `ftld-cdr-nm-global`, `genetic_group`, `genetic_status_1`, `genetic_status_2`, `visit`.
101101
<br> All the remaining clinical data is optional and added through the use of the `-full` flag.
102-
- `--clinical-data-txt/-cdt` is a txt file containing the additional fields the user wants, written one field per line. The available data can be retrieved inside the installation of clinica at this location : `your_path_to_clinica/clinica/converters/genfi_to_bids/specifications/full_specs.csv`.
102+
- `--clinical-data-txt/-cdt` is a txt file containing the additional fields the user wants. The available data can be retrieved inside the installation of clinica at this location : `your_path_to_clinica/clinica/converters/genfi_to_bids/specifications/full_specs.csv`. This file should be written one field per line such as in the example below :
103+
```diagnosis_1
104+
diagnosis_1.1
105+
diagnosis_2
106+
diagnosis_3
107+
diagnosis_4
108+
diagnosis_5
109+
diagnosis_6
110+
diagnosis_7
111+
diagnosis_8
112+
diagnosis_child1
113+
diagnosis_child2
114+
digit_symbol
115+
disinhibition
116+
dob
117+
drc_qc
118+
drug_history
119+
...```
103120
- `-gif` allows the user to add all the clinical data related to the imaging volumes (GIF, Geodesic Information Flow) to `session.tsv`. The added clinical data also contain the mandatory ones.
104121
- `-full` allows the user to add all clinical data (mandatory, GIF, and the remaining optional ones) to `sessions.tsv`.
105122

test/unittests/converters/test_genfi_to_bids_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ def test_load_clinical_data_list_empty(tmp_path, clinical_data_list, expected):
579579
cdt_path = tmp_path / "additional_clinical_data.txt"
580580
cdt_path.write_text("".join(clinical_data_list), encoding="utf-8")
581581

582-
with pytest.raises(ValueError, match=re.escape(expected)):
582+
with pytest.warns(UserWarning, match=re.escape(expected)):
583583
_load_clinical_data_list(cdt_path, FULL_SPECS_DF)
584584

585585

@@ -589,9 +589,9 @@ def test_load_clinical_data_list_unknown_field(tmp_path):
589589
cdt_path = tmp_path / "additional_clinical_data.txt"
590590
cdt_path.write_text("blinded_family\nfalse_field\naad\n", encoding="utf-8")
591591

592-
expected = "Error at line 2: 'false_field' not found in specifications."
592+
expected = "Line 2: 'false_field' not found in specifications."
593593

594-
with pytest.raises(ValueError, match=re.escape(expected)):
594+
with pytest.warns(UserWarning, match=re.escape(expected)):
595595
_load_clinical_data_list(cdt_path, FULL_SPECS_DF)
596596

597597

0 commit comments

Comments
 (0)