-
Notifications
You must be signed in to change notification settings - Fork 32
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
fmap issue #514
base: main
Are you sure you want to change the base?
fmap issue #514
Conversation
[FIX & ENH] filter transformers apply to all inputs & basic transformer can act on specific rows
[ENH] Improve reports
[FIX & ENH] coerce several elements of the bids stats models
…sts from lower levels to a higher level - fixes cpp-lln-lab/bidspm#616
[ENH] improve bids.Description constructor
[FIX] fix printing of windows path
[ENH] Filter layout
for more information, see https://pre-commit.ci
I only see the participants.tsv. |
You may have to use https://github.com/bids-standard/bids-matlab/blob/dev/demos/.gitignore |
for more information, see https://pre-commit.ci
OMG - yes, forced add and push, it's finally there |
Will try to documment the debugging in the PR. dir 'entity' is unknown for several fmaps>> BIDS = bids.layout(pwd, 'verbose', true, 'use_schema', true)
Indexing dataset:
/home/remi/github/bids/matlab/demos/fmap_failexemple
Indexing subject: sub-55809 [.]
Indexing subject: sub-57460 [.Warning:
Skipping file: sub-57460_ses-1wkfollowup_acq-gre_dir-AP_run-1_magnitude1.nii.gz.
Unknown entities: 'dir'
Try using the parameter: " 'use_schema', false "
> In bids.internal.error_handling (line 57)
In bids.internal.append_to_layout (line 112)
In bids.layout>parse_using_schema (line 410)
In bids.layout>parse_subject (line 351)
In bids.layout (line 188) |
According to the spec only pepolar fmap support the dir entity |
Quick work around for now is to ask bids-matlab to index without relying on the schema. >> BIDS = bids.layout(pwd, 'verbose', true, 'use_schema', false)
Indexing dataset:
/home/remi/github/bids/matlab/demos/fmap_failexemple
Indexing subject: sub-55809 [.]
Indexing subject: sub-57460 [..]
Indexing subject: sub-57507 [.]
BIDS =
struct with fields:
pth: '/home/remi/github/bids/matlab/demos/fmap_failexemple'
description: [1×1 struct]
sessions: {}
participants: [1×1 struct]
subjects: [1×4 struct]
root: [0×0 struct]
is_datalad_ds: 0
>> bids.query(BIDS, 'data')
ans =
18×1 cell array
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-55809/ses-Baseline/fmap/sub-55809_ses-Baseline_acq-se_dir-AP_run-1_epi.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-55809/ses-Baseline/fmap/sub-55809_ses-Baseline_acq-se_dir-PA_run-1_epi.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57460/ses-1wkfollowup/fmap/sub-57460_ses-1wkfollowup_acq-gre_dir-AP_run-1_magnitude1.nii.gz'}
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57460/ses-1wkfollowup/fmap/sub-57460_ses-1wkfollowup_acq-gre_dir-AP_run-1_magnitude2.nii.gz'}
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57460/ses-1wkfollowup/fmap/sub-57460_ses-1wkfollowup_acq-gre_dir-AP_run-1_phasediff.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57460/ses-1wkfollowup/fmap/sub-57460_ses-1wkfollowup_acq-gre_dir-LR_run-1_magnitude1.nii.gz'}
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57460/ses-1wkfollowup/fmap/sub-57460_ses-1wkfollowup_acq-gre_dir-LR_run-1_magnitude2.nii.gz'}
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57460/ses-1wkfollowup/fmap/sub-57460_ses-1wkfollowup_acq-gre_dir-LR_run-1_phasediff.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57460/ses-Baseline/fmap/sub-57460_ses-Baseline_acq-se_dir-AP_run-1_epi.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57460/ses-Baseline/fmap/sub-57460_ses-Baseline_acq-se_dir-AP_run-2_epi.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57460/ses-Baseline/fmap/sub-57460_ses-Baseline_acq-se_dir-PA_run-1_epi.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57460/ses-Baseline/fmap/sub-57460_ses-Baseline_acq-se_dir-PA_run-2_epi.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57507/ses-Baseline/fmap/sub-57507_ses-Baseline_acq-gre_dir-AP_run-1_magnitude1.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57507/ses-Baseline/fmap/sub-57507_ses-Baseline_acq-gre_dir-AP_run-1_magnitude2.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57507/ses-Baseline/fmap/sub-57507_ses-Baseline_acq-gre_dir-AP_run-1_phasediff.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57507/ses-Baseline/fmap/sub-57507_ses-Baseline_acq-gre_dir-LR_run-1_magnitude1.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57507/ses-Baseline/fmap/sub-57507_ses-Baseline_acq-gre_dir-LR_run-1_magnitude2.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57507/ses-Baseline/fmap/sub-57507_ses-Baseline_acq-gre_dir-LR_run-1_phasediff.nii.gz' } |
other queries seem to work fine after that. @CPernet can you cross check that if you do not use the schema, for indexing you can query the files you need? >> BIDS = bids.layout(pwd, 'verbose', true, 'use_schema', false)
Indexing dataset:
/home/remi/github/bids/matlab/demos/fmap_failexemple
Indexing subject: sub-55809 [.]
Indexing subject: sub-57460 [..]
Indexing subject: sub-57507 [.]
BIDS =
struct with fields:
pth: '/home/remi/github/bids/matlab/demos/fmap_failexemple'
description: [1×1 struct]
sessions: {}
participants: [1×1 struct]
subjects: [1×4 struct]
root: [0×0 struct]
is_datalad_ds: 0
>> bids.query(BIDS, 'data')
ans =
18×1 cell array
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-55809/ses-Baseline/fmap/sub-55809_ses-Baseline_acq-se_dir-AP_run-1_epi.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-55809/ses-Baseline/fmap/sub-55809_ses-Baseline_acq-se_dir-PA_run-1_epi.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57460/ses-1wkfollowup/fmap/sub-57460_ses-1wkfollowup_acq-gre_dir-AP_run-1_magnitude1.nii.gz'}
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57460/ses-1wkfollowup/fmap/sub-57460_ses-1wkfollowup_acq-gre_dir-AP_run-1_magnitude2.nii.gz'}
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57460/ses-1wkfollowup/fmap/sub-57460_ses-1wkfollowup_acq-gre_dir-AP_run-1_phasediff.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57460/ses-1wkfollowup/fmap/sub-57460_ses-1wkfollowup_acq-gre_dir-LR_run-1_magnitude1.nii.gz'}
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57460/ses-1wkfollowup/fmap/sub-57460_ses-1wkfollowup_acq-gre_dir-LR_run-1_magnitude2.nii.gz'}
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57460/ses-1wkfollowup/fmap/sub-57460_ses-1wkfollowup_acq-gre_dir-LR_run-1_phasediff.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57460/ses-Baseline/fmap/sub-57460_ses-Baseline_acq-se_dir-AP_run-1_epi.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57460/ses-Baseline/fmap/sub-57460_ses-Baseline_acq-se_dir-AP_run-2_epi.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57460/ses-Baseline/fmap/sub-57460_ses-Baseline_acq-se_dir-PA_run-1_epi.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57460/ses-Baseline/fmap/sub-57460_ses-Baseline_acq-se_dir-PA_run-2_epi.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57507/ses-Baseline/fmap/sub-57507_ses-Baseline_acq-gre_dir-AP_run-1_magnitude1.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57507/ses-Baseline/fmap/sub-57507_ses-Baseline_acq-gre_dir-AP_run-1_magnitude2.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57507/ses-Baseline/fmap/sub-57507_ses-Baseline_acq-gre_dir-AP_run-1_phasediff.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57507/ses-Baseline/fmap/sub-57507_ses-Baseline_acq-gre_dir-LR_run-1_magnitude1.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57507/ses-Baseline/fmap/sub-57507_ses-Baseline_acq-gre_dir-LR_run-1_magnitude2.nii.gz' }
{'/home/remi/github/bids/matlab/demos/fmap_failexemple/sub-57507/ses-Baseline/fmap/sub-57507_ses-Baseline_acq-gre_dir-LR_run-1_phasediff.nii.gz' } |
If you want to stick to the schema, then this would require updating the spec by adding the dir entity for all fieldmaps. |
might relate to bids-standard/bids-specification#1391 |
i see that, although dir- should really be allowed any where, donæt you think |
Let's say I would not be shocked to have it added to many mri datatype instead of letting acq do the heavy lifting. |
Will probably switch this PR to draft until we see things more clearly on this front, it that is ok with you? |
tagged you in the bids validator issue -- the entitiy says you can, and it silly to have acq-se_dir-AP valid but acq-gre_dir-AP invalid |
yes |
not AP-PA field maps are in SPM dev (testing it) so we should add them @gllmflndn |
under demos/fmap_failexemple 3 subjects for which all files do not populate -- have figured why
-- note my bad, this includes the 'old' suggested change about the trial type on the face rep data set