logomaker {Logolas} | R Documentation

## Create logo plots from aligned sequences or positional frequency (weight) matrix

### Description

Takes as input a vector of character sequences (aligned to have the ) same length or a positional frequency or weight matrix and plots the standard logo or the Enrichment Depletion (ED) Logo plots.

### Usage

    logomaker(data, type = c("Logo", "EDLogo"), use_dash = TRUE, bg = NULL,
      color_type = NULL, colors = NULL, color_seed = 2030,
      return_heights = FALSE, logo_control = list(), dash_control = list())

### Arguments

`data` | The input data may be a vector of character sequences - representing aligned sequences of DNA, RNA or amino acids, or a matrix/ data frame with symbols of characters or strings of characters along the rows of the matrix/data frame and the positions or sites of the aligned sequences along the columns.
`type` | can either be "Logo" or "EDLogo" depending on if user wants to plot the standard Logo or the Enrichment Depletion Logo.
`use_dash` | Boolean. If TRUE, performs adaptive scaling of the consensus matrix from sequences or the positional frequency matrix based on the number of underlying seqeunces. Step automatically skipped if the user provides a positional weight matrix.
`bg` | The background probability, which defaults to NULL, in which case equal probability is assigned to each symbol. The user can however specify a vector (equal to in length to the number of symbols) which specifies the background probability for each symbol and assumes this background probability to be the same across the columns (sites), or a matrix, whose each cell specifies the background probability of the symbols for each position.
`color_type` | A list specifying the coloring scheme. Defaults to NULL, for which, based on `color_seed`, a specific coloring scheme is chosen. The list contains two elements - `type` and `col`.The `type` can be of three types - "per-row", "per-column" and "per-symbol". The `col` element is a vector of colors, of same length as number of rows in table for "per-row" (assigning a color to each string), of same length as number of columns in table for "per-column" (assuming a color for each column), or a distinct color for a distinct symbol in "per-symbol". For "per-symbol", the length of the `color_profile$col` should be same as library size of the logos, but if the vector of colors provided is more or less, we can downsample or upsample the colors as required. The colors are matched with the symbols in the `total_chars`.
`colors` | Add description here.
`color_seed` | A seed for choosing among multiple available coloring schemes in `color_profile`. The default choice is 2030. But the user can use any seed of her choice.
`return_heights` | Boolean. If TRUE, the function returns the stack heights for the logo plot.For standard Logo (type = "Logo"), it returns the information content. For tyep = "EDLogo", it returns the total stack height along positive and negative axis, as well as the breakdown of the heights along different symbols along the two axis. Defaults to FALSE.
`logo_control` | Control parameters for the logo plot. Check the input arguments from the `plogomaker` and `nlogomaker` functions.
`dash_control` | Control parameters for the adaptive scaling `dash` function. Check the input arguments to the `dash` function in this package.

### Value

Returns a standard or EDLogo plot of the sequence of the positional frequency matrix based on the `type` is equal to Logo or EDLogo.

### Examples

    sequence <- c("CTATTGT", "CTCTTAT", "CTATTAA", "CTATTTA", "CTATTAT",
                  "CTTGAAT", "CTTAGAT", "CTATTAA", "CTATTTA", "CTATTAT",
                  "CTTTTAT", "CTATAGT", "CTATTTT", "CTTATAT", "CTATATT",
                  "CTCATTT", "CTTATTT", "CAATAGT", "CATTTGA", "CTCTTAT",
                  "CTATTAT", "CTTTTAT", "CTATAAT", "CTTAGGT",
                  "CTATTGT", "CTCATGT", "CTATAGT", "CTCGTTA",
                  "CTAGAAT", "CAATGGT")

    logomaker(sequence, type = "Logo")
    logomaker (sequence, type = "EDLogo")

    library(ggseqlogo)
    data(ggseqlogo_sample)

    sequence <- seqs_aa$AKT1
    logomaker (sequence, type = "Logo")
    logomaker (sequence, type = "EDLogo")

    data("seqlogo_example")
    logomaker(seqlogo_example, type = "Logo", return_heights = TRUE)
    logomaker(seqlogo_example, type = "EDLogo", return_heights = TRUE)

[Package Logolas version 1.10.0 Index]