Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Spatial rice-AMF

Source code used to analyse the data and generate graphics for the publication:

Spatiotemporal regulation of arbuscular mycorrhizal symbiosis at cellular resolution

Tania Chancellor1,§ and Gabriel Ferreras Garrucho1,§, Garo Z. Akmakjian2, Héctor Montero1, Emma Wallington3, Samik Bhattacharya4, Christian Korfhage4, Julia Bailey-Serres2, Uta Paszkowski1,5,*

1Crop Science Centre, Department of Plant Sciences, University of Cambridge, 93 Lawrence Weaver Rd, Cambridge, United Kingdom, CB3 0LE. 2University of California-Riverside, Department of Botany and Plant Sciences and Center for Plant Cell Biology, Riverside, CA 92521-0217, USA. 3NIAB, Park Farm, Villa Road, Histon, Cambridge, CB24 9NZ, UK. 4Resolve BioSciences GmbH, Creative Campus Monheim, Creative-Campus-Allee 12, 40789 Monheim, Germany. 5RIKEN, Center for Sustainable Resource Science, Yokohama, Kanagawa 230-0045, Japan. *Corresponding author: up220@cam.ac.uk §These authors contributed equally to this article.


Repository Contents

Molecular Cartography Analysis (MolecularCartography/)

This directory contains scripts for analyzing spatial transcriptomics data generated using the Resolve BioSciences Molecular Cartography platform.

  • MC_singlecell_Seurat.R: Single-cell clustering analysis and quality control on all detected cells in the dataset
  • MC_arbuscule_singlecell_Seurat.R: Focused single-cell clustering analysis specifically for arbuscule-containing cells
  • MC_colocalization.R: Hierarchical clustering analysis to identify co-localization patterns of gene expression
  • MC_DGE_DESeq2.R: Differential gene expression analysis between cell types and conditions
  • MC_vesicle_arbuscules.R: Calculates transcripts per unit area in vesicles and arbuscules
  • cell_segmentation_for_ImageJ/: Segmented cell coordinates for viewing in raw images (AllCells/ and Arbuscules_Vesicles/ subfolders)
  • raw_data/: Contains raw gene count matrices and metadata:
    • Arbuscule_metadata.csv: Metadata for arbuscule-specific analysis
    • Arbuscule_pooled_gene_counts.csv: Gene count matrix for arbuscule samples
    • gene_count_matrix_sample_probe_filtered.csv: Filtered gene count matrix
    • mock_median_matrix.csv: Mock treatment median expression values
    • myc_median_matrix.csv: Mycorrhizal treatment median expression values
    • pooled_ROI_matrix_filteredv2.txt: Filtered region-of-interest matrix
    • sample_info.csv: Sample metadata and annotations
    • vesicle_arbuscule_areas.csv: Consolidated area measurements for vesicles and arbuscules
    • vesicle_arbuscule_transcripts.csv: Consolidated gene transcript counts for vesicles and arbuscules
  • results/: Output directory organized by analysis type:
    • single_cell/{plots,tables}/: Single-cell analysis results
    • arbuscule_single_cell/{plots,tables}/: Arbuscule-specific results
    • colocalization/{plots,tables}/: Clustering and co-localization results
    • DGE/{plots,tables}/: Differential expression results
    • vesicle_arbuscule/{plots,tables}/: Vesicle/arbuscule transcript per area analysis results

TRAP-seq Analysis (TRAPseq/)

This directory contains scripts for analyzing translating ribosome affinity purification sequencing (TRAP-seq) data.

  • TRAP_DGE_analysis.R: Differential gene expression analysis using DESeq2, including:
    • Quality control visualizations
    • Library complexity assessment
    • Variance-stabilizing transformation (VST)
    • DEG identification and annotation
  • TRAP_plotting_results.R: Comprehensive visualization script generating publication-quality figures, including:
    • PCA plots
    • Heatmaps with multiple gene sets
    • Venn diagrams for DEG comparisons
    • GO enrichment analysis and plotting
  • gene_count_tables/: Pre-processed gene count matrices:
    • gene_count_matrix.csv: Raw TRAP-seq counts
    • DESeq2_counts.csv: DESeq2-normalized counts
    • DESeq2_normalized_counts.csv: Size-factor normalized counts
    • DESeq2_VSD_counts.csv: Variance-stabilized transformed counts
    • DESeq2_VSD_counts_averages.csv: VST counts averaged by condition
  • info_sheets/: Gene annotations, GO terms, and metadata tables
  • results/: Output directory organized by analysis type:
    • plots/{Average_expression_plots,Heatmaps,Venn,Correlation,Scatterplots,Gene_count_plots,DEG_number,PCA,GO}/
    • DEG_tables/: Activated and repressed gene lists for each comparison
    • comparison_tables/: Full comparison results including log2FC and adjusted p-values

Usage

  1. Clone or download this repository locally

    git clone https://github.com/gabriel-ferreras/Spatial_rice_AMF_2025.git
    cd Spatial_rice_AMF_2025
  2. Required R packages

    Both analysis pipelines require the following packages (see script headers for complete dependency lists):

    • Bioconductor packages: DESeq2, Seurat, ggplot2, ComplexHeatmap, clusterProfiler
    • CRAN packages: tidyverse, ggpubr, scales, ggvenn, circlize
  3. Molecular Cartography Analysis

    The Molecular Cartography scripts process spatial transcriptomics data:

    A. Run MC_singlecell_Seurat.R

    • Loads raw count matrix and sample metadata
    • Performs QC filtering, normalization, and clustering
    • Outputs single-cell clustering plots and tables
    • Results saved to results/single_cell/{plots,tables}/

    B. Run MC_arbuscule_singlecell_Seurat.R

    • Focuses analysis on arbuscule-containing cells
    • Performs subset clustering and analysis
    • Results saved to results/arbuscule_single_cell/{plots,tables}/

    C. Run MC_colocalization.R

    • Performs hierarchical clustering for co-localization analysis
    • Generates clustering heatmaps
    • Results saved to results/colocalization/{plots,tables}/

    D. Run MC_DGE_DESeq2.R

    • Differential expression analysis between cell types/conditions
    • Outputs DEG tables and volcano plots
    • Results saved to results/DGE/{plots,tables}/

    E. Run MC_vesicle_arbuscules.R

    • Analyzes gene expression normalized to structure area (transcripts per μm²)
    • Compares expression levels in vesicles vs arbuscules
    • Generates individual gene plots and multi-gene comparison plots
    • Results saved to results/vesicle_arbuscule/{plots,tables}/
    • Note: Requires raw_data/vesicle_arbuscule_areas.csv and raw_data/vesicle_arbuscule_transcripts.csv to be present. If working from raw per-image data, run the consolidation script raw_data/consolidate_vesicle_arbuscule_data.R first.
  4. TRAP-seq Analysis

    The TRAP-seq scripts analyze translating ribosome affinity purification sequencing data:

    A. Run TRAP_DGE_analysis.R

    Sections include:

    1. LOADING PACKAGES - Install and load required R packages

    2. DESEQ2

      • Constructs DESeqDataSet from the count matrix
      • Performs sample QC, pre-filtering, and variance-stabilizing transformation (VST)
      • Saves normalized count matrices for downstream analysis
    3. DEG RESULTS

      • Extracts statistically significant DEGs
      • Generates MA plots and volcano plots
      • Outputs DEG tables with annotations to DEG_tables/ and comparison_tables/

    B. Run TRAP_plotting_results.R to generate publication-quality figures

    Important: For Figure S12 to generate correctly, copy the Molecular Cartography comparison table into the TRAP-seq comparison_tables/ folder before running this script. The code requires the Molecular Cartography results to compare with TRAP-seq results:

    cp MolecularCartography/results/DGE/tables/* TRAPseq/comparison_tables/

    Then uncomment and run the FC and FDR matrix generation code in the script.

    Sections include:

    1. LOADING PACKAGES - Loads required libraries

    2. LOADING DATA

      • Loads gene annotations, GO terms, and gene sets
      • Loads DEG lists and count matrices
      • Prepares FC and p-value matrices
    3. PCA

      • Principal component analysis from VST-transformed counts
      • Figure 5B output
    4. DEG NUMBER PLOTS

      • Visualizes number of differentially expressed genes per comparison
      • Figure 5C output
    5. VENN DIAGRAMS

      • Shows DEG overlap between conditions and published datasets
      • Figures 5D, S10B-D, 6B outputs
    6. NORMALISED GENE COUNT PLOTS

      • Individual gene expression patterns across samples
      • Figure S10A output
    7. HEATMAPS

      • Expression heatmaps for specific gene categories:
        • Cell wall genes (Figure S14B)
        • Strigolactone pathway genes (Figure S13)
        • Cell-type markers (Figure 5E/S11)
        • Nutrient signaling (Figure 6D/S15)
        • Defense and immunity genes (Figure S14A)
        • Resolve gene set comparison (Figure S12)
    8. GO ENRICHMENT

      • Gene ontology enrichment analysis for DEG sets
      • Generates GO term plots by category
      • Figure 6A output

Data Availability

Raw sequences, images, and gene count matrices generated in this study are available in the NCBI GEO database under the following accessions:

To reproduce the analysis from raw data, use the Lexogen NGS Kangaroo Data Analysis Platform or equivalent pipeline to perform:

  • Quality control and trimming
  • UMI deduplication
  • STAR alignment to the Oryza sativa Nipponbare reference transcriptome (Os-Nipponbare-Reference-IRGSP-1.0.58)
  • Transcript count quantification

Alternatively, use the pre-processed gene count matrices provided in this repository.


Citation

If you use this code or dataset, please cite the associated publication (DOI and citation to be added upon acceptance).

About

Source code for the publication "Spatiotemporal regulation of arbuscular mycorrhizal symbiosis at cellular resolution"

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages