Skip to content

ls-javier/Exploratory-Analysis-of-TGCA-BRCA-in-R

Repository files navigation

Breast Cancer Exploratory Data Analysis in R

Exploratory analysis of breast invasive carcinoma (BRCA) clinical data using R and RStudio. This project was developed as part of the Research Methodology I module (Unit 1, Activity 1) for the Master’s in Bioinformatics.


Overview

This project performs an exploratory analysis of The Cancer Genome Atlas (TCGA) breast cancer clinical data. The analysis includes:

  • Data ingestion & cleaning: Loading and handling missing values from the TCGA clinical patient file.
  • Feature engineering: Grouping AJCC tumor stages into broader categories (Stage I–IV).
  • Descriptive statistics: Boxplots and mean diagnosis age by tumor stage.
  • Inferential statistics: Normality testing (Shapiro-Wilk), homoscedasticity testing (Levene), and comparison of means between Stage I and Stage III (Wilcoxon and t-tests).
  • Survival analysis: Kaplan–Meier survival curves stratified by progesterone receptor (PR) status.

Repository Structure

File Description
analisis_exploratorio_JL.R Main R script containing the full analysis pipeline
nationwidechildrens.org_clinical_patient_brca.txt Raw TCGA-BRCA clinical patient data (tab-separated)
Analisis_exploratorio_JavierLuque.pdf Final report with results and interpretation (PDF)
0JCP001104_UA1_AA1.pdf Assignment guidelines and instructions (PDF)
boxplot_edad.png Output figure: boxplot of diagnosis age by tumor stage
survival_plot_PR.png Output figure: Kaplan–Meier survival plot by PR status
breast_data_stage.csv Processed CSV dataset with diagnosis age and grouped stages (generated by the script)
README.md This file

Dependencies

The following R packages are required to run the analysis:

  • readr
  • dplyr
  • car
  • survival
  • survminer

You can install the missing packages with:

install.packages(c("readr", "dplyr", "car", "survival", "survminer"))

Note: This project was developed and tested on R with RStudio.


How to Run

  1. Clone the repository:

    git clone https://github.com/<your-username>/<your-repo-name>.git
    cd <your-repo-name>
  2. Open analisis_exploratorio_JL.R in RStudio (or your preferred R environment).

  3. Update the file paths inside the script if necessary (the script currently uses absolute paths pointing to the project directory).

  4. Run the script line-by-line or source the entire file to reproduce the analysis, figures, and the breast_data_stage.csv output.


Key Results

  • Age vs Stage: The boxplot analysis reveals differences in median diagnosis age across tumor stages.
  • Statistical Comparison: Between Stage I and Stage III, normality and variance assumptions were checked, followed by non-parametric and parametric mean-comparison tests.
  • Survival Analysis: The Kaplan–Meier curves show survival probabilities over time stratified by PR status, with log-rank p-values and risk tables included.

Detailed interpretation and conclusions are available in the accompanying PDF report (Analisis_exploratorio_JavierLuque.pdf).


Author

Javier Luque Serrano
Master’s in Bioinformatics European University of Madrid Research Methodology I – Module 4, Unit 1, Activity 1


License

This project is licensed under the MIT License.

The raw clinical data originates from The Cancer Genome Atlas (TCGA) and is publicly available through the GDC Data Portal.

About

European University of Madrid's Master's degree in Bioinformatics Activity: Exploratory Analysis of TGCA-BRCA data

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages