This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Educational tutorial for glycoproteomic (proteomics with post-translational modifications) data analysis using R and Python. The project teaches bioinformatics workflows for processing, normalizing, analyzing, and visualizing mass spectrometry proteomics data.
- Chapter 1: R basics and package introduction
- Chapter 2: Data normalization (sample loading, TMM) with UMAP visualization
- Chapter 3: Differential expression analysis using limma
- Chapter 4: Gene ontology and pathway enrichment with clusterProfiler
- Chapter 5: Structural analysis using localCIDER and StructureMap
Each chapter contains:
.Rmdfiles (R Markdown source - primary code).mdfiles (rendered output for GitHub)training_data/folder with example datasets
R Markdown files: Open in RStudio and knit, or use:
rmarkdown::render("Chapter_X/file.Rmd")Python scripts: Called from R via reticulate:
library(reticulate)
use_condaenv(condaenv = '/opt/anaconda3/envs/structure_analysis', required = TRUE)
source_python("script.py")- Data manipulation: tidyverse (dplyr, tidyr, purrr, stringr)
- Data I/O: readxl, writexl, readr
- Visualization: ggplot2, ggpubr, ComplexHeatmap
- Statistics: rstatix, limma, edgeR
- Bioinformatics: clusterProfiler, org.Hs.eg.db, AnnotationDbi
- R-Python bridge: reticulate
- Core: pandas, numpy, matplotlib, seaborn
- Dimensionality reduction: umap
- Structural analysis (Chapter 5): localcider, structuremap
- Uses tidyverse conventions with pipe operators (
|>) - 2-space indentation (configured in .Rproj)
- UTF-8 encoding
- Data follows tidy data principles (each variable a column, each observation a row)
- Raw mass spectrometry results (CSV/TSV from search software)
- PSM filtering and quality control (XCorr, PPM thresholds)
- Protein-level aggregation
- Normalization (Sample Loading → TMM)
- Statistical analysis (limma for differential expression)
- Visualization and enrichment analysis
- Large data files (.csv, .xlsx, .tsv) are gitignored - training data must be downloaded separately or generated
- Python integration requires conda environment setup for Chapter 5
- Column names in proteomics data often contain special characters - use
name_repair = 'universal'when reading