Baseline Dimension Reduction of RNA-seq Data
baseline_dimreduction.RdTakes a formatted DESeqDataSet object and performs several
exploratory analyses to evaluate sample similarity and major sources
of variation within the dataset.
Performs baseline exploratory dimension reduction and sample-level
visualization of a DESeqDataSet. Variance-stabilized expression
values are used to calculate sample distances and principal components.
The most variable genes are used for PCA and downstream visualization.
The analysis:
applies a variance-stabilizing transformation to the expression matrix,
identifies the top variable genes,
calculates Euclidean distances between samples,
performs principal component analysis (PCA) using the top variable genes,
generates sample embedding plots,
generates an elbow plot showing the variance explained by the leading principal components, and
performs UMAP for nonlinear dimensionality reduction.
Arguments
- bulk_dataset
A formatted
DESeqDataSet(DDS) object containing the RNA-seq expression data and associated sample metadata.- top_var
Integer specifying the number of genes with the highest variance to retain for PCA and downstream dimension reduction. For example,
top_var = 2000uses the 2,000 most variable genes.- grouping
Character string specifying the sample metadata variable used to annotate or group samples in the distance and dimension reduction visualizations. The variable should correspond to a column in the
colDataofbulk_dataset.
Value
distance_plot: euclidean distance plot,elbow_plot: shows which PC has the majority of the variance within the dataPCA plot: scatterplot of the left unitary vectorsUMAP_plot: A UMAP visualization of the sample embeddings.results$distance_plot results$PCA_plot results$elbow_plot results$umap_plot