Skip to content

Stats: Modify import of cohort data#1977

Merged
Lestropie merged 2 commits intodevfrom
stats_file_loading
Mar 12, 2020
Merged

Stats: Modify import of cohort data#1977
Lestropie merged 2 commits intodevfrom
stats_file_loading

Conversation

@Lestropie
Copy link
Copy Markdown
Member

Addresses issue raised in #1543. More details in commit message.

Tested as working in the case where the text file listing all input files for statistical inference resides in a directory that is neither the input fixel directory nor the current working directory.

Loading statistical inference cohort data could lead to issues if the text file containing the subject file list resided in a different directory. fixelcfestats was unique in that it would also look for those files relative to the input fixel directory; but this would not work if the subject list text file was not in the current working directory, as the directory of that file was erroneously added to the file basename prior to Path::join(). In this change, the potential utilisation of different base directories in order to find the input data is generalised and moved to CohortDataImport::initialise(). For most commands, locating all input files is first tested relative to the location of the subjects test file, then the current working directory. In the case of fixelcfestats, the input fixel directory tested before either of these two. Only if all input files are found on the filesystem for a given directory location is the import of data from those files attempted.
@Lestropie Lestropie self-assigned this Mar 12, 2020
@Lestropie Lestropie merged commit 0041ddc into dev Mar 12, 2020
@Lestropie Lestropie deleted the stats_file_loading branch March 12, 2020 06:53
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

Successfully merging this pull request may close these issues.

1 participant