plotDeplogo: Plot a dependency logo

Description Usage Arguments Details Value Author(s) Examples

View source: R/DepLogoR.R

Description

Plots a dependency logo

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
(
  data,
  dep.fun = plotDeparcs,
  block.fun = deprects,
  summary.fun = ,
  weight.fun = NULL,
  chunks = NULL,
  chunk.height = 800,
  summary.height = 100,
  minPercent = 0.03,
  threshold = 0.1,
  numBestForSorting = 3,
  maxNum = 6,
  sortByWeights = NULL,
  dep.fun.legend = TRUE,
  show.dependency.pvals = FALSE,
  axis.labels = NULL,
  weight.ratio = 5,
  partition.by = NULL,
  ...
)

Arguments

data

the data, currently implemented for DLData objects

dep.fun

the function for plotting the representation of dependency values (as computed by getDeps)

block.fun

the function for plotting a representation of the individual partitions of the data generated in dependency logos.

summary.fun

the function for plotting a representation of the summary plot for (one chunk of) the data

weight.fun

the function for plotting a representation of the weights values of the sequences within one partition

chunks

the size of chunks the data is split into. The sum of the chunk sizes must not be greater than the number of data points in data; The default value of NULL corresponds to one chunk containing all data points

chunk.height

the (relative) height of the parts of the plot representing each of the chunks, one height for each chunk

summary.height

the (relative) height of the block summaries in the plot

minPercent

the minimum percentage of the (sub) data set that may constitute its own partition in the dependency logo

threshold

the threshold on the dependency value for further splits

numBestForSorting

the number of dependencies between position i and all other positions when computing the dependency value of position i

maxNum

the maximum number of splits allowed

sortByWeights

are partitions sorted by their average weight (descending)

dep.fun.legend

if TRUE, a legend of the color scale used for plotting the dependency values in dep.fun is added to the plot

show.dependency.pvals

is TRUE, p-values are used for plotting dependency values in dep.fun instead of mutual information values

axis.labels

labels for the x-axis, vector of the same length as the individual sequences

weight.ratio

the factor by which the plotting width for the main plot is larger than for weight.fun

partition.by

specify fixed positions to partition by

...

forwarded to the high-level plot that contains the blocks plotted by block.fun

Details

The function dep.fun provided for plotting the representation of dependencies is currently implemented in plotDeparcs and plotDepmatrix. Custom implementations must have the same signature as these functions and create a single plot without using layout (or similar).

The functions block.fun and summary.fun provided for plotting the representation of individual partitions of the data generated in dependency logos are currently implemented in deprects, colorchart, and logo. Custom implementations must have the same signature as these functions and create a single plot without using layout (or similar).

The function weight.fun for plotting a representation of the weights values of the sequences within one partition is currently implemented in subLines and subBoxes. Custom implementations must have the same signature as these functions and create a single plot without using layout (or similar).

Value

a list of DLData objects with the partitions created for the dependency logo

Author(s)

Jan Grau <grau@informatik.uni-halle.de>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# read data and create DLData object
seqs <- read.table(system.file("extdata", "cjun.txt", package = "DepLogo"), 
    stringsAsFactors = FALSE)
data <- DLData(sequences = seqs[, 1],weights = log1p(seqs[, 2]) )

# plot default dependency logo
(data)

# refine threshold for clearer picture
(data, threshold = 0.3)

# customize different parts of the plot
(data, threshold = 0.3, dep.fun = plotDepmatrix, block.fun = colorchart)

# add plots of the weights
(data, weight.fun = subBoxes)

Jstacs/DepLogo documentation built on April 22, 2021, 1:21 a.m.