FnPCA: Creating PCA plots with logit(fn) estimates

View source: R/Visualizations.R

FnPCAR Documentation

Creating PCA plots with logit(fn) estimates

Description

This function creates a 2-component PCA plot using logit(fn) estimates. FnPCA has been deprecated in favor of FnPCA2. The latter accepts a full bakRFit as input and handles imbalanced replicates.

Usage

FnPCA(obj, log_kdeg = FALSE)

Arguments

obj

Object contained within output of bakRFit. So, either Fast_Fit (MLE implementation fit), Stan_Fit (MCMC implementation fit), or Hybrid_Fit (Hybrid implementation fit)

log_kdeg

Boolean; if TRUE, then log(kdeg) estimates used for PCA rather than logit(fn). Currently only compatible with Fast_Fit

Value

A ggplot object.

Examples


# Simulate data for 500 genes and 2 replicates
sim <- Simulate_bakRData(500, nreps = 2)

# Fit data with fast implementation
Fit <- bakRFit(sim$bakRData)

# Fn PCA
FnPCA2(Fit, Model = "MLE")

# log(kdeg) PCA
FnPCA2(Fit, Model = "MLE", log_kdeg = TRUE)



bakR documentation built on June 22, 2024, 6:55 p.m.