This repository is deprecated. See the new repository on GitLab
Image quality metrics for quality assessment of MRI
Build context for a Flywheel Gear which runs the mriqc
tool.
For more information see MRIQC's documentation
No-reference image quality metrics for quality assessment of MRI
This repository is deprecated. See the new repository on GitLab
Image quality metrics for quality assessment of MRI
Build context for a Flywheel Gear which runs the mriqc
tool.
For more information see MRIQC's documentation
An input file had a space in it and it may be causing this strange behavior in the gear run. Below is the gear log:
Starting gear execution.
HOSTNAME=nsinit
TERM=xterm
FW_CONFIG_MEASUREMENT=auto-detect
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/flywheel/v0
SHLVL=1
HOME=/root
_=/usr/bin/env
[flywheel/mriqc] Starting...
Input filename is not in BIDS format. Detecting measurement...
Auto-detecting input file measurement
Auto-detected input file measurement as anatomy_t1w
cp: target '/flywheel/v0/output/work/sub-T1MPRAGE/anat/sub-T1MPRAGE_T1w.nii.gz' is not a directory
2017-11-10 17:33:30,138 root:INFO Running MRIQC-0.9.4 (analysis_levels=[participant], participant_label=['T1MPRAGE'])
Settings={'bids_dir': '/flywheel/v0/output/work/sub-T1MPRAGE', 'write_graph': False, 'testing': False, 'hmc_afni': True, 'hmc_fsl': False, 'fft_spikes_detector': False, 'n_procs': 4, 'ants_nthreads': 3, 'output_dir': '/flywheel/v0/output/out', 'work_dir': '/flywheel/v0/output/work', 'verbose_reports': False, 'float32': False, 'ica': False, 'deoblique': False, 'despike': False, 'correct_slice_timing': False, 'report_dir': '/flywheel/v0/output/out/reports'}
2017-11-10 17:33:30,151 root:WARNING No T1w scans were found in /flywheel/v0/output/work/sub-T1MPRAGE
2017-11-10 17:33:30,151 root:WARNING No bold scans were found in /flywheel/v0/output/work/sub-T1MPRAGE
2017-11-10 17:33:30,151 root:WARNING No T2w scans were found in /flywheel/v0/output/work/sub-T1MPRAGE
participant labels ['^T1MPRAGE$']
Traceback (most recent call last):
File "/usr/local/miniconda/bin/mriqc", line 11, in <module>
load_entry_point('mriqc==0.9.4', 'console_scripts', 'mriqc')()
File "/usr/local/miniconda/lib/python3.6/site-packages/mriqc/bin/mriqc_run.py", line 264, in main
'BIDS-compliant.' % settings['bids_dir'])
RuntimeError: Error reading BIDS directory (/flywheel/v0/output/work/sub-T1MPRAGE), or the dataset is not BIDS-compliant.
cp: target 'MPRAGE_mriqc.qa.html' is not a directory
No results found in output directory... Exiting
Exit code was -1 after running for 12.266391555s.
Fail when autodetect fails and there's nothing to do.
Possible exit codes to use:
1: general purpose failure
17: invalid inputs
18: invalid options
FW-375
The measurements
key on the metadata.json
doc is preventing the engine from uploading results.
The MRIQC gear has a check if a filename is already BIDS compliant.
The regular expression that is used to check if the functional image is BIDS compliant is incomplete.
The current regular expression is the following:
bids_func_re="sub-[0-9a-zA-Z]+_task-[0-9a-zA-Z]+(_acq-[0-9a-zA-Z]+)?(_rec-[0-9a-zA-Z]+)?(_run-[0-9]+)?_bold"
It is missing the optional session information as well as echo information. The regular expression should be changed to the following:
bids_func_re="sub-[0-9a-zA-Z]+(_ses-[0-9a-zA-Z]+)?_task-[0-9a-zA-Z]+(_acq-[0-9a-zA-Z]+)?(_rec-[0-9a-zA-Z]+)?(_run-[0-9]+)?(_echo-[0-9]+)?_bold"
A measurement for an input dataset may contain capital letters. Currently, if the measurement contains an uppercase value, the gear returns a message stating that the measurement is invalid. Update mriqc to be able to correctly handle uppercase values.
Below is a log where the input measurement was 'Anatomy_t1w' and considered invalid:
Starting gear execution.
HOSTNAME=nsinit
TERM=xterm
FW_CONFIG_MEASUREMENT=auto-detect
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/flywheel/v0
SHLVL=1
HOME=/root
_=/usr/bin/env
[flywheel/mriqc] Starting...
Input filename is not in BIDS format. Detecting measurement...
Auto-detecting input file measurement
Auto-detected measurement is Anatomy_t1w
Measurement needs to be 'anatomy_t1w', 'anatomy_t2w', or 'functional'
MRIQC algorithm will not run - nothing to do - exit(0)
Exit code was 0 after running for 276.26115ms.
Add configuration option to allow for anatomical data to be processed.
+++
I opened one of the QC documents and at the very bottom, you have the link to a user guide
http://mriqc.readthedocs.io/en/latest/userguide.html
Looks like the link is broken. There is no documentation in this link.
Just wanted to let you know.
+++
confirmed. link should be
Once upgraded to 0.10.0, assess the command line flags available within this new release and expose them as configuration parameters.
http://mriqc.readthedocs.io/en/latest/running.html#command-line-interface
The following command line flags have been highlighted and must be included:
--start-idx START_IDX
--stop-idx STOP_IDX
--verbose-reports
--write-graph
Currently, mriqc only outputs the summary html report. Add a configuration that will save all generated outputs from the algorithm.
config info
name: 'save_outputs'
type: 'boolean'
default: off
TODO: Determine if functionality can be added to make gear run as a utility gear or an analysis gear.
Result cannot be uploaded by engine, because the metadata.json is invalid.
Resolution by the end of this week would be greatly appreciated.
I believe this is the offending line. There are several more that may be impacted. https://github.com/flywheel-apps/mriqc/blob/master/run#L268
invalid metadata.json that is generated
{ "acquisition" : { "files" : [{ "name" : "sub-01_ses-retest_task-linebisection_bold_mriqc.qa.html","type": "qa","classification": ,"info" : { "aor": 0.018852278481012657, "aqi": 0.01868801620253165, "bids_meta": { "modality": "bold", "session_id": "retest", "subject_id": "01", "task_id": "linebisection" }, "dummy_trs": 1, "dvars_nstd": 20.261016251567792, "dvars_std": 1.1016295977966106, "dvars_vstd": 1.120930209745763, "efc": 0.3900245152634556, "fber": 2249.833984375, "fd_mean": 0.135749212397187, "fd_num": 36, "fd_perc": 15.189873417721518, "fwhm_avg": 2.6552603245267092, "fwhm_x": 2.552025, "fwhm_y": 3.0362, "fwhm_z": 2.3775559735801273, "gcor": 0.0428054, "gsr_x": -0.006997726392000914, "gsr_y": 0.00818222388625145, "provenance": { "md5sum": "58392e3ead9caeefe148a57c71dd5b44", "settings": { "fd_thres": 0.2, "hmc_fsl": false }, "software": "mriqc", "version": "0.11.0", "webapi_port": null, "webapi_url": null }, "size_t": 237, "size_x": 64, "size_y": 64, "size_z": 30, "snr": 4.872862257593941, "spacing_tr": 2.5, "spacing_x": 4, "spacing_y": 4, "spacing_z": 3.999964714050293, "summary_bg_k": 109.44461293244024, "summary_bg_mad": 2.877626419067383, "summary_bg_mean": 33.1856803894043, "summary_bg_median": 26.64556884765625, "summary_bg_n": 83631, "summary_bg_p05": 15.867087841033936, "summary_bg_p95": 71.81856536865234, "summary_bg_stdv": 29.821584701538086, "summary_fg_k": 2.01237749463263, "summary_fg_mad": 208.70286560058594, "summary_fg_mean": 1303.94677734375, "summary_fg_median": 1330.5316162109375, "summary_fg_n": 14795, "summary_fg_p05": 771.4712768554687, "summary_fg_p95": 1696.5619750976562, "summary_fg_stdv": 273.0400695800781, "tsnr": 44.75415802001953 }}]}}
If a file is named 1.3.12.2.5.0.0.0.nii.gz
, MRIQC will define the file extension as 3.12.2.5.0.0.0.nii.gz
causing the BIDS filename to be sub-1_task-_bold.3.12.2.5.0.0.0.nii.gz
.
Be able to correctly identify the extension when '.' in the filename.
Currently the measurement/classification of the output html file is "T1w".
The correct measurement/classification value of a structural T1w image is "Anatomy_t1w".
However, since this is an html report and not an actual T1w image, I believe this should not be used.
@lmperry do you have thoughts on what the measurement/classification should be for the MRIQC output html file?
Use input file's classification/metadata (if available) to determine measurement so the user does not have to select it. This will allow this gear to run automatically in many cases.
Could have measurement options as such:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.