viz_bas_vec_heatmap_seqlogo: Visualize the NMF basis vectors in a paired heatmap and...

Description Usage Arguments Value Functions See Also Examples

View source: R/viz_basis_vectors.R

Description

The given features matrix is visualized as a heatmap followed by a sequence logo where the positions are aligned for better visualization.

Usage

 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
28
(
  feat_mat,
  method = "bits",
  pos_lab = NULL,
  add_pseudo_counts = FALSE,
  pdf_name = NULL,
  sinuc_or_dinuc = "sinuc",
  fixed_coord = FALSE
)

(
  feat_mat,
  method = "bits",
  pos_lab = NULL,
  add_pseudo_counts = FALSE,
  pdf_name = NULL,
  sinuc_or_dinuc = "sinuc",
  fixed_coord = FALSE
)

viz_bas_vec_heatmap(
  feat_mat,
  pos_lab = NULL,
  add_pseudo_counts = FALSE,
  pdf_name = NULL,
  sinuc_or_dinuc = "sinuc",
  fixed_coord = FALSE
)

Arguments

feat_mat

The features matrix (basis vectors matrix) from archR.

method

For ggseqlogo – either of "custom", "bits", or "probability". Default is "bits".

pos_lab

Labels for sequence positions, should be of same length as that of the sequences. Default value is NULL, when the positions are labeled from 1 to the length of the sequences.

add_pseudo_counts

Logical, taking values TRUE or FALSE, default set to FALSE. Setting it to TRUE will enable adding pseudo-counts to the features matrix.

pdf_name

Name of the file which will be saved as PDF (also provide the extension).

sinuc_or_dinuc

"sinuc" or "dinuc" for choosing between mono- and dinucleotide profiles respectively.

fixed_coord

Set this to TRUE to use a fixed aspect ratio for the plot. Default is FALSE.

Value

nothing

Functions

See Also

Other visualization functions: plot_ggheatmap(), plot_ggseqlogo(), viz_seqs_acgt_mat_from_seqs()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
res <- readRDS(system.file("extdata", "example_archRresult.rds", 
         package = "archR", mustWork = TRUE))

(feat_mat = get_clBasVec_m(res,iter=1),
                            sinuc_or_dinuc = "dinuc", fixed_coord = TRUE)

(feat_mat = get_clBasVec_m(res,iter=1),
                     sinuc_or_dinuc = "dinuc", fixed_coord = TRUE)

# Visualizing basis vector for a single cluster
viz_bas_vec_heatmap(feat_mat = as.matrix(get_clBasVec_m(res,iter=1)[,3]),
                     sinuc_or_dinuc = "dinuc", fixed_coord = TRUE)

snikumbh/archR documentation built on July 5, 2021, 8:46 a.m.