QC_CV_scatterplot {MWASTools} | R Documentation

## Plot MS-based scatter plot colored based on CV

### Description

This function creates a MS-based scatter plot (rt vs mz) where the metabolic features are colored based on their coefficient of variation (CV). See "QC_CV()".

### Usage

    QC_CV_scatterplot (rt, mz, CV_metabo, CV_th = 0.30, xlab = "rt",
                       ylab = "mz", pch = 20, marker_size = 1, xlim = NULL,
                       ylim = NULL, size_axis = 10, size_lab = 10)

### Arguments

`rt` | numeric vector of retention time values.
`mz` | numeric vector of mz values.
`CV_metabo` | numeric vector containing the CV of each metabolic feature. The length of this vector should be consistent with the length of rt and mz.
`CV_th` | numeric value indicating the CV threshold. NMR signals with CV equal or above CV_th will be colored in red.
`xlab` | character vector specifying a title for the x-axis.
`ylab` | character vector specifying a title for the y-axis.
`pch` | value specifying the symbol used to represent each MS feature in the scatter plot. To see all possible symbols, check "plot()" options.
`marker_size` | numeric value indicating the size of the symbol used to represent each metabolic feature in the scatter plot.
`xlim` | numeric vector containing the minimum and maximum values of the x-axis.
`ylim` | numeric vector containing the minimum and maximum values of the y-axis.
`size_axis` | numeric value indicating the font size of x- and y-axis title.
`size_lab` | numeric value indicating the font size of x- and y-axis labels.

### Value

A MS-based scatter plot where MS features are represented according on CV.

### Examples

    ## Load data
    data(MS_data)
    rt <- MS_data[, 1]
    mz <- MS_data[, 2]

    ## Simulate CV values
    CV_metabo <- runif(length(rt), 0.05, 0.31)

    ## MS-based scatter plot
    QC_CV_scatterplot(rt, mz, CV_metabo)
    QC_CV_scatterplot(rt, mz, CV_metabo, xlim = c(0, 10))
    QC_CV_scatterplot(rt, mz, CV_metabo, CV_th = 0.15)

[Package MWASTools version 1.6.0 Index]