Skip to content

[BUG] In adni-to-bids, empty sessions files are not cleaned up #1189

@AliceJoubert

Description

@AliceJoubert

While working on PR #1188 I noticed that even if all images of a session are deleted for a modality the folder specific for the modality is still kept. As an example, for the ADNI subject 002_S_1261 :

(clinicaEnv) alice.joubert@ICM-COLLI-MP013 testing % tree
.
├── README
├── conversion_info
│   └── v0
│       └── fmap_paths.tsv
├── dataset_description.json
├── participants.tsv
├── sub-ADNI002S1261
│   ├── ses-M096
│   │   ├── fmap
│   │   └── sub-ADNI002S1261_ses-M096_scans.tsv
│   ├── ses-M120
│   │   ├── fmap
│   │   │   ├── sub-ADNI002S1261_ses-M120_fmap_e1.json
│   │   │   ├── sub-ADNI002S1261_ses-M120_fmap_e1.nii.gz
│   │   │   ├── sub-ADNI002S1261_ses-M120_fmap_e2.json
│   │   │   ├── sub-ADNI002S1261_ses-M120_fmap_e2.nii.gz
│   │   │   ├── sub-ADNI002S1261_ses-M120_fmap_e2_ph.json
│   │   │   └── sub-ADNI002S1261_ses-M120_fmap_e2_ph.nii.gz
│   │   └── sub-ADNI002S1261_ses-M120_scans.tsv
    └── sub-ADNI002S1261_sessions.tsv

The files got deleted for session M096 but the fmap directory was kept. This might be something we want to clean up.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions