DROMA.R is an R package that provides advanced analysis functions for drug-omics associations using DromaSet and MultiDromaSet objects from the DROMA.Set package. It supports meta-analysis of drug-omics associations across multiple datasets, comprehensive visualization tools, and batch processing of features. This package extends DROMA.Set with statistical analysis capabilities for biomarker discovery in precision medicine. All data loading functions now apply z-score normalization by default for improved analysis consistency.
CTRDB Support: Includes specialized functions for analyzing Clinical Trial Database (CTRDB) data, enabling patient-level drug response analysis and cross-drug signature stratification.
- Modular Architecture: Functions organized into data loading, pairing, meta-analysis, and visualization modules
- Z-score Normalization: All continuous data normalized by default for cross-dataset comparability
- Statistical Rigor: Appropriate methods for continuous (Spearman) and discrete (Wilcoxon + Cliff's Delta) data
- Flexible Analysis: Supports both single dataset and multi-dataset meta-analysis workflows
It is a part of DROMA project. Visit the official DROMA website for comprehensive documentation and interactive examples.
- 🔗 DROMA.Set Integration: Works seamlessly with DromaSet and MultiDromaSet objects
- 📊 Meta-analysis: Advanced statistical analysis across multiple datasets
- 🏥 Clinical Trial Database (CTRDB): Specialized functions for clinical drug response analysis
- 🎨 Comprehensive Visualization: Forest plots, volcano plots, comparison plots with consistent theming
- ⚡ Batch Processing: Efficient analysis of multiple features simultaneously
- 🧮 Multiple Statistical Methods: Spearman correlation, Wilcoxon tests, Cliff's Delta effect sizes
- 🚀 Performance Optimization: Parallel processing support for large datasets
- 🔄 Z-score Normalization: All data loading functions apply z-score normalization by default
First, install the DROMA.Set package:
# Install DROMA.Set (replace with actual installation method)
# devtools::install_github("mugpeng/DROMA_Set")# Install devtools if not already installed
if (!requireNamespace("devtools", quietly = TRUE)) {
install.packages("devtools")
}
# Install DROMA.R from GitHub
devtools::install_github("mugpeng/DROMA_R")library(DROMA.Set) # For data management
library(DROMA.R) # For analysis functions# Connect to DROMA database
connectDROMADatabase("path/to/your/droma.sqlite")
# Create a single DromaSet for one project
gCSI <- createDromaSetFromDatabase("gCSI", "path/to/droma.sqlite")
# Create a MultiDromaSet for multiple projects
multi_set <- createMultiDromaSetFromDatabase(
project_names = c("gCSI", "CCLE"),
db_path = "path/to/droma.sqlite"
)# Single project analysis
result <- analyzeDrugOmicPair(
gCSI,
select_omics_type = "mRNA",
select_omics = "ABCB1",
select_drugs = "Paclitaxel",
data_type = "all",
tumor_type = "all"
)
# Multi-project meta-analysis
multi_result <- analyzeDrugOmicPair(
multi_set,
select_omics_type = "mRNA",
select_omics = "ABCB1",
select_drugs = "Paclitaxel",
overlap_only = FALSE
)
# Display results
print(result$meta)
plot(result$plot)# Find genes associated with drug response
batch_results <- batchFindSignificantFeatures(
multi_set,
feature1_type = "drug",
feature1_name = "Paclitaxel",
feature2_type = "mRNA",
overlap_only = FALSE
)
# Create volcano plot
volcano_plot <- plotMetaVolcano(batch_results, es_t = 0.3, P_t = 0.05)
print(volcano_plot)loadMolecularProfiles(): Load molecular profiles with automatic z-score normalizationloadTreatmentResponse(): Load drug response data with automatic z-score normalizationloadMultiProjectMolecularProfiles(): Load multi-project molecular profilesloadMultiProjectTreatmentResponse(): Load multi-project drug response dataapplyZscoreNormalization(): Apply z-score normalization to existing dataisZscoreNormalized(): Check if data has been z-score normalized
pairDrugOmic(): Pair continuous drug and omics datapairDiscreteDrugOmic(): Pair discrete omics with drug datapairContinuousFeatures(): General function for pairing continuous featurespairDiscreteFeatures(): General function for pairing discrete and continuous features
metaCalcConCon(): Meta-analysis for continuous vs continuous data (Spearman correlation)metaCalcConDis(): Meta-analysis for continuous vs discrete data (Wilcoxon + Cliff's Delta)analyzeContinuousDrugOmic(): Wrapper for continuous drug-omics analysisanalyzeDiscreteDrugOmic(): Wrapper for discrete drug-omics analysis
createForestPlot(): Forest plots for meta-analysis resultsplotMetaVolcano(): Volcano plots for batch analysis resultsplotContinuousDrugOmic(): Scatter plots with correlation statisticsplotDiscreteDrugOmic(): Box plots for group comparisons
analyzeDrugOmicPair(): Complete workflow for single drug-omics pair analysisbatchFindSignificantFeatures(): Batch screening of multiple featuresprocessDrugData(): Process drug sensitivity data with normalizationgetDrugSensitivityData(): Combined processing and annotationanalyzeStratifiedDrugOmic(): Stratified analysis by another drug's responsecreateStatisticalDashboard(): Interactive dashboard for statistical resultsgenerateStatisticalPlots(): Generate comprehensive statistical overview plots
analyzeClinicalDrugResponse(): Analyze clinical drug response with omics dataanalyzeStratifiedCTRDB(): Stratified analysis across different drugsanalyzeClinicalMeta(): Meta-analysis across clinical datasetsgetClinicalSummary(): Summary statistics for clinical analysisgetStratifiedCTRDBSummary(): Summary for stratified CTRDB analysis
Note:
getPatientExpressionData()has been moved toDROMA.Setpackage (CTRDB_SQLManager.R) for better separation of database operations and analysis functions.
bright_palette_26: Pre-defined color palette for visualizationsformatTime(): Format processing time outputsestimateTimeRemaining(): Estimate batch processing timeformatDrugTable(): Format drug sensitivity data for displayannotateDrugData(): Add clinical annotations to drug dataloadFeatureData(): Load feature data for batch analysisfilterFeatureData(): Filter features by minimum sample size
# Load required packages
library(DROMA.Set)
library(DROMA.R)
# Create DromaSet
gCSI <- createDromaSetFromDatabase("gCSI", "path/to/droma.sqlite")
# Load mRNA data with z-score normalization (default)
mrna_normalized <- loadMolecularProfiles(
gCSI,
molecular_type = "mRNA",
features = "ABCB1"
)
# Load without normalization
mrna_raw <- loadMolecularProfiles(
gCSI,
molecular_type = "mRNA",
features = "ABCB1",
zscore = FALSE
)
# Check if data is normalized
cat("Normalized:", isZscoreNormalized(mrna_normalized))
cat("Raw:", isZscoreNormalized(mrna_raw))
# Load drug data with normalization
drug_normalized <- loadTreatmentResponse(
gCSI,
drugs = "Paclitaxel"
)# Create MultiDromaSet
multi_set <- createMultiDromaSetFromDatabase(c("gCSI", "CCLE"))
# Load normalized data across projects
multi_mrna <- loadMultiProjectMolecularProfiles(
multi_set,
molecular_type = "mRNA",
features = "ABCB1",
overlap_only = FALSE
)
# Load normalized drug data across projects
multi_drugs <- loadMultiProjectTreatmentResponse(
multi_set,
drugs = "Paclitaxel",
overlap_only = FALSE
)
# Check normalization status for each project
for (project in names(multi_mrna)) {
cat(project, "normalized:", isZscoreNormalized(multi_mrna[[project]]), "\n")
}# Load required packages
library(DROMA.Set)
library(DROMA.R)
# Create DromaSet
gCSI <- createDromaSetFromDatabase("gCSI", "path/to/droma.sqlite")
# Analyze Paclitaxel vs ABCB1 expression
result <- analyzeDrugOmicPair(
gCSI,
select_omics_type = "mRNA",
select_omics = "ABCB1",
select_drugs = "Paclitaxel"
)
# View results
print(result$meta)
plot(result$plot)# Create MultiDromaSet
multi_set <- createMultiDromaSetFromDatabase(c("gCSI", "CCLE"))
# Analyze across projects with overlapping samples
result <- analyzeDrugOmicPair(
multi_set,
select_omics_type = "mutation_gene",
select_omics = "TP53",
select_drugs = "Cisplatin",
overlap_only = FALSE
)
# Create forest plot
createForestPlot(result$meta)# Find all genes associated with Paclitaxel response
batch_results <- batchFindSignificantFeatures(
multi_set,
feature1_type = "drug",
feature1_name = "Paclitaxel",
feature2_type = "mRNA",
cores = 4 # Use parallel processing
)
# Sort by significance
sorted_results <- batch_results[order(batch_results$p_value), ]
print(head(sorted_results, 10))
# Create volcano plot
volcano_plot <- plotMetaVolcano(batch_results)
print(volcano_plot)# Analyze drug response stratified by another drug's sensitivity
# This helps identify context-dependent biomarkers
stratified_result <- analyzeStratifiedDrugOmic(
dromaset_object = multi_set,
stratification_drug = "Cisplatin", # Drug for stratification
select_omics_type = "mRNA", # Omics data type
select_omics = "ERCC1", # Target gene
select_drugs = "Bortezomib", # Drug to analyze
stratify_by = "response_median", # Stratification method
tumor_type = "all"
)
# View stratified results
print(stratified_result$statistics)
print(stratified_result$comparison)# Process drug data with annotations
drug_data <- getDrugSensitivityData(
dromaset_object = gCSI,
drug_name = "Paclitaxel",
data_type = "all",
tumor_type = "all",
db_path = "path/to/droma.sqlite" # For loading annotations
)
# View processed data
head(drug_data)
# Create sensitivity rank plot
formatDrugTable(drug_data, drug_name = "Paclitaxel")# Connect to CTRDB database
con <- connectCTRDatabase("path/to/ctrdb.sqlite")
# Analyze clinical drug response
result <- analyzeClinicalDrugResponse(
select_omics = "EGFR",
select_drugs = "Erlotinib",
data_type = "all",
tumor_type = "all",
connection = con,
meta_enabled = TRUE
)
# View individual patient plots
print(result$plot)
# View meta-analysis forest plot
print(result$forest_plot)
# Get summary statistics
summary <- getClinicalSummary(result)
print(summary)# Stratified analysis: Drug B signature applied to Drug A
result <- analyzeStratifiedCTRDB(
drug_b_name = "Cisplatin", # Signature generation
drug_a_name = "Paclitaxel", # Signature application
select_omics = "EGFR", # Feature to analyze
connection = con,
top_n_genes = 100,
data_type = "all",
tumor_type = "all"
)
# View signature genes
print(result$signature_genes)
# View forest plot with meta-analyzed correlations
print(result$correlation_results$forest_plot)
# View combined scatter plots
print(result$correlation_results$combined_scatter_plot)
# Get comprehensive summary
summary <- getStratifiedCTRDBSummary(result)
print(summary)- mRNA: Gene expression data
- cnv: Copy number variation data
- mutation_gene: Gene-level mutation data
- mutation_site: Site-specific mutation data
- fusion: Gene fusion data
- meth: DNA methylation data
- proteinrppa: Reverse-phase protein array data
- proteinms: Mass spectrometry proteomics data
- drug: Drug sensitivity/response data
When analyzing relationships between two continuous variables (e.g., gene expression vs drug response):
- Spearman Correlation: Non-parametric rank correlation coefficient
- Fisher's Z-transformation: Converts correlation coefficients to normally distributed values for meta-analysis
- Random-Effects Model: Combines results across multiple studies accounting for heterogeneity
When comparing continuous values between discrete groups (e.g., mutated vs wild-type):
- Wilcoxon Rank-Sum Test: Non-parametric test for group differences
- Cliff's Delta: Effect size measurement for group differences (range: -1 to 1)
- |d| < 0.147: Negligible effect
- 0.147 ≤ |d| < 0.33: Small effect
- 0.33 ≤ |d| < 0.474: Medium effect
- |d| ≥ 0.474: Large effect
- Within-study analysis: Calculate effect sizes and p-values for each dataset
- Quality control: Filter results based on sample size and data quality
- Cross-study combination: Use random-effects meta-analysis to combine results
- Heterogeneity assessment: Evaluate variability between studies
- For large-scale batch analyses, use
cores > 1to enable parallel processing - Consider setting
overlap_only = TRUEwith MultiDromaSet when you need comparable sample analyses across all datasets - Use the
db_pathparameter withannotateDrugData()orgetDrugSensitivityData()to automatically load sample annotations from the database when needed - For visualization of large datasets, consider filtering to specific tumor types or data types
Contributions to DROMA.R are welcome! Please feel free to submit issues or pull requests on GitHub.
This project is licensed under the MPL-2 License - see the LICENSE file for details.
If you use DROMA.R in your research, please cite:
Li, S., Peng, Y., Chen, M. et al. Facilitating integrative and personalized oncology omics analysis with UCSCXenaShiny. Commun Biol 7, 1200 (2024). https://doi.org/10.1038/s42003-024-06891-2
For questions and feedback, please contact Peng Yu Zhong at [email protected].
DROMA.R - Advanced drug-omics association analysis powered by DROMA.Set 🧬💊📊