-
Notifications
You must be signed in to change notification settings - Fork 12
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
BIDS filter not working #439
Comments
Can you share the output log and the contents of the filter file you are using? Also looks like your line break on FYI - The latest release is |
BIDS -filter json { } I corrected the derivatives flag and ran again. |
Were any T2w images found? I don't think |
@mgxd, nibabies uses pybids to find files based on the bids filter file, right? @bilas003 had tried running some independent tests with pybids that involved a filter file with fields that reference the JSON metadata. In her example, it looked like pybids came up with the right files based on the filter settings. |
Hi @bilas003, @mgxd just informed me that another good option to test would be trying to put null (without quotations) for the t2w "acq" entity in the BIDS Filter File. This should be another strategy to avoid the localizer images (since they have "acq-mrsLoc" in their name) during processing, without Nibabies needing to search through the JSON meta-data. Could you try running another test where you replace the t2w filter file content to be: |
You'll have to use the full entity name - |
There are a few moving parts here, can you clarify the following?
Additionally, some suggestions:
|
Hi @mgxd Here is the tree structure filter like is I followed your suggestions and made changes with latest version of sif , the job fails with below err |
RE: filter - Which file are you trying to isolate? I don't see anything matching your T2w criteria...you are looking for: RE: the validation failure, I'm not quite sure what |
FYI - if multiple files are found for |
Hi Mathias, thanks for the replies! That sounds good, I think we misunderstood your comment about setting "acquisition" to null. We thought you were saying that this could create exclusion like behavior. Another way that we could use BIDS Filter Files to get the file selection we want is to have the BIDS Filter File use information from the anat JSON sidecars such as "SeriesDescription":"anat-t2w. This is what we were originally trying, and it worked as expected in pybids, but it wasn't giving the expected behavior in Nibabies. Do you think it would be within scope for Nibabies to accept filter files that use metadata information from within JSON sidecars? |
I tested this, and can confirm our data collection already filters based on JSON sidecars as well as filename entities. I just added #452 to improve the transparency of which files are being used. |
Thanks! @bilas003 could you download the new 'unstable' version of Nibabies from Docker Hub and share what you are seeing when you use the --verbose flag (with the filter file you were originally using in your Jan 27 message)? |
Hi @mgxd { |
I haven't seen that error, but if the dataset is valid BIDS, then just use |
Picked Ross's brain about it earlier - it's a node error, likely from either a really large JSON or TSV. @bilas003 it would be nice to verify the BIDS directory is actually valid, especially since the problem seems to be with indexing. |
Thanks for the replies. Given that we have accelerometry/motion data stored in TSV files (following https://bids-specification.readthedocs.io/en/stable/modality-specific-files/motion.html), we definitely do have very large (~600MB) TSV files. @bilas003 is now also trying running processing with --skip-bids-validation following @effigies suggestion. We had previously processed this subject successfully without the filter file, so the formatting should be pretty good, although I think there are still some minor errors detected by the validator (unrelated to any fMRI/T1w/T2w/fmap files). |
has this been resolved? |
We had ran a couple of tests that accidentally had some odd features, so they were inconclusive. We are starting some more tests right now and will hopefully know tomorrow. |
Okay things are working pretty well now! So we are currently using the unstable version of Nibabies (as of a couple of weeks ago) with the skip bids validation flag activated. We have run two tests with filter files. The first test used a filter file like this:
And Nibabies correctly looked through the JSON metadata to find the "SeriesDescription" information that we wanted to use for T2w filtering. The only unexpected behavior that we observed was that Nibabies still grabbed a T1w image even though it wasn't specified in the filter file. Following that we ran this second test with a SeriesDescription that will never occur in practice:
And with this test Nibabies avoided the T1w image from the BIDS directory during processing. In both cases the visual report still said that there was 1 Input T1w image (with no reference to the T2w image). But in the second example this was the only trace of T1w involvement that we noticed. I imagine we may run an additional test or two to look at cases where other images are the target of filtering. But this looks promising so far! |
What happened?
BIDS-filter is not working to filter out the set of files with the latest release of the build. The job ran for 4 days and then timed out . Can anyone help?
What command did you use?
What version of NiBabies are you using?
nibabies-24.0.0.sif
Relevant log output
Add any additional information or context about the problem here.
The text was updated successfully, but these errors were encountered: