Calculates the correlation of missing rates between the two flanking pooled plasma samples and intervening biological samples for each block in the injection order. A block is defined as a set of biological samples and their flanking pooled plasma samples. See
sampledata for an example of the data format and block structure. Requires 2 arguments as input: 1. The metabolomics dataset formatted from the
read.met function and 2. A list of 2 elements output from the
get_group function containing column indices of pooled plasma samples and biological samples, respectively. If either pooled plasma or biological samples are entirely absent or entirely present, the function will return NA for the metric of that metabolite as the standard deviation of a vector will be 0.
The metabolomics dataset, ideally read from the
A list of 2 elements from the
Returns a vector of equal length to the number of rows in
df (representing metabolites) with the correlation of missing rates between flanking pooled plasma and intervening biological samples across all blocks.
MetProc-package for examples of running the full process.
1 2 3 4 5 6 7 8 9 10
library(MetProc) #Read metabolomics data metdata <- read.met(system.file("extdata/sampledata.csv", package="MetProc"), headrow=3, metidcol=1, fvalue=8, sep=",", ppkey="PPP", ippkey="BPP") #Get indices of samples and pooled plasma grps <- get_group(metdata,'PPP','X') #get correlation metrics of metabolites corrs <- corr_metric(metdata,grps)