Methods & Analytical Pipeline

Detailed experimental procedures, polygenic scoring formulas, fine-mapping, and FAIR reproducible code execution trace.

🚀 AstroBotany Hub

Pipeline DAG Architecture

Scripts 01–19 are not in this repository. They were run in a Biomni workspace and were not retained, so the steps below describe the pipeline as documented, not code you can run here. Scripts 20–27 (extended analyses and figures) are in code/.

  1. 01_download_gwas.py: Programmatically fetches AraGWAS REST API data (462 studies, 1.52M associations, 2,029 accessions).
  2. 02_download_genelab.py: Retrieves 13 NASA GeneLab spaceflight transcriptomics studies (22 ecotype/genotype comparisons; five are dark-grown BRIC studies).
  3. 03_differential_expression.R: Runs DESeq2 (RNA-seq count data) and limma (microarray normalization) across comparisons.
  4. 04_meta_analysis.R: Combines p-values via Fisher's method and fits random-effects meta-analysis models via REML (metafor).
  5. 05_gwas_spaceflight_integration.py: Performs Fisher's exact over-representation testing between GWAS candidate genes and spaceflight DEGs.
  6. 06_go_enrichment.R: Performs GO (BP, CC, MF) and KEGG pathway over-representation analysis via clusterProfiler.
  7. 07_ml_gene_classifier.py: Trains a nested 5-fold cross-validated Random Forest classifier on multi-omics features.
  8. 08_ml_ecotype_prediction.py: Implements hybrid polygenic risk scoring + Random Forest regression to rank accessions.
  9. 09_knowledge_graph.py: Builds a 6-relational directed NetworkX multigraph (Cytoscape.js export).
  10. 13_geo_altitude_data.py & 15_altitude_biomarker_stats.py: Queries Open-Meteo API for elevations (980 accessions), performs Spearman rank correlations with BH-FDR, and fits OLS regressions.
  11. 20_extended_analyses.py: Latitude, Europe, global and population-group plots of the predicted scores (Figs 22, 24, 26, 27) and statistical power calculations. Its earlier LD, locus-annotation and expanded-score sections used simulated or hard-coded data and were removed on 14 Oct 2026.
  12. 28–34 (added 14 Oct 2026): rebuild figures from committed tables and public APIs: Fig 13 (28), Fig 4 (29), leaf-ionome enrichment and Fig 18 (30), the chromosome 4 AraGWAS window, Fig 23 (31), AraPheno flowering times for the top 10 (32), the Europe map, Fig 15 (33), and elevation vs score, Fig 16 (34).

Statistical Equations & Formulas

1. Fisher's Combined P-value Method

Given k independent spaceflight transcriptomic studies with p-values pi, the combined test statistic X2 follows a chi-square distribution with 2k degrees of freedom:

X2 = -2 ∑i=1..k ln(pi)

Software Stack & Environment