Skip to content

VatsJari/NeuroWave

Repository files navigation

NeuroWave - Exploring Microwave exposure effects on glial cells

A comprehensive computational pipeline for analyzing cellular responses to microwave stimulation across multiple modalities: morphology, calcium dynamics, cytotoxicity, Thermal profiling and transcriptomics.

πŸ“Š Overview

This repository contains a complete analysis suite for studying cellular responses to microwave stimulation. The pipeline integrates data from:

  • Morphological analysis (CellProfiler outputs)
  • Calcium imaging (GCaMP fluorescence traces)
  • Cytotoxicity assays (LDH measurements)
  • Transcriptomics (Bulk RNA-seq data)

Each analysis module is designed to be modular, reproducible, and produces publication-ready visualizations.

πŸ“ Repository Structure

microwave_analysis/
β”œβ”€β”€ README.md                     # This file
β”œβ”€β”€ LICENSE                       # License information
β”œβ”€β”€ .gitignore                    # Git ignore file
β”œβ”€β”€ setup_environment.R           # Environment setup script
β”œβ”€β”€ morphological_analysis/       # Cell morphology analysis
β”‚   β”œβ”€β”€ Astrocyte_morphological_analysis.Rmd
β”‚   β”œβ”€β”€ Microglia_morphological_analysis.Rmd
β”‚   β”œβ”€β”€ GBM_morphological_analysis.Rmd
β”œβ”€β”€ calcium_imaging/              # Calcium dynamics analysis
β”‚   β”œβ”€β”€ Calcium_Signalling_Analysis.Rmd
β”œβ”€β”€ cytotoxicity_assay/           # LDH assay analysis
β”‚   β”œβ”€β”€ Ldh_Cytotoxicity_Analysis.Rmd
β”œβ”€β”€ transcriptomics/              # RNA-seq analysis
β”‚   β”œβ”€β”€ Transcriptomics_BulkSeq_Analysis.Rmd
β”‚   β”œβ”€β”€ msigdb_databases/         # Pathway databases
β”œβ”€β”€ Thermal Analysis/              # Temprature measurements
β”‚   β”œβ”€β”€ Thermal_analysis.Rmd
└──── 

πŸš€ Quick Start

Prerequisites

  1. R (version 4.1.0 or higher)
  2. RStudio (recommended)
  3. Required system libraries:
    • macOS: brew install libpng cairo
    • Ubuntu: sudo apt-get install libcurl4-openssl-dev libssl-dev libxml2-dev
    • Windows: Install Rtools

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/microwave-analysis.git
    cd microwave-analysis
  2. Set up R environment: Open R/RStudio and run:

    # Run setup script
    source("setup_environment.R")
    
    # Or manually install packages
    install.packages(c("tidyverse", "ggplot2", "ggpubr", "patchwork", "rmarkdown"))
  3. Test installation:

    # Check if all required packages are installed
    source("utilities/check_installation.R")

πŸ“‹ Step-by-Step Usage

1. Morphological Analysis

For analyzing cell morphology from CellProfiler outputs:

Step 1: Prepare your data

  • Place CellProfiler CSV outputs in a structured folder:
    your_data/
    β”œβ”€β”€ primary_objects.csv    # Soma measurements
    └── secondary_objects.csv  # Whole cell measurements
    

2. Calcium Imaging Analysis

For analyzing GCaMP calcium traces:

Step 1: Organize calcium trace files

calcium_data/
β”œβ”€β”€ experiment1.csv
β”œβ”€β”€ experiment2.csv
└── metadata.csv    # Optional: experimental conditions

Step 2: Configure analysis parameters

Edit the calcium analysis script:

# Set your parameters
data_folder <- "path/to/your/calcium/data"
results_folder <- "path/to/results"
recording_time_min <- 3        # Recording duration in minutes
cutoff_fixed <- 0.2            # Activity threshold
delta_multiplier <- 2          # Peak detection sensitivity

3. LDH Cytotoxicity Assay

For analyzing LDH release data:

Step 1: Prepare your LDH data

Create a CSV file with columns:

  • Condition (e.g., "G0", "G1", etc.)
  • Lum_score (raw luminescence values)
  • Replicate (optional)

Step 2: Interpret results

Output includes:

  • Normalized cytotoxicity values
  • Statistical comparisons
  • Dose-response visualizations
  • Comparative analysis across cell types

4. Transcriptomics Analysis

For analyzing RNA-seq data:

Step 1: Prepare count data

  • Count matrix (genes Γ— samples)
  • Metadata file (samples Γ— conditions)

Step 2: Explore results

The pipeline produces:

  • Differential expression results
  • Volcano plots
  • Pathway enrichment analysis
  • Interactive visualizations

πŸ”§ Configuration Guide

Experimental Design Mapping

Map your experimental conditions to the analysis codes:

Condition Code MW Status Exposure Time Recovery Time
G0, A0, M0 ON 5 min 0 h
G1, A1, M1 OFF 5 min 0 h
G2, A2, M2 ON 30 min 0 h
G3, A3, M3 OFF 30 min 0 h
G4, A4, M4 ON 5 min 24 h
G5, A5, M5 OFF 5 min 24 h
G6, A6, M6 ON 30 min 24 h
G7, A7, M7 OFF 30 min 24 h

Customizing Analysis Parameters

Each analysis module has configurable parameters:

Morphological Analysis

# In the R Markdown files, adjust:
company_colors <- c("#E50000", "#008A8A", ...)  # Color palette
window_size <- 50                               # Rolling window size
optimal_k <- 6                                  # Number of clusters
pval_threshold <- 0.05                          # Statistical threshold

Calcium Imaging

# In calcium_imaging_analysis.Rmd:
recording_time_min <- 3        # Recording duration
cutoff_fixed <- 0.2            # Activity threshold
delta_multiplier <- 2          # Peak detection sensitivity
skip_correction <- TRUE        # Skip baseline correction

Statistical Methods

  • Morphology: KS tests, Wilcoxon tests, Chi-square tests
  • Calcium: Peak detection algorithms, firing rate calculations
  • Cytotoxicity: t-tests, ANOVA, dose-response modeling
  • Transcriptomics: limma-voom, DESeq2, GSEA

πŸ“ˆ Output Interpretation

Morphological Analysis Outputs

  1. Cell Density Plots: Normalized cell counts per condition
  2. Parameter Distributions: Box plots of morphological features
  3. Cluster Analysis: UMAP/t-SNE visualizations of phenotypes
  4. Phenotype Proportions: Bar plots of morphological classifications

Calcium Imaging Outputs

  1. Trace Visualizations: Raw and processed calcium traces
  2. Event Detection: Raster plots of calcium events
  3. Firing Rate Analysis: Statistical comparisons of activity
  4. Waveform Analysis: Average calcium transient shapes

Statistical Significance Codes

  • * p < 0.05
  • ** p < 0.01
  • *** p < 0.001
  • ns not significant

πŸ” Troubleshooting

Common Issues and Solutions

Issue 1: Package Installation Failures

# If Bioconductor packages fail to install:
if (!require("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install(version = "3.16")  # Specify version

Issue 2: Memory Errors

# Increase memory limit
memory.limit(size = 16000)  # On Windows

# Use 64-bit R
# Filter data early in pipeline
# Process in chunks for large datasets

Issue 3: File Path Errors

# Use relative paths
data_path <- file.path("data", "your_file.csv")

# Check file existence
if (!file.exists(data_path)) {
  stop("File not found: ", data_path)
}

# Set working directory properly
setwd("/full/path/to/your/project")

Issue 4: Missing Dependencies

# Check and install missing packages
required <- c("tidyverse", "ggplot2", "dplyr")
missing <- required[!(required %in% installed.packages()[,"Package"])]
if(length(missing)) install.packages(missing)

Debugging Tips

  1. Run in stages: Test each analysis module separately
  2. Check data formats: Ensure CSV files are properly formatted
  3. Review log files: Check R console output for warnings/errors
  4. Use example data: Test with provided example datasets first

🀝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Code Style Guidelines

  • Use meaningful variable names
  • Comment complex sections
  • Follow tidyverse style guide
  • Include example data for new features
  • Update documentation accordingly

πŸ“„ License

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

πŸ“ž Support

For questions, issues, or feature requests:

  1. Check the documentation: Review this README and inline documentation
  2. Search existing issues: Your question might already be answered
  3. Open a new issue: Provide a minimal reproducible example
  4. Contact maintainers: [Vatsal D. Jariwala]

πŸ“Š Citation

If you use this software in your research, please cite:

@software{microwave_analysis_suite,
  author = Vatsal D. Jariwala},
  title = {Microwave Stimulation Analysis Suite},
  year = {2025},
  url = {https://github.com/VatsJari/NeuroWave}
}

🎯 Key Features

  • Modular Design: Each analysis module works independently
  • Reproducible: Complete documentation and version control
  • Scalable: Handles datasets from small to large scale
  • Customizable: Easily adjust parameters for specific needs
  • Visualization-Rich: Publication-ready plots and figures
  • Statistical Rigor: Multiple testing corrections and effect sizes

Happy Analyzing! πŸ§¬πŸ”¬πŸ“Š

For best results, start with the example datasets and gradually replace them with your own data. Don't hesitate to open issues if you encounter problems or have suggestions for improvements.

About

A comprehensive pipeline for analyzing cellular responses to microwave stimulation across morphology, calcium dynamics, cytotoxicity, and transcriptomics with automated, publication-ready outputs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages