Description Usage Arguments Value See Also Examples
View source: R/functions_cleane.R
For each metabolite, data is split into blocks that consist of the preceding pooled plasma sample and following biological samples in an injection order. For each block, data is deemed present in biological samples if the missing rate is less than scut
. An entire block is deemed to have data present if both the preceding pooled plasma and folllowing biolgical samples are both considered to have data present. The length of the longest consecutive run of blocks with data present is returned for each metabolite.
1 | run_metric(df, grps, scut = 0.5)
|
df |
The metabolomics dataset, ideally read from the |
grps |
A group list from the |
scut |
The cutoff missing rate to determine if data is present in a group of biological samples. If the missing rate of the biological samples is greater than or equal to this missing rate threshold, data will be considered absent from the block of biological samples. Default is |
Returns a vector containing the longest consecutive run of blocks with data present for each metabolite
See MetProc-package
for examples of running the full process.
1 2 3 4 5 6 7 8 9 10 11 | library(MetProc)
#Read in 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 pooled plasma and samples
grps <- get_group(metdata,'PPP','X')
#Get the longest run metric for each metabolite
runs <- run_metric(metdata,grps,scut=.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.