Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIDECAR_WITHOUT_DATAFILE: should adjust check so it works on annexed files (broken symlinks) #2125

Open
yarikoptic opened this issue Sep 6, 2024 · 2 comments
Labels

Comments

@yarikoptic
Copy link
Contributor

ATM we get a number of

        2: [ERR] A json sidecar file was found without a corresponding data file (code: 90 - SIDECAR_WITHOUT_DATAFILE)
                ./sub-0001/ses-01/fmap/sub-0001_ses-01_acq-96dirX6b0Xmb_dir-ap_epi.json
                ./sub-0001/ses-01/func/sub-0001_ses-01_task-alignvideo_acq-mb8_run-01_bold.json
                ./sub-0001/ses-02/fmap/sub-0001_ses-02_acq-mb8_dir-ap_run-01_epi.json
                ./sub-0001/ses-02/func/sub-0001_ses-02_task-alignvideo_acq-mb8_run-01_bold.json
                ./sub-0001/ses-03/fmap/sub-0001_ses-03_acq-mb8_dir-ap_run-01_epi.json
                ./sub-0001/ses-03/func/sub-0001_ses-03_task-alignvideo_acq-mb8_run-01_bold.json
                ./sub-0001/ses-04/fmap/sub-0001_ses-04_acq-mb8_dir-ap_run-01_epi.json
                ./sub-0001/ses-04/func/sub-0001_ses-04_task-alignvideo_acq-mb8_run-01_bold.json
                ./sub-0002/ses-01/fmap/sub-0002_ses-01_acq-96dirX6b0Xmb_dir-ap_epi.json
                ./sub-0002/ses-01/func/sub-0002_ses-01_task-alignvideo_acq-mb8_run-01_bold.json
                ... and 836 more files having this issue (Use --verbose to see them all).

although looking for a sample we do have a broken symlink file:

❯ ls -l ./sub-0001/ses-01/fmap/sub-0001_ses-01_acq-96dirX6b0Xmb_dir-ap_epi.*
-rw------- 1 yoh yoh 29381 Feb 13  2024 ./sub-0001/ses-01/fmap/sub-0001_ses-01_acq-96dirX6b0Xmb_dir-ap_epi.json
lrwxrwxrwx 1 yoh yoh   143 Mar 18  2022 ./sub-0001/ses-01/fmap/sub-0001_ses-01_acq-96dirX6b0Xmb_dir-ap_epi.nii.gz -> ../../../.git/annex/objects/9w/13/MD5E-s2505686--7466a152870ff883702e136b78e2a2eb.nii.gz/MD5E-s2505686--7466a152870ff883702e136b78e2a2eb.nii.gz

IMHO in this test, it should allow for a symlink or to provide a different message.

FWIW according to absent output in

❯ /usr/bin/find sub-* -iname '*_*.json' | while read f; do /bin/ls ${f%.json}.[^j]* > /dev/null || echo $f; done

I likely have no sidecar files without some other non .json file

@effigies
Copy link
Collaborator

effigies commented Sep 6, 2024

Is this legacy or schema?

@yarikoptic
Copy link
Contributor Author

legacy.

@effigies effigies added the legacy label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants