omicsViewer
Workflows
Standard Workflow
library(omicsViewer)
library(Biobase)
packdir <- system.file("extdata", package = "omicsViewer")
expr <- read.delim(file.path(packdir, "expressionMatrix.tsv"), stringsAsFactors = FALSE)
colnames(expr) <- make.names(colnames(expr))
rownames(expr) <- make.names(rownames(expr))
fd <- read.delim(file.path(packdir, "featureGeneral.tsv"), stringsAsFactors = FALSE)
pd <- read.delim(file.path(packdir, "sampleGeneral.tsv"), stringsAsFactors = FALSE)
# Prepare the ExpressionSet object
d <- prepOmicsViewer(
expr = expr, pData = pd, fData = fd,
PCA = TRUE, pca.fillNA = TRUE,
SummarizedExperiment = FALSE
)
# Run correlation analysis and extend metadata
expr_mat <- exprs(d)
drugData <- read.delim(file.path(packdir, "sampleDrug.tsv"))
drugcor <- correlationAnalysis(expr_mat, pheno = drugData[, 1:2])
d <- extendMetaData(d, drugcor, where = "fData")
Input: Expression matrix, feature data, and phenotype data.
Output: An ExpressionSet object prepared and extended for interactive visualization in omicsViewer.
When to Use
- Interactive exploration of high-throughput omics data stored in
ExpressionSet or SummarizedExperiment objects.
- Performing on-the-fly enrichment analysis (using
fgsea or Fisher's exact test) or STRING network analysis on selected features.
- Testing associations between selected samples and phenotype variables using
correlationAnalysis or hypothesis tests (t-test, Mann-Whitney U test, chi-square, or log-rank test).
When NOT to Use
- For high-throughput sequence alignment or raw read counting; use packages like
Rsubread instead.
- For complex multi-factor differential expression modeling without interactive visualization; use
limma, edgeR, or DESeq2 directly.
Data Requirements
- An expression matrix with unique row names (features) and column names (samples).
- Feature data (
fData) and phenotype data (pData) where row names match the expression matrix's row and column names, respectively.
- Column headers in feature and phenotype data formatted as
Analysis|Subset|Variable (e.g., ttest|RE_vs_ME|mean.diff).
Key Parameters
- expr: Expression matrix with unique row and column names.
- pData: Phenotype data frame matching columns of the expression matrix.
- fData: Feature data frame matching rows of the expression matrix.
- PCA (
TRUE): Logical indicating whether to perform principal component analysis.
- pca.fillNA (
TRUE): Logical indicating whether to impute missing values for PCA.
- t.test: Matrix defining t-tests to perform.
- ttest.fillNA (
FALSE): Logical indicating whether to impute missing values for t-tests.
- SummarizedExperiment (
FALSE): Logical indicating whether to return a SummarizedExperiment instead of an ExpressionSet.
Best Practices
- Pre-calculate dendrograms for rows and columns using
hclust and as.dendrogram and store them as attributes (rowDendrogram/colDendrogram) of the expression matrix to speed up heatmap rendering.
- Use reserved keywords like
Surv, StringDB, and GS in headers to enable specific downstream tabs (Survival, STRING, ORA/fGSEA) in the analyst panel.
- Extend metadata post-creation using
extendMetaData to integrate additional statistical results like correlation analyses.
Common Pitfalls
- Slow heatmap rendering: Calculating dendrograms on the fly for large matrices is slow. Fix: Pre-calculate dendrograms and assign them to the
rowDendrogram attribute of the expression matrix.
- Incompatible headers: Front-end fails to recognize analysis columns. Fix: Ensure column names follow the strict
Analysis|Subset|Variable format.
- Non-matching identifiers: Feature or sample names do not align between matrices. Fix: Ensure row names of
fData match row names of expr, and row names of pData match column names of expr.
Alternatives
- limma: For non-interactive, complex linear modeling of microarray and RNA-seq data.
- DESeq2: For differential expression analysis of RNA-seq count data.
- edgeR: For differential expression analysis of digital gene expression data.
Citations
- Meng Chen (2026). Interactive and explorative visualization of ExpressionSet using omicsViewer.
References
1---2name: omicsviewer3description: omicsViewer4---56# omicsViewer78## Workflows910### Standard Workflow1112```r13library(omicsViewer)14library(Biobase)1516packdir <- system.file("extdata", package = "omicsViewer")17expr <- read.delim(file.path(packdir, "expressionMatrix.tsv"), stringsAsFactors = FALSE)18colnames(expr) <- make.names(colnames(expr))19rownames(expr) <- make.names(rownames(expr))2021fd <- read.delim(file.path(packdir, "featureGeneral.tsv"), stringsAsFactors = FALSE)22pd <- read.delim(file.path(packdir, "sampleGeneral.tsv"), stringsAsFactors = FALSE)2324# Prepare the ExpressionSet object25d <- prepOmicsViewer(26 expr = expr, pData = pd, fData = fd, 27 PCA = TRUE, pca.fillNA = TRUE,28 SummarizedExperiment = FALSE29)3031# Run correlation analysis and extend metadata32expr_mat <- exprs(d)33drugData <- read.delim(file.path(packdir, "sampleDrug.tsv"))34drugcor <- correlationAnalysis(expr_mat, pheno = drugData[, 1:2])35d <- extendMetaData(d, drugcor, where = "fData")36```37*Input:* Expression matrix, feature data, and phenotype data. 38*Output:* An `ExpressionSet` object prepared and extended for interactive visualization in `omicsViewer`.3940## When to Use41- Interactive exploration of high-throughput omics data stored in `ExpressionSet` or `SummarizedExperiment` objects.42- Performing on-the-fly enrichment analysis (using `fgsea` or Fisher's exact test) or STRING network analysis on selected features.43- Testing associations between selected samples and phenotype variables using `correlationAnalysis` or hypothesis tests (t-test, Mann-Whitney U test, chi-square, or log-rank test).4445## When NOT to Use46- For high-throughput sequence alignment or raw read counting; use packages like `Rsubread` instead.47- For complex multi-factor differential expression modeling without interactive visualization; use `limma`, `edgeR`, or `DESeq2` directly.4849## Data Requirements50- An expression matrix with unique row names (features) and column names (samples).51- Feature data (`fData`) and phenotype data (`pData`) where row names match the expression matrix's row and column names, respectively.52- Column headers in feature and phenotype data formatted as `Analysis|Subset|Variable` (e.g., `ttest|RE_vs_ME|mean.diff`).5354## Key Parameters55- **expr**: Expression matrix with unique row and column names.56- **pData**: Phenotype data frame matching columns of the expression matrix.57- **fData**: Feature data frame matching rows of the expression matrix.58- **PCA** (`TRUE`): Logical indicating whether to perform principal component analysis.59- **pca.fillNA** (`TRUE`): Logical indicating whether to impute missing values for PCA.60- **t.test**: Matrix defining t-tests to perform.61- **ttest.fillNA** (`FALSE`): Logical indicating whether to impute missing values for t-tests.62- **SummarizedExperiment** (`FALSE`): Logical indicating whether to return a SummarizedExperiment instead of an ExpressionSet.6364## Best Practices65- Pre-calculate dendrograms for rows and columns using `hclust` and `as.dendrogram` and store them as attributes (`rowDendrogram`/`colDendrogram`) of the expression matrix to speed up heatmap rendering.66- Use reserved keywords like `Surv`, `StringDB`, and `GS` in headers to enable specific downstream tabs (Survival, STRING, ORA/fGSEA) in the analyst panel.67- Extend metadata post-creation using `extendMetaData` to integrate additional statistical results like correlation analyses.6869## Common Pitfalls70- **Slow heatmap rendering**: Calculating dendrograms on the fly for large matrices is slow. Fix: Pre-calculate dendrograms and assign them to the `rowDendrogram` attribute of the expression matrix.71- **Incompatible headers**: Front-end fails to recognize analysis columns. Fix: Ensure column names follow the strict `Analysis|Subset|Variable` format.72- **Non-matching identifiers**: Feature or sample names do not align between matrices. Fix: Ensure row names of `fData` match row names of `expr`, and row names of `pData` match column names of `expr`.7374## Alternatives75- **limma**: For non-interactive, complex linear modeling of microarray and RNA-seq data.76- **DESeq2**: For differential expression analysis of RNA-seq count data.77- **edgeR**: For differential expression analysis of digital gene expression data.7879## Citations80- Meng Chen (2026). Interactive and explorative visualization of ExpressionSet using omicsViewer.8182## References83- Homepage: https://bioconductor.org/packages/omicsViewer84- Vignette: https://bioconductor.org/packages/release/bioc/vignettes/omicsViewer/inst/doc/quickStart.html