MRIQC T1w Classifier
See original GitHub issueI have MRIQC Outputs of approximately 1000 T1w images. I would like to produce the default T1w classifier using the mriqc_clf command. Since I’m working with singularity on a HPC server I use the following command after loading the singularity module:
singularity exec -c -B $SCRATCH:/mnt/ $SCRATCH/.scinet/mriqc-sandbox.img mriqc_clf --load-classifier -X /mnt/MRIQC/Study_QC/T1w.csv
with the exception of the following minor warning there are no errors.
Fontconfig warning: ignoring C.UTF-8: not a valid language tag
No new output is generated after the command is run and no new additional column is created in the T1w.csv. I’m not sure what has gone wrong here?
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
The MRIQC classifier for T1w images
The MRIQC classifier for T1w images¶. MRIQC is shipped with a random-forests classifier, using the combination of the ABIDE and DS030 datasets as...
Read more >MRIQC T1w Classifier · Issue #699 - GitHub
I have MRIQC Outputs of approximately 1000 T1w images. I would like to produce the default T1w classifier using the mriqc_clf command.
Read more >MRIQC Classifier - Neurostars
I have a quick question about the MRIQC classifier function (mriqc_clf). ... mriqc_clf --load-classifier \ -X /path/to/derivatives/T1w.csv.
Read more >mriqc-learn - PyPI
MRIQC is released with two classifiers (already trained) to predict image quality of T1w images. Tip. You can customize the MRIQC classifier ......
Read more >how to use mriqc_clf in docker - Google Groups
mriqc_clf --load-classifier c:\programdata\anaconda3\lib\site-packages\mriqc\data\rfc-nzs-full-1.0.pklz -X T1w.csv -o outputs\mypredictionsT1w.csv.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi @n2parker and @oesteban,
I ran into a similar issue using mriqc with singularity on the same HPC server. Like @n2parker, I received no warnings or errors when running
mriqc_clf(exit status is 0), and the T1w.csv is not modified.Replicating the original issue
The command I ran is below. Note that:
$HOMEon the HPC server I work with is readable but not writeable for jobs run on compute nodes. As such, I send-H $SCRATCH/sing_hometo assign a writeable$HOMEfor singularity containers.PYTHONPATHto force singularity to use the container’s python.To check whether T1w.csv was modified, I ran
ls -l $SCRATCH/BIDS/mriqc_clf/CN_BIDS_output/T1w.csvbefore and aftersingularity execas above. The file modification times are not altered, and no new columns are added to T1w.csv. Additionally,echo $?(the most recent exit code) returns0after runningsingularity exec.As mentioned by @oesteban above, I tried the
-oflag, but as reported by @n2parker, it was not recognized. I suspect this is because I’m using mriqc 0.11.0 where-ois not supported.Further troubleshooting
I re-ran the command with
mriqc_clf -vto increase verbosity. The output with-vstates:Navigating to
$SCRATCH/sing_home, I found the filemclf_run-20180705-180940_data-unseen_pred.csv. I then ran:The .csv contains 3 columns:
subject_id,prob_y, andpred_y. Thesubject_idvalues correspond with the subject IDs from my BIDS input folder, whileprob_yvalues seem to be propensity scores(?), andpred_yvalues seem to be the classifier’s rating (i.e.0or1).Remaining issues
Based on the comment from @oesteban here, it seems like the expected behaviour of
mriqc_clfis to add values inpred_yfrommclf_run-*_data_unseen_pred.csvto the respectivesubject_idrow inT1w.csv. Can someone from Poldrack Lab please confirm whether this is the case?If the
pred_yvalues inmclf_run-*_data-unseen_pred.csvare the correct values, one approach to resolution might be…mriqc_clfto makemclf_run-*_data-unseen_pred.csvand properly append the columnpred_ytoT1w.csv.Note that a new
mclf_run-*_data-unseen_pred.csvis created in$HOMEeach timesingularity execis run. This file is not deleted when the singularity command exits. As such, using the same $HOME directory withmriqc_clfmay get confusing when running multiple datasets (the .csv files are distinguished by timestamp only).Hi @n2parker, @nathankchan.
I can confirm all that @nathankchan described, and add some details:
mclf_run-*_data-unseen_pred.csvfiles are created in the working directory (not $HOME)pred_ycolumn are the prediction scores (threshold = 0.5) of the random forests.I’ll work in making the interface of the classifier more intuitive. I agree it is quite a mess at this moment. Sorry about that.