This repository contains analysis.py, a Python script for analyzing OSDR brain
datasets (e.g., OSD-255 rodent brain RNA-seq from spaceflight). The script uses
pandas for data cleaning, matplotlib for visualizing gene expression changes
due to microgravity, and includes a hardware tie-in that models brain resilience
impacts from radiation exposure and simulates shielding effects. The shielding
simulation uses numpy (scipy compatible patterns) to model radiation dose
reduction via hardware materials and links the predicted dose reduction to
gene expression impact scores. It also includes optional Biopython-based FASTA
annotation and notes potential for integrating with LEIA project tools from
Jessica Lee.
- Load a counts matrix and sample metadata exported from OSDR datasets.
- Clean and normalize counts, then compute microgravity vs ground log2 fold changes.
- Visualize top gene expression changes due to microgravity.
- Simulate radiation dose reduction from shielding materials and map the predicted dose to gene expression impacts and a brain resilience index.
- Optionally annotate gene IDs with FASTA-derived sequence statistics using Biopython.
python analysis.py \
--counts path/to/counts.csv \
--metadata path/to/metadata.csv \
--outdir outputs \
--simulate-shielding \
--shielding-material Polyethylene \
--shielding-thickness-cm 5To run a self-contained demo with synthetic data:
python analysis.py --demo --simulate-shielding- The counts file should have gene IDs in the first column and sample IDs as subsequent columns.
- The metadata file should include columns
sample_idandcondition(override with--sample-columnand--condition-columnif needed). - Conditions should include labels for microgravity and ground controls
(defaults:
microgravityandground).
