omics.co.in logo omics.co.in

Chapter 3: Open Biomedical Repositories: GEO, TCGA, GDC & SRA Data Extraction

Tested Stacks: GATK 4.6.1 Samtools 1.21 Nextflow 24.10 Seurat v5.1 Python 3.12
Prerequisites: Basic Linux CLI & Sequencing Formats
📚 Chapter 3 of 18 0% Course Completed

1. The Global Ecosystem of Open Transcriptomics Data

Public biomedical repositories store millions of curated RNA-Seq datasets spanning human clinical oncology, rare mendelian syndromes, infectious diseases, and functional drug perturbations. Accessing this data allows computational researchers to validate hypotheses, perform mega-analyses across cohorts, and train predictive machine learning models without wet-lab sequencing costs.

RepositoryPrimary AuthorityData Types AvailableBioconductor / CLI Package
NCBI Gene Expression Omnibus (GEO)NCBI / NIHMicroarray, bulk RNA-Seq, scRNA-Seq, ChIP-Seq, clinical metadataGEOquery (R), geofetch (Python)
The Cancer Genome Atlas (TCGA) / GDCNCI / NIHStandardized harmonized RNA-Seq, WES mutations, survival curves, clinical staging for 33 cancer typesTCGAbiolinks (R), GDC Data Transfer Tool (CLI)
Sequence Read Archive (SRA)NCBI / INSDCRaw binary sequence archives (.sra) and FASTQ filessra-tools (fasterq-dump)
ArrayExpress / ENAEMBL-EBIFunctional genomics experiments adhering to MIAME / MINSEQE standardsArrayExpress (R), ENA FTP API

2. Programmatic Mining of NCBI GEO with GEOquery

The GEOquery package allows direct ingestion of GEO Series (GSE) accessions into Bioconductor ExpressionSet or SummarizedExperiment objects, parsing clinical phenotype tables (pData) and expression count matrices simultaneously.

# Ingesting a Clinical RNA-Seq Dataset from NCBI GEO
library(GEOquery)
library(Biobase)

# Example: GSE156063 (Severe COVID-19 vs Healthy Control Peripheral Blood Mononuclear Cells)
gse_id <- "GSE156063"

# Download GSE metadata and supplementary expression matrices
gse_data <- getGEO(gse_id, GSEMatrix = TRUE, AnnotGPL = TRUE)
eset <- gse_data[[1]]

# Extract clinical metadata table
pheno_df <- pData(eset)
cat("Samples retrieved:", nrow(pheno_df), "\n")
cat("Clinical variables:", ncol(pheno_df), "\n")

# Preview key clinical variables
head(pheno_df[, c("title", "source_name_ch1", "characteristics_ch1")])

# Download raw supplementary counts matrix tarball
supp_files <- getGEOSuppFiles(gse_id, makeDirectory = TRUE)
print(supp_files)

3. Querying Harmonized TCGA Oncology Cohorts with TCGAbiolinks

The Cancer Genome Atlas (TCGA) provides harmonized RNA-Seq read counts mapped to human genome reference GRCh38 using STAR 2-pass alignment, alongside deep clinical staging, overall survival (OS) months, and vital status.

# Systematic Extraction of TCGA Breast Cancer (TCGA-BRCA) Cohort
library(TCGAbiolinks)
library(SummarizedExperiment)

# 1. Query GDC for Primary Solid Tumor and Normal Tissue RNA-Seq
query_brca <- GDCquery(
    project = "TCGA-BRCA",
    data.category = "Transcriptome Profiling",
    data.type = "Gene Expression Quantification",
    workflow.type = "STAR - Counts",
    sample.type = c("Primary Tumor", "Solid Tissue Normal")
)

# 2. Download subset for demonstration (e.g. 20 tumor vs 10 normal samples)
samples_subset <- getResults(query_brca)$cases[1:30]
query_brca_sub <- GDCquery(
    project = "TCGA-BRCA",
    data.category = "Transcriptome Profiling",
    data.type = "Gene Expression Quantification",
    workflow.type = "STAR - Counts",
    barcode = samples_subset
)

GDCdownload(query_brca_sub)
brca_data <- GDCprepare(query_brca_sub)

# 3. Inspect Expression Matrix and Matched Clinical Metadata
counts_matrix <- assay(brca_data, "unstranded")
clinical_data <- as.data.frame(colData(brca_data))

cat("Genes quantified:", nrow(counts_matrix), "\n")
cat("Patient samples:", ncol(counts_matrix), "\n")
cat("Sample distribution:\n")
print(table(clinical_data$sample_type))
⚠️

Common Pitfalls & Troubleshooting Checklist

  • Java Heap Exhaustion (GATK / Picard): If processes terminate with java.lang.OutOfMemoryError, set your environment variable explicitly: export _JAVA_OPTIONS="-Xmx16g -Djava.io.tmpdir=/tmp".
  • Index Timestamp Mismatch: If tools complain that a BAM index is missing or out of date, regenerate with samtools index -@ 4 sample.bam.
  • Conda Channel Conflicts: Avoid ABI incompatibilities between bioconda and conda-forge by setting strict priority: conda config --set channel_priority strict.
  • Chromosome Naming Contamination: Always verify whether reference FASTA headers use chr1 or 1; divergent naming causes silent alignment drops.
Was this guide helpful to your research?
Help us maintain 100% accurate, peer-reviewed bioinformatics standards.
📝 Propose Edit on GitHub ↗