Giter VIP home page Giter VIP logo

qmtools's Introduction

QMTools - Quality Metrics Tools

This is a public code repository of the Translational Bioimaging Resource–MRI core group at the University of Arizona.

Authors: Tom Hicks and Dianne Patterson

About: This project provides several programs to visualize, compare, and review the image quality metrics (IQMs) produced by the MRIQC program. MRIQC extracts no-reference IQMs from structural (T1w and T2w) and functional (BOLD) MRI data.

Using QMTools via Docker (or Apptainer)

The easiest way to use the QMTools is via the publicly available Docker container or an Apptainer container derived from the Docker image. With this approach, the QMTools, located in the container, are called by auxiliary Bash scripts to process data from input and output directories which the scripts make available to the container. Scripts, examples, and documentation which support and simplify this process are available in the QMTools Support project on GitHub. Since this approach requires only Docker or Apptainer and the bash shell to be installed on your local computer, it has a minimal "footprint".

Note: For documentation on the individual tools and how to use the tools via Docker, please see the QMTools Support project.

Installing with Conda

You can also install the main QMTools project (not the Support project) locally on your computer and run the tools from there. Using Miniconda, you can easily set up an isolated environment to run the QMTools without interfering with other local software.

Installing with a Python Virtual Environment

More knowledgable users can install the main QMTools project (not the Support project) locally using a Python virtual environment.

Related Links

The source code for the QMTools Support project in GitHub.

The QMTools project was inspired by a 2019 Neurohackademy project available here.

The Swagger UI for the MRIQC web API. Scroll down to the Models section, which documents the database schema (structure and field names) that can be queried with QMFetcher.

The source code for the MRIQC web API, which provides the API that QMFetcher uses to query the MRIQC database.

Some old Discussions and Jupyter notebooks which utilize the same MRIQC web API that this project uses.

References

  • Esteban O, Blair RW, Nielson DM, Varada JC, Marrett S, Thomas AG et al. (2019). Crowdsourced MRI quality metrics and expert quality annotations for training of humans and machines. Sci Data 6: 30.

  • Esteban O, Birman D, Schaer M, Koyejo OO, Poldrack RA, Gorgolewski KJ (2017). MRIQC: Advancing the automatic prediction of image quality in MRI from unseen sites. PLoS ONE 12: 9.

License

This software is licensed under Apache License Version 2.0.

Copyright (c) The University of Arizona, 2021. All rights reserved.

qmtools's People

Contributors

hickst avatar

Watchers

 avatar  avatar  avatar

qmtools's Issues

qmviolin runs with errors

Running qmviolin produces an HTML report and pngs but also the following error. It does not matter whether there is a specified report directory or not.

Environment:
University of Arizona HPC
Singularity image (pulled from Docker on 2022-03-17 via singularity pull docker://hickst/qmtools)

Call:
singularity exec /groups/adamraikes/singularity_images/qmtools_latest.sif qmviolin T1w fetched/ge_sample.tsv ../mriqc-0.15.1/T1w/group_T1w.tsv -r v0.15.1_violin -v

Error:

(qmviolin): Comparing MRIQC records with modality 'T1w'.
Traceback (most recent call last):
  File "/usr/local/bin/qmviolin", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/qmtools/qmviolin/violin_cli.py", line 119, in main
    violin.make_html_report(modality, args, plot_info)
  File "/usr/local/lib/python3.9/site-packages/qmtools/qmviolin/violin.py", line 121, in make_html_report
    copy_tree(genh.AUX_DIR_PATH, report_dirpath)
  File "/usr/local/lib/python3.9/site-packages/qmtools/file_utils.py", line 15, in copy_tree
    shutil.copytree(from_dir, to_dir, dirs_exist_ok=True)
  File "/usr/local/lib/python3.9/shutil.py", line 563, in copytree
    with os.scandir(src) as itr:
FileNotFoundError: [Errno 2] No such file or directory: 'qmtools/qmviolin/static'

I think it's only affecting some side bar static images, but I'm not sure:
image

Is there any documentation?

Hello! This project sounds very interesting along the lines of mriqc but unfortunately I can't seem to find any documentation or at least some example Jupyter notebooks. Any help? Thanks!

Time out errors with qmfetcher

Running qmfetcher and get timeout errors (irrespective of number of records). Most of the time I can brute force re-run it and get the data but larger and larger samples become increasingly unlikely. I'm trying to get a sufficiently large sample to be able to figure out how the Manufacturer and Model fields are set for GE Discovery MR750s (if at all available). I successfully ran this with -n 300 but that took sever tries with this same error.

Environment:
University of Arizona HPC
Singularity image (pulled from Docker on 2022-03-17 via singularity pull docker://hickst/qmtools)

Call:
singularity exec /groups/adamraikes/singularity_images/qmtools_latest.sif qmfetcher -v T1w -n 500 -o ge_sample.tsv -q ge.qp

Error:

(qmfetcher): Querying MRIQC server with modality 'T1w', for 500 records.
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='mriqc.nimh.nih.gov', port=443): Read timed out.

During handling of the above exception, another exception occurred:

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='mriqc.nimh.nih.gov', port=443): Read timed out.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.