draw.eset.QC: QC plots for ExpressionSet class object.

View source: R/pipeline_functions.R

draw.eset.QCR Documentation

QC plots for ExpressionSet class object.

Description

draw.eset.QC is a function to draw a set of plots for quality control analysis. 6 types of plots will be created, including heatmap, dimension reduction plots (pca, mds, umap), boxplot, density, correlation and meansd.

Usage

draw.eset.QC(
  eset,
  outdir = ".",
  do.logtransform = FALSE,
  intgroup = NULL,
  prefix = "",
  choose_plot = c("heatmap", "pca", "boxplot", "density", "correlation"),
  generate_html = TRUE,
  correlation_strategy = "pearson",
  plot_all_point = FALSE,
  emb_plot_type = "2D.ellipse",
  use_color = NULL,
  pre_define = NULL
)

Arguments

eset

ExpressionSet class, quality control analysis target.

outdir

character, the directory path for saving output files.

do.logtransform

logical, if TRUE, the log transformation will be performed on the gene expression value. Default is FALSE.

intgroup

a vector of characters, the interested phenotype groups from the ExpressionSet. If NULL, it will automatcially extract all possible groups by get_int_group. Default is NULL.

prefix

character, the prefix for the QC figures' name. Default is "".

choose_plot

a vector of characters, choose one or many from 'heatmap', 'pca','mds','umap','boxplot', 'density','correlation' and 'meansd' plots. Default is 'heatmap', 'pca', 'boxplot','density' and 'correlation'

generate_html

logical, if TRUE, it will generate a html file by R Markdown. Otherwise, it will generate separate PDF files. Default is TRUE.

correlation_strategy

character, the strategy to calculate the sample correlation, choose from 'pearson' and 'spearman'. Default is 'pearson'.

plot_all_point

logical, if TRUE, the scatterplot will plot all points in the correlation, otherwise will plot the main trend for reducing the figure size. Default is FALSE.

emb_plot_type

character, plot type for dimension reduction methods (pca, mds, umap). Users can choose from "2D","2D.interactive", "2D.ellipse", "2D.text" and "3D". Default is "2D.ellipse".

use_color

a vector of color codes, colors to be assigned to each member of display label. Default is brewer.pal(9, 'Set1').

pre_define

a vector of characters, pre-defined color codes for a certain input (e.g. c("blue", "red") with names c("A", "B")). Default is NULL.

Examples

## Not run: 
network.par <- list()
network.par$out.dir.DATA <- system.file('demo1','network/DATA/',package = "NetBID2")
NetBID.loadRData(network.par=network.par,step='exp-QC')
intgroups <- get_int_group(network.par$net.eset)
network.par$out.dir.QC <- getwd() ## set the output directory
draw.eset.QC(network.par$net.eset,outdir=network.par$out.dir.QC,intgroup=intgroups,
             pre_define=c('WNT'='blue','SHH'='red','G4'='green'))
draw.eset.QC(network.par$net.eset,outdir=network.par$out.dir.QC,intgroup=intgroups,
             pre_define=c('WNT'='blue','SHH'='red','G4'='green'),
             emb_plot_type = '2D.interactive',choose_plot = 'pca')

## End(Not run)

jyyulab/NetBID documentation built on Dec. 23, 2024, 6:34 a.m.