factorMap: Plot an MFA factor map for individuals or partial factor map...

Description Usage Arguments Value Examples

View source: R/plot_functions.R

Description

Produce an MFA factor map for individuals, or MFA partial factor map for a given individual, for a pair of dimensions provided by the user.

Usage

1
2
3
4
5
6
7
8
9
factorMap(
  padma_obj,
  partial_id = NULL,
  dim_x = 1,
  dim_y = 2,
  plot_ellipse = TRUE,
  ggplot = TRUE,
  repel_labels = ifelse(ggplot == TRUE, TRUE, FALSE)
)

Arguments

padma_obj

Output from running the padma function (with 'full_results = TRUE')

partial_id

Index or sample name to be plotted for a partial factor map.

dim_x

Dimension number of the MFA to be plotted on the x-axis.

dim_y

Dimension number of the MFA to be plotted on the y-axis.

plot_ellipse

If TRUE, superimpose a normal confidence ellipsis on the factor map.

ggplot

If TRUE, use ggplot2 for plotting

repel_labels

If TRUE, use ggrepel to repel sample labels from each other

Value

Plot, or factor map of class ggplot if ggplot2 = TRUE.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
LUAD_subset <- padma::LUAD_subset
## Create MultiAssayExperiment object with LUAD data
omics_data <- 
  list(rnaseq = LUAD_subset$rnaseq,
       methyl = LUAD_subset$methyl,
       mirna = LUAD_subset$mirna,
       cna = LUAD_subset$cna)
pheno_data <- 
  data.frame(LUAD_subset$clinical, 
             row.names = LUAD_subset$clinical$bcr_patient_barcode)
mae <-
  suppressMessages(
    MultiAssayExperiment::MultiAssayExperiment(
      experiments = omics_data, colData = pheno_data))

## Run padma
run_padma <- 
  padma(mae, gene_map = padma::mirtarbase,
        pathway_name = "c2_cp_BIOCARTA_D4GDI_PATHWAY", verbose = FALSE)

summary(run_padma)

## padma plots
factorMap(run_padma, dim_x = 1, dim_y = 2)
factorMap(run_padma, dim_x = 1, dim_y = 2,
           partial_id = "TCGA-78-7536")
omicsContrib(run_padma, max_dim = 10)

padma documentation built on Nov. 8, 2020, 4:56 p.m.