bids-validator config file example with ignoredFiles?

134 views
Skip to first unread message

d.jon.p...@gmail.com

unread,
Apr 7, 2017, 3:57:38 PM4/7/17
to bids-discussion
Hi Everyone,

   I'm trying to get bids-validator to ignore two main-level directories in my project called "download" and "documentation". I've tried all kinds of iterations of :

"ignoredFiles": [ "/download*" , "/documentation*" ]

"ignoredFiles": [ "*download*" , "*documentation*" ]

"ignoredFiles": [ "download*" , "documentation*" ]

"ignoredFiles": [ "download/*" ,  "documentation/*" ]

  in the config file, and the bids validator still tries to validate files in these directories. Is there some example of a config file that I can take a look at that has a non-empty ignoredFiles value that I can use as a template? I'm sure that there's something simple and dumb that I'm missing. I know that the validator is parsing my config file because it gives an error on a mis-formed config.

Thanks,
-Dan

Chris Gorgolewski

unread,
Apr 7, 2017, 4:32:49 PM4/7/17
to bids-discussion
Hi,

I'm really happy people are using the config file! I'm looking into the default config and it seems to be using double asterix:


Could you try this syntax?

Best,
Chris


--
You received this message because you are subscribed to the Google Groups "bids-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bids-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to bids-discussion@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bids-discussion/59b0c60f-c796-468e-a551-e77a8634f3e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

d.jon.p...@gmail.com

unread,
Apr 7, 2017, 5:18:34 PM4/7/17
to bids-discussion
This syntax exactly gives me json parsing errors because of the lack of double-quotes. 

I tried downloading one of the example BIDS datasets and running the validator on that - that works as expected. 

Then I added a directory called "invalid_directory", with an "invalid_file" under that.

I can't get the validator to ignore the invalid directory with any combination of single/double quotes or single/double asterisks in the config file. I also tried double AND single quotes.



On Friday, April 7, 2017 at 1:32:49 PM UTC-7, Chris Gorgolewski wrote:
Hi,

I'm really happy people are using the config file! I'm looking into the default config and it seems to be using double asterix:


Could you try this syntax?

Best,
Chris

On Fri, Apr 7, 2017 at 12:57 PM, <d.jon.p...@gmail.com> wrote:
Hi Everyone,

   I'm trying to get bids-validator to ignore two main-level directories in my project called "download" and "documentation". I've tried all kinds of iterations of :

"ignoredFiles": [ "/download*" , "/documentation*" ]

"ignoredFiles": [ "*download*" , "*documentation*" ]

"ignoredFiles": [ "download*" , "documentation*" ]

"ignoredFiles": [ "download/*" ,  "documentation/*" ]

  in the config file, and the bids validator still tries to validate files in these directories. Is there some example of a config file that I can take a look at that has a non-empty ignoredFiles value that I can use as a template? I'm sure that there's something simple and dumb that I'm missing. I know that the validator is parsing my config file because it gives an error on a mis-formed config.

Thanks,
-Dan

--
You received this message because you are subscribed to the Google Groups "bids-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bids-discussi...@googlegroups.com.
To post to this group, send email to bids-di...@googlegroups.com.

Chris Gorgolewski

unread,
Apr 8, 2017, 12:23:56 PM4/8/17
to bids-discussion
I do not seem to be able to replicate this bug. This is the simple example I used:

filo@MSI MINGW64 ~
$ bids-validator /d/data/ds000114_R2.0.1
        1: This file is not part of the BIDS specification, make sure it isn't included in the dataset by accident. Data derivatives (processed data) should be placed in /derivatives folder. (code: 1 - NOT_INCLUDED)
                /test
                        Evidence: test
                /test2
                        Evidence: test2

        2: Not all subjects/sessions/runs have the same scanning parameters. (code: 39 - INCONSISTENT_PARAMETERS)
                /sub-02/ses-test/anat/sub-02_ses-test_T1w.nii.gz

        Summary:                 Available Tasks:        Available Modalities:
        212 Files, 3.66GB        finger_foot_lips        T1w
        10 - Subjects                                    bold
        1 - Session


filo@MSI MINGW64 ~
$ cat config.json
{
"ignoredFiles": ["/test*", "/another"]
}


filo@MSI MINGW64 ~
$ bids-validator /d/data/ds000114_R2.0.1 -c config.json
        1: Not all subjects/sessions/runs have the same scanning parameters. (code: 39 - INCONSISTENT_PARAMETERS)
                /sub-02/ses-test/anat/sub-02_ses-test_T1w.nii.gz

        Summary:                 Available Tasks:        Available Modalities:
        212 Files, 3.66GB        finger_foot_lips        T1w
        10 - Subjects                                    bold
        1 - Session

To unsubscribe from this group and stop receiving emails from it, send an email to bids-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to bids-discussion@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bids-discussion/d1942423-c19d-438a-a7b6-1d13321da155%40googlegroups.com.

d.jon.p...@gmail.com

unread,
Apr 10, 2017, 2:28:01 PM4/10/17
to bids-discussion
Great, I was able to get it to work on the test data set, then apply it.

The trick was getting it to recognize all the files and sub-directories below it as well, so this pattern works:

"ignoredFiles": [ "/download/**" , "/documentation/**" ]

Thanks!!
-Dan
Reply all
Reply to author
Forward
0 new messages