Closed dkp closed 2 years ago
(note that it believes there are 2 sessions, but there is only one session...but mostly, it cannot find the data to work on)
This indicates that it believes that there is a total of two sessions within the BIDS dataset across all subjects, not necessarily two sessions within the one subject. But the answer to this is below.
Error when attempting load from "/bids_dataset": No raw or pre-processed T1-weighted images could be found in input directory "/bids_dataset" for session derivatives_MRtrix3_connectome-preproc_sub-219_ses-itbs
There is an issue arising here somehow in the parsing of session information. The session name should be "sub-219_ses-itbs
", but instead the parent directories are being accumulated into such for some reason. This can be seen here:
mrtrix3_connectome.py: [DEBUG] mrtrix3_connectome.get_sessions() (from mrtrix3_connectome.py:4110): ['derivatives/MRtrix3_connectome-preproc/sub-219/ses-itbs', 'sub-219/ses-itbs']
I'm thinking one possibility here is that you have created the "derivatives" directory as a sub-directory of the input BIDS dataset, as can be seen in your singularity run
call:
... --bind /groups/dkp/Nifti:/bids_dataset --bind /groups/dkp/Nifti/derivatives:/outputs ...
This I would have expected to result in the BIDS validator failing. A quick search suggests that the BIDS validator may have been hard-coded to ignore the contents of any derivatives/
sub-directory from root, in which case it's been deemed permissible and my code probably needs to do the same. I also seem to recall having had a discussion with the BIDS crew regarding what relative filesystem arrangements between raw and derived data should be permitted or not, though I'm having trouble finding it. For instance, the BIDS raw directory would ideally be mounted read-only by an application, and so having the output being written to a sub-directory of such is counter-intuitive to me personally.
So at your end, I would suggest placing your "derivatives
" directory somewhere other than within the BIDS raw directory, as this seems to be confusing my session parsing code.
It appears to be running after moving the derivatives directory... I do get your point about it being kind of weird to put derivatives inside a read-only directory..
Thanks for your support, -Dianne
Dianne Patterson, Ph.D Speech, Language and Hearing Sciences, Room 314 dkp@arizona.edu
From: Robert Smith notifications@github.com Sent: Monday, November 16, 2020 6:38 PM To: BIDS-Apps/MRtrix3_connectome MRtrix3_connectome@noreply.github.com Cc: Patterson, Dianne K - (dkp) dkp@arizona.edu; Author author@noreply.github.com Subject: [EXT]Re: [BIDS-Apps/MRtrix3_connectome] Trouble with participant level (#90)
External Email
(note that it believes there are 2 sessions, but there is only one session...but mostly, it cannot find the data to work on)
This indicates that it believes that there is a total of two sessions within the BIDS dataset across all subjects, not necessarily two sessions within the one subject. But the answer to this is below.
Error when attempting load from "/bids_dataset": No raw or pre-processed T1-weighted images could be found in input directory "/bids_dataset" for session derivatives_MRtrix3_connectome-preproc_sub-219_ses-itbs
There is an issue arising here somehow in the parsing of session information. The session name should be "sub-219_ses-itbs", but instead the parent directories are being accumulated into such for some reason. This can be seen here:
mrtrix3_connectome.py: [DEBUG] mrtrix3_connectome.get_sessions() (from mrtrix3_connectome.py:4110): ['derivatives/MRtrix3_connectome-preproc/sub-219/ses-itbs', 'sub-219/ses-itbs']
I'm thinking one possibility here is that you have created the "derivatives" directory as a sub-directory of the input BIDS dataset, as can be seen in your singularity run call:
... --bind /groups/dkp/Nifti:/bids_dataset --bind /groups/dkp/Nifti/derivatives:/outputs ...
This I would have expected to result in the BIDS validator failing. A quick search suggests that the BIDS validator may have been hard-coded to ignore the contents of any derivatives/ sub-directory from root, in which case it's been deemed permissible and my code probably needs to do the same. I also seem to recall having had a discussion with the BIDS crew regarding what relative filesystem arrangements between raw and derived data should be permitted or not, though I'm having trouble finding it. For instance, the BIDS raw directory would ideally be mounted read-only by an application, and so having the output being written to a sub-directory of such is counter-intuitive to me personally.
So at your end, I would suggest placing your "derivatives" directory somewhere other than within the BIDS raw directory, as this seems to be confusing my session parsing code.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/BIDS-Apps/MRtrix3_connectome/issues/90#issuecomment-728629863, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAHLUQC4W5G7PFVJH4QCCZ3SQHH3FANCNFSM4TXQVR7A.
In case it helps me find the information I'm looking for: were you following any specific instruction when you made the derivatives/
directory inside the BIDS raw dataset? While I can make changes to the code that would support such a filesystem arrangement, I'd prefer such a change to be driven by either current or future BIDS specification.
I have just settled on the derivatives inside the bids dir as a standard approach...I have not had a reason to change until now.
Are you looking for something like this:
Alternatively one can organize their data in the following way
my_dataset/ sourcedata/ ... rawdata/ dataset_description.json participants.tsv sub-01/ sub-02/ ... derivatives/ pipeline_1/ pipeline_2/ ...
In this example, where sourcedata and derivatives are not nested inside rawdata, only the rawdata subfolder needs to be a BIDS-compliant dataset. The subfolders of derivativesMAY be BIDS-compliant derivatives datasets (see Non-compliant derivativeshttps://bids-specification.readthedocs.io/en/latest/02-common-principles.html#non-compliant-derivatives for further discussion). This specification does not prescribe anything about the contents of sourcedatafolders in the above example - nor does it prescribe the sourcedata, derivatives, or rawdatafolder names. The above example is just a convention that can be useful for organizing raw, source, and derived data while maintaining BIDS compliancy of the raw data folder. When using this convention it is RECOMMENDED to set the SourceDatasets field in dataset_description.json of each subfolder of derivatives to:
Get Outlook for iOShttps://aka.ms/o0ukef
From: Robert Smith notifications@github.com Sent: Monday, November 16, 2020 8:32:14 PM To: BIDS-Apps/MRtrix3_connectome MRtrix3_connectome@noreply.github.com Cc: Patterson, Dianne K - (dkp) dkp@arizona.edu; Author author@noreply.github.com Subject: [EXT]Re: [BIDS-Apps/MRtrix3_connectome] Trouble with participant level (#90)
External Email
In case it helps me find the information I'm looking for: were you following any specific instruction when you made the derivatives/ directory inside the BIDS raw dataset? While I can make changes to the code that would support such a filesystem arrangement, I'd prefer such a change to be driven by either current or future BIDS specification.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/BIDS-Apps/MRtrix3_connectome/issues/90#issuecomment-728664171, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAHLUQF42O5O63DYNXVKMQLSQHVD5ANCNFSM4TXQVR7A.
Hi Robert, I'm feeling dumb here. The summary is, I ran the preproc level with no issue, but at the participant level, the container cannot find the relevant data. I've tried specifying the session and not specifying it (figuring it would do everything it found if I did not specify...consistent with the preproc step).
The preproc stage created appropriate looking files:
Participant Level
Next, I tried the participant stage several times, both with and without specifying the session.
Within seconds, I get the following log:
(note that it believes there are 2 sessions, but there is only one session...but mostly, it cannot find the data to work on)
Debug Mode