plotMetrics: Plot the fragment size metrics (i.e. proportion, cdf and...

Description Usage Arguments Value Author(s) Examples

View source: R/plotMetrics.R

Description

Plot the fragment size metrics (i.e. proportion, cdf and 1-cdf)

Usage

1
plotMetrics(x, order, plot, vline, xlim, ylim, ...)

Arguments

x

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

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

plot

The plot type, default is 'all': both median and mean metrics will be shown. They will include: mean_prop, mean_cdf, mean_1-cdf, median_prop, median_cdf, median_1-cdf. Could also specify as "median" or "mean".

vline

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

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.0125).

...

Further arguments passed to or from other methods.

Value

The function returns a list plots.

Author(s)

Haichao Wang

Examples

1
2
3
4
5
6
7
8
9
# Get the path to example data.
path <- examplePath("groups_picard")
# Calculate the metrics.
df <- callMetrics(path = path)
# Plot metrics.
plot <- plotMetrics(df,
    plot = "median",
    order = c("cohort_1", "cohort_2")
)

Example output

sh: 1: cannot create /dev/null: Permission denied
Loading required package: magrittr
sh: 1: cannot create /dev/null: Permission denied
Registered S3 method overwritten by 'quantmod':
  method            from
  as.zoo.data.frame zoo 
setting default input_type to picard.
Warning message:
system call failed: Cannot allocate memory 

cfDNAPro documentation built on Nov. 8, 2020, 6:49 p.m.