raamana / visualqc

VisualQC : assistive tool to ease the quality control workflow of neuroimaging data.
https://raamana.github.io/visualqc/
Apache License 2.0
73 stars 13 forks source link

visualqc_t1_mri error to detect outlier #34

Closed zswgzx closed 4 years ago

zswgzx commented 4 years ago

Description

Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.

Run through visualqc_t1_mri

What I Did

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.

visualqc_t1_mri -u . -i subjects -m t1.nii.gz

12 subjects are usable for review. Input folder: . Output folder: ./visualqc Preprocessing data - please wait .. (or contemplate the vastness of universe! ) Extracting feature type: histogram_whole_scan 200107_09_04319814 : 1/12 200107_15_51129205 : 2/12 200108_00_72128082 : 3/12 200108_01_82273425 : 4/12 200108_01_83887227 : 5/12 200108_06_06131380 : 6/12 200114_04_66523086 : 7/12 200114_04_91957295 : 8/12 200114_07_18910654 : 9/12 200115_00_27419385 : 10/12 200115_02_77379437 : 11/12 200115_05_12357443 : 12/12 Traceback (most recent call last): File "/home/shengwei/anaconda3/bin/visualqc_t1_mri", line 8, in sys.exit(main()) File "/home/shengwei/anaconda3/lib/python3.7/site-packages/visualqc/__t1_mri__.py", line 11, in main t1_mri.cli_run() File "/home/shengwei/anaconda3/lib/python3.7/site-packages/visualqc/t1_mri.py", line 777, in cli_run wf.run() File "/home/shengwei/anaconda3/lib/python3.7/site-packages/visualqc/workflows.py", line 75, in run self.preprocess() File "/home/shengwei/anaconda3/lib/python3.7/site-packages/visualqc/t1_mri.py", line 314, in preprocess self.detect_outliers() File "/home/shengwei/anaconda3/lib/python3.7/site-packages/visualqc/workflows.py", line 387, in detect_outliers features = gather_data(self.feature_paths[feature_type], self.id_list) File "/home/shengwei/anaconda3/lib/python3.7/site-packages/visualqc/readers.py", line 225, in gather_data features = np.vstack([np.genfromtxt(path_list[sid]) for sid in id_list]) File "/home/shengwei/anaconda3/lib/python3.7/site-packages/visualqc/readers.py", line 225, in features = np.vstack([np.genfromtxt(path_list[sid]) for sid in id_list]) KeyError: '200107_09_04319814'

raamana commented 4 years ago

Hi, thanks for the reporting this bug, which seems like a weird error with an older version.

can you try uninstall and reinstall this to get version 0.4.2, and try agaan with the following command:

pip uninstall visualqc
pip install -U visualqc

visualqc_t1_mri -u . -i subjects -m t1.nii.gz -old

the new flag -old at the end disables outlier detection.

zswgzx commented 4 years ago

Updated visualqc to version 0.4.2. Adding -old option works well. Thank you!

raamana commented 4 years ago

great to hear that. please feel free to let me know if you have any feedback.

if you use this for your research, I'd appreciate if you can cite it, thanks: https://raamana.github.io/visualqc/citation.html