Learn R Programming

tcR (version 2.3.2)

vis.kmer.histogram: Plot of the most frequent kmers.

Description

Plot a distribution (bar plot) of the most frequent kmers in a data.

Usage

vis.kmer.histogram(
  .kmers,
  .head = 100,
  .position = c("stack", "dodge", "fill")
)

Arguments

.kmers

Data frame with two columns "Kmers" and "Count" or a list with such data frames. See Examples.

.head

Number of the most frequent kmers to choose for plotting from each data frame.

.position

Character vector of length 1. Position of bars for each kmers. Value for the ggplot2 argument position.

See Also

get.kmers

Examples

Run this code
# NOT RUN {
# Load necessary data and package.
library(gridExtra)
load('immdata.rda')
# Get 5-mers.
imm.km <- get.kmers(immdata)
# Plots for kmer proportions in each data frame in immdata.
p1 <- vis.kmer.histogran(imm.km, .position = 'stack')
p2 <- vis.kmer.histogran(imm.km, .position = 'fill')
grid.arrange(p1, p2)
# }

Run the code above in your browser using DataLab