-
Notifications
You must be signed in to change notification settings - Fork 1
regqc feature #65
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
base: main
Are you sure you want to change the base?
regqc feature #65
Conversation
…v path to snakebids.yml
Includes helper functions for locating transformation and reference files based on derivatives structure. Supports BIDS-compatible LEAD-DBS and fMRIPrep datasets.
add pacakges needed for regqc rule
fix to avoid snakemake x mamba2 issue; will default conda
|
updated snakemake profile to use conda and utils.yaml to include needed packages |
|
Hey @ataha24! Amazing work with this PR, can't wait to test it out! If you can add a little description of how to reproduce the results, it'd be awesome. |
|
In brief: when you run the workflow with the Currently, the workflow supports the default Lead-DBS template (MNI152NLin2009bAsym). We can extend support to additional templates by integrating with TemplateFlow for automated retrieval. The workflow relies on the To reproduce the results: Input: BIDS-compliant dataset with derivative Lead-DBS outputs. This is typically a derivatives directory called A typical run for the workflow would be: **Note, the "rawdata" directory is also provided by Lead-DBS. It is just a BIDS dataset with various images used in the typical Lead-DBS analysis. This run will output 3 files:
If you want some real data, I uploaded a full Lead-DBS dataset (n=1) here: https://drive.google.com/file/d/1vz5184Cp_U7pcBfL566PS5K-cQwRqW8Q/view?usp=sharing |
|
Thanks for the detailed comment @ataha24. Will test this feature out and update this PR accordingly! |
|
Hey @ataha24! The data you provided here: https://drive.google.com/file/d/1vz5184Cp_U7pcBfL566PS5K-cQwRqW8Q/view?usp=sharing doesn't have the necessary normalization folder in it and therefore when I try to run autoafids with this flag, I get an error: |
@Dhananjhay -- just downloaded the zip folder and looks like it does have the normalization folder. WIill clone branch and give it a shot to see if issues arise |
|
Ahh I figured it out. The problem wasn't the missing normalization folder (it's indeed there), but how you specify the path to leaddbs when running autoafids; it errors out if the path is relative and works fine if absolute, is that behaviour on purpose? |
|
I was able to run an end to end pipeline with the regqc feature! I had to add some missing packages into the conda env to make it run though. I also added ants for testing! Amazing work as always @ataha24. Once we figure out the relative vs absolute path choice, this PR should be good to be merged! |
Add Registration Quality Control (
regqc) FeatureThis PR adds a new
regqcworkflow to evaluate registration quality using anatomical fiducials (AFIDs). It supports derivatives from LEAD-DBS, and provides quantitative error metrics, interactive HTML visualizations, and transformed coordiante files.✨ Features
New Snakefile rule:
regqcLEAD_DBS_DIRorFMRIPREP_DIRis specified.htmldashboard with interactive plots and MRI viewer.csvfile with dx/dy/dz/ED errors per AFID.fcsvwith transformed AFID coordinatesFlexible input support
.nii.gz) and optional.mataffine transformsInteractive visual outputs
New script:
regqc.pyConfig updates
--LEAD-DBS-DIR--FMRIPREP-DIRtemplatet1w_lead,fcsv_mni_leadpaths✅ Validation
📁 Files Added / Modified
workflow/rules/regqc.smkworkflow/scripts/regqc.pyconfig/snakebids.ymlresources/tpl-MNI152NLin2009bAsym_res-01_T1w.nii.gz(skull stripped to meet GitHub file size req)resources/tpl-MNI152NLin2009bAsym_res-01_desc-groundtruth_afids.fcsvfMRIPrepis not currently working as the workflow has no logic to handle (.h5) transformsLeadDBSorfMRIPrep-- best to integrate AutoAFIDs withTemplateFlowand pull appropriate template based log filesLeadDBSorfMRIPrep.spaceBIDS entity🚨 Breaking Issues
.yamlfiles in/envare still inherited from main branch). However, all installations (e.g., plotly) were performed using mamba/conda install.