Conversation
This is a hack to fix errors when running parallelized predictions (h5py.File() throws OSErrors)
Before, classifier prediction output intermediate files were saved to subfolders of the freesurfer subject folder (surf/, mri/, xhemi/classifier/) which caused conflicts when running parallel predictions using the same freesurfer outputs, e.g., with different harmonisation parameters. Now, the outputs are saved to: - predictions/fsaverage_sym/ - predictions/surf_native/ - predictions/vol_freesurfer/ - predictions/vol_native/ - predictions/prediction.nii.gz (final output, unchanged)
This allows separating the preprocessing step (cannot be parallelized) from the prediction step (can be parallelized). --skip_prediction is not the same as --harmo_only: The latter leaves out some feature extraction steps necessary for predictions. --skip_feature_plotting just speeds the preprocessing, plots take a long time for many subjects and may not be needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Minor changes
🔧 Enable parallelisation of inferences
Changes made over the code to enable robust parallelisation of the inferences. Contribution from Cornelius Kronlage
predictions_reports/folder, e.g.:Which makes them easier to find and also avoids conflicts when running multiple predictions (with different harmo parameters) using the same freesurfer outputs.
🧠 Fix QC plotting
This fixes the FLAIR and T1 scans used to visualised Freesurfer surfaces and MELD prediction when using the script
new_pt_qc_script.py. The scans are now chosen to be in the same space than Freesurfer outputs to avoid potential misalignment of FLAIR. Fixes issue #113🧹 Other minor code cleanup : fixes issues #112 #115