Skip to content

Ian-Goodall-Halliwell/GradientExplorer

Repository files navigation

Gradient Explorer: Dash fMRI Visualization Web Application

Overview

Welcome to Gradient Explorer, an advanced Dash web application designed for processing and visualizing functional magnetic resonance imaging (fMRI) scans. This powerful tool allows users to compare fMRI scans against Neurosynth terms and topic maps along gradients of macroscale cortical activity. Leveraging the capabilities of the dash library, Gradient Explorer provides an interactive and dynamic interface for in-depth exploration of fMRI data.

Features

  • fMRI Scan Processing: The application facilitates the processing of fMRI scans, allowing users to delve into the intricate details of neural activity.

  • Neurosynth Term Comparison: Users can compare fMRI scans against Neurosynth terms, enabling a comprehensive understanding of the relationship between neural activity and established terms in neuroscientific literature.

  • Topic Map Exploration: The application integrates topic maps, enabling users to explore how fMRI scans align with specific topics across the cortex.

  • Macroscale Cortical Activity Gradients: Gradients of macroscale cortical activity are visualized, providing insights into the spatial distribution of neural responses.

  • Interactive Graph Generation: Real-time updates of graphs and visualizations are generated by user interactions, enhancing the exploratory capabilities of the application.

  • Color Gradient and Distance Calculation: Graph markers are color-coded using gradients, and distances between data points are calculated and displayed, contributing to a richer analytical experience.

Prerequisites

Ensure that the following dependencies are installed:

pip install dash pandas numpy plotly scikit-learn dash-bootstrap-components

Additionally, specialized packages for fMRI processing and analysis should be installed based on your specific requirements.

Usage

  1. Run the script:
python application.py
  1. Access the Gradient Explorer in your web browser by navigating to http://127.0.0.1:8050/.

  2. Utilize the user-friendly interface to process fMRI scans, compare them against Neurosynth terms and topic maps, and explore gradients of macroscale cortical activity.

Structure

Directory Structure

  • assets/
    • favicon.ico: Favicon for the web application.
  • CSVData/ CSV files containing raw neurosynth data.
  • Downloads/ Directory for downloaded files.
  • Empty_Fig_Jsons/ Empty figures for initial generation.
  • extTemp/ Directory for temporary files.
  • Figure_Output/ Directory for generated figures.
  • Fig_Jsons/ Directory containing neurosynth coordinate data.
  • Gradients/ Contains fMRI gradient scans.
  • application.py: Main script containing the Gradient Explorer application and associated functionalities.
  • Call.py: Script for making calls to the server.
  • Coords.csv: CSV file containing coordinate data.
  • DatabaseConstructor.py: Script for constructing the database.
  • FigureMaker.py: Script for generating figures.
  • readme.md: Readme file containing information about the Gradient Explorer package.
  • requirements.txt: Text file specifying required Python packages.
  • ServersideCall.py: Script for making server-side calls.

How to Customize

  • Dataset Selection: Modify the figdict dictionary to include the fMRI datasets you want to analyze.

  • Graph Customization: Tailor visualization settings such as color schemes, axis labels, and layout to suit your specific fMRI analysis needs.

  • Saving Figures: Set the savefigs variable to True if you want to save generated figures to the Figure_Output/ directory.

Examples

Generate fMRI Graphs

# Generate fMRI graphs when the button is clicked
generate_graphs(1, True, data2, distances, "fMRI Dataset", False)

Customize fMRI Dataset

# Modify the figdict dictionary to include or exclude fMRI datasets
figdict = {
    "fMRI Dataset 1": ["file1.nii", "file2.nii"],
    "fMRI Dataset 2": ["file3.nii", "file4.nii"],
    # Add more datasets as needed
}

Acknowledgments

Gradient Explorer is built upon research done by ThincLab, specifically work by Dr. Smallwood, Dr. Mckeown, Bridget Mulholland, Louis Chitiz, and Raven Wallace. Gradient Explorer powered by Dash, Plotly, and other open-source libraries. Special thanks to the Neurosynth community for contributing to the advancement of neuroscientific research.

License

This project is licensed under the MIT License - see the License file for details.

About

A webapp to automate fMRI activity comparisons against gradients of macroscale cortical activity.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages