plotSingleGroup: Plot the raw fragment size metrics of single group in a...

View source: R/plotSingleGroup.R

plotSingleGroupR Documentation

Plot the raw fragment size metrics of single group in a single plot, colored by samples.

Description

Plot the raw fragment size metrics of single group in a single plot, colored by samples.

Usage

plotSingleGroup(x, xlim, ylim, vline, order, plot, ...)

Arguments

x

A long-format dataframe contains the metrics of different cohort.

xlim

The x axis range shown in the plot. Default is 'c(0,500)'.

ylim

The y axis range shown in the fraction of fragment size plots. Default is 'c(0,0.035)'.

vline

Vertical dashed lines, default value is 'c(81,167)'.

order

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

plot

The plot type, default is 'all' which means both proportion, cdf and 1-cdf plots will be shown.

...

Further arguments passed to or from other methods.

Value

The function returns a list plots.

Author(s)

Haichao Wang

Examples

# Get the path to example data.
path <- examplePath("groups_picard")

# Calculate the metrics.
df <- callMetrics(path = path)

# Plot the only the group specified..
plot <- plotSingleGroup(x = df, order = c("cohort_1"))

hw538/cfDNAPro documentation built on Aug. 13, 2024, 2:58 p.m.