ge_pca: ge_pca

View source: R/ge_pca.R

ge_pcaR Documentation

ge_pca

Description

Creates a PCA plot from gene expression data using the VST transformation from the plotPCA function from the DESeq2 package.

Usage

ge_pca(
  counts,
  genes_id,
  metadata,
  response,
  design,
  colors = c("orange", "black")
)

Arguments

counts

Data frame that contains gene expression data as raw counts.

genes_id

Name of the column that contains gene identifiers. Should be one of the following:'entrezgene_id', 'ensembl_gene_id' or 'hgnc_symbol'.

metadata

Data frame that contains supporting variables to the data.

response

Unquoted name of the variable indicating the groups to analyse.

design

Variables in the design formula in the form of: 'Var1 + Var2 + ... Var_n'.

colors

Character vector indicating the colors of the different groups to compare. Default values are two: black and orange.

Value

Returns a ggplot object.

Examples

ge_pca(counts = sample_counts,
       genes_id = 'ensembl_gene_id',
       metadata = sample_metadata,
       response = MSI_status,
       design = 'MSI_status',
       colors = c('orange', 'black'))


oriolarques/GEGVIC documentation built on Oct. 30, 2024, 10:44 p.m.