Open Access RNA-seq from the GDC S3 bucket (s3://gdc-mmrf-commpass-phs000748-2-open/)
Clinical metadata via TCGAbiolinks::GDCquery_clinic()
Data Flow
flowchart LR
subgraph GDC["GDC Open Access"]
R["RNA-seq<br/>STAR Counts"]
C["Clinical<br/>Metadata"]
T["Treatment<br/>Records"]
end
subgraph Clean["Data Cleaning"]
SE["Summarized<br/>Experiment"]
CD["Clinical<br/>DataFrame"]
TD["Treatment<br/>DataFrame"]
end
subgraph Analysis
DE["Differential<br/>Expression"]
KM["Survival<br/>Analysis"]
PA["Pathway<br/>Enrichment"]
DAG["Causal<br/>DAGs"]
end
R --> SE
C --> CD
T --> TD
SE --> DE
CD --> KM
TD --> KM
DE --> PA
SE --> KM
CD --> DAG
style GDC fill:#e8f5e9,stroke:#4CAF50
style Clean fill:#e3f2fd,stroke:#2196F3
style Analysis fill:#fce4ec,stroke:#F44336
Simplified data flow from GDC to analysis outputs.
Pipeline Configuration
Current pipeline settings including sample limit, random seed, and data paths.
The pipeline downloads RNA-seq and clinical data from the GDC portal (https://portal.gdc.cancer.gov/projects/MMRF-COMMPASS) for the MMRF-COMMPASS project.
Sample limit: 200 patients (GDC has ~900; subsetting speeds local development). In CI, this is capped at 20 samples (see R/01_data_acquisition.R) to keep build times under 10 minutes.
Random seed: 42 — ensures reproducible patient selection when random_sample = TRUE.
Data directory: data | Results directory: results
Note: This vignette was built with sample_limit = 200 patients. Numbers below reflect this subset, not the full ~900-patient CoMMpass cohort. For pipeline execution details, see issue #46 (telemetry vignette).
Total counts: 6,045,546,169 (sum of all read counts across all genes and samples)
Median counts per sample: 58,030,298 (median library size)
Sparsity (% zero entries): 49.1%
Generating code
{
if (!file.exists(raw_rnaseq))
return(NULL)
se <- readRDS(raw_rnaseq)
if (!inherits(se, "SummarizedExperiment"))
return(NULL)
counts <- get_counts_assay(se)
log_counts <- log10(counts + 1)
mean_expr <- rowMeans(log_counts)
gene_meta <- as.data.frame(SummarizedExperiment::rowData(se))
has_biotype <- "gene_type" %in% names(gene_meta)
if (has_biotype) {
gene_meta$biotype_group <- dplyr::case_when(gene_meta$gene_type ==
"protein_coding" ~ "protein-coding", gene_meta$gene_type %in%
c("lncRNA", "processed_pseudogene", "unprocessed_pseudogene",
"transcribed_unprocessed_pseudogene", "transcribed_processed_pseudogene") ~
"lncRNA / pseudogene", TRUE ~ "other (miRNA, snoRNA, etc.)")
plot_df <- data.frame(mean_expr = mean_expr, biotype = gene_meta$biotype_group,
stringsAsFactors = FALSE)
biotype_colors <- c(`protein-coding` = "#0066CC", `lncRNA / pseudogene` = "#DC3545",
`other (miRNA, snoRNA, etc.)` = "#6C757D")
p <- ggplot2::ggplot(plot_df, ggplot2::aes(x = mean_expr,
fill = biotype)) + ggplot2::geom_histogram(bins = 50,
alpha = 0.6, position = "identity") + ggplot2::scale_fill_manual(values = biotype_colors) +
ggplot2::labs(title = "Distribution of Mean Gene Expression by Biotype",
subtitle = paste0(format(nrow(counts), big.mark = ","),
" genes, ", ncol(counts), " samples"), x = "Mean log10(counts + 1)",
y = "Number of Genes", fill = NULL) + theme_commpass_dark()
}
else {
plot_df <- data.frame(mean_expr = mean_expr)
p <- ggplot2::ggplot(plot_df, ggplot2::aes(x = mean_expr)) +
ggplot2::geom_histogram(bins = 50, fill = "steelblue",
alpha = 0.7) + ggplot2::labs(title = "Distribution of Mean Gene Expression",
subtitle = paste0(format(nrow(counts), big.mark = ","),
" genes, ", ncol(counts), " samples"), x = "Mean log10(counts + 1)",
y = "Number of Genes") + theme_commpass_dark()
}
p
}
Clinical Data
Clinical metadata from GDC provides patient demographics, disease characteristics, and outcomes. See the data dictionary for variable definitions and the glossary for units.
Data Completeness
Missing data rates across clinical variables, highlighting fields with substantial missingness.
83 of 88 variables are fully complete. Only variables with missing data are shown below. See data dictionary for variable definitions.
The per-sample expression summary (Total Counts, Genes Detected) is shown in the RNA-seq Data section above. This section adds QC-specific metrics: size factors, count dispersion (MAD), and outlier flags.
Detected Genes — number of genes with at least 1 mapped read (count > 0)
Median Count — median read count across all genes in a sample (most genes have 0 or low counts, so this is typically 0)
MAD Count — median absolute deviation of gene counts within a single sample (measures spread of the count distribution for that sample)
Size Factor — library size / median library size across all samples (values near 1.0 = typical; <<1 = under-sequenced; >>1 = over-sequenced)
Outlier — flagged Yes if the sample falls in the bottom 5th percentile of either library size OR genes detected
QC Metrics Summary
Samples assessed: 100
Outliers flagged: 9
After Filtering
Samples retained: 91
Genes retained: 30,675
Genes removed: 29,985 (49.4%)
Data Sources
Results in this vignette are derived from the MMRF CoMMpass study (MMRF-COMMPASS, ~1,143 patients), downloaded via TCGAbiolinks. The pipeline runs with a configurable sample_limit (default 200; CI uses 20).
For full citations, data access tiers, and the distinction between pipeline data and synthetic test data, see the Data Sources vignette.
Recent Changes
Recent project commits with lines added, files changed, and change categories.