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

Request: flag to glob.glob to search recursively for template in Selectfiles() #3644

Open
luisa-sophia opened this issue Apr 9, 2024 · 0 comments

Comments

@luisa-sophia
Copy link

Currently, SelectFiles() does not leave much room to handle subjects with incongruent file locations. At this point, it is not possible to specify a template pattern that matches paths with different number of subdirectories between root and file, which requires ugly workarounds. However, this could be easily solved by setting the recursive flag in glob.glob() in SelectFiles() to true, which would allow a pattern like "a/b/**/file.txt" to match both paths "a/b/c/file.txt", as well as "a/b/file.txt".
Would it be possible to add this to SelectFiles() (e.g. as an argument) such that glob.glob() optionally employs a recursive search strategy?

See nipype/nipype/interfaces/io.py -->filelist = glob.glob(template)) (line 1239)

Thanks,
Luisa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant