pyramid_3d_grid: The k-mer grid pyramid 3D plotting function

Description Usage Arguments Details Author(s) Examples

View source: R/pyramid_3d_grid.R

Description

The k-mer grid pyramid 3D plotting function allows to plot the k-mer distribution given by a window of a single sequences. Further, it is possible to compare two sequences to each other.

Usage

1
2
pyramid_3d_grid(list, color = "black", difference = FALSE,
  identify = FALSE, bw = FALSE, bw.cex = 10, edges = NULL)

Arguments

list

List of sequences generated by the function link{get_pca_window_list}. Only one list entry can be plotted at the same time. If two list entries are provided, set difference to TRUE to get the difference pyramid.

color

Single value 'black', if all points should be black or vector of length nrow(df) if all points should be colored differently.

difference

Should the difference between two list entries be calcualted and the difference pyramid be plotted? [default = FALSE]

identify

Set to TRUE, if points should be identified, than the k-mer will be shown.

bw

Black and white plot for the differences [default = FALSE]

bw.cex

Size of the text symbols in the black and white difference plot.

edges

A vector of edges which should be printed. Because there is no difference between AG and GA only the alpha numeric one will work: AG.

Details

The function plots the k-mer distribution of single sequences generated by the function link{get_pca_window_list} into the three dimensional space of a principal component analysis.

The user can provide single list entries or two list entries. In the first case the k-mer distribution given by the window size will be plotted. The color and can be changed by color or different edges can be shown by edges. If two list entries are supplied and difference is set to TRUE the difference in both sequences given the window k-mer count is calculated and shown by different radius sizes. An increase from sequence one to sequence two is colored blue and a decrease is colored red. The identify option allows to identify single points in the 3D plot.

Author(s)

Jochen Kruppa

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
## Read in own DNA sequences by the package Biostrings (see Details for more information)

data(viralExampleSeqs)

viral_window_list <- get_pca_window_list(viralExampleSeqs, window = 2)

pyramid_3d_grid(viral_window_list[1],
                  color = "red")

pyramid_3d_grid(viral_window_list[1],
                  color = "red",
                  identify = TRUE)

pyramid_3d_grid(viral_window_list[c(3,5)],
                  difference = TRUE,
                  identify = TRUE)

pyramid_3d_grid(viral_window_list[c(3,5)],
                  difference = TRUE,
                  bw = TRUE,
                  bw.cex = 75,
                  identify = TRUE)

pyramid_3d_grid(viral_window_list[1],
                  color = "red",
                  edges = c("AT", "CG"))

jkruppa/acgtPyramid documentation built on May 19, 2019, 12:45 p.m.