plotModeSummary: Summarize and plot mode fragment size in a stacked bar chart

View source: R/plotModeSummary.R

plotModeSummaryR Documentation

Summarize and plot mode fragment size in a stacked bar chart

Description

Summarize and plot mode fragment size in a stacked bar chart

Usage

plotModeSummary(x, order, summarized, mode_partition, ...)

Arguments

x

A long-format dataframe contains mode fragment size, a template please refer to the result of 'callMode' function.

order

The groups show in the final plot, the input value should be vector, e.g. ‘groups = c(’group1','group2')', default is all folders in the folder path.

summarized

Logical value, default is False.

mode_partition

This should be a list. This decides how the modes are partitioned in each stacked bar. Default value is 'list(c(80, 81), c(111, 112), c(167))'. Also this function will automatically calculate an 'Others' group which includes the modes not mentioned by users.

...

Further arguments passed to or from other methods.

Value

The function returns the plot.

Author(s)

Haichao Wang

Examples

# Get the path to example data.
path <- examplePath("groups_picard")
# Calculate the modes.
df <- callMode(path = path)
# Plot mode summary.
plot <- plotModeSummary(df,
    mode_partition = list(c(80, 81), c(111, 112), c(167))
)

hw538/cfDNAPro documentation built on April 21, 2024, 2:21 a.m.