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.
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.
| 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 |
The following R packages are required to run the analysis:
readrdplyrcarsurvivalsurvminer
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.
-
Clone the repository:
git clone https://github.com/<your-username>/<your-repo-name>.git cd <your-repo-name>
-
Open
analisis_exploratorio_JL.Rin RStudio (or your preferred R environment). -
Update the file paths inside the script if necessary (the script currently uses absolute paths pointing to the project directory).
-
Run the script line-by-line or source the entire file to reproduce the analysis, figures, and the
breast_data_stage.csvoutput.
- 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).
Javier Luque Serrano
Master’s in Bioinformatics
European University of Madrid
Research Methodology I – Module 4, Unit 1, Activity 1
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.