knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  warning = FALSE,
  message = TRUE,
  out.width = "100%"
)

This function is used to correct retention time of peaks according to internal standards.

Data preparation

Reference internal standard table

This is the table of retention time of reference internal standards (csv or xlsx format). It looks like below figure shows:

![](../man/figures/Screen Shot 2021-04-07 at 5.29.14 PM.png)

Query internal standard table

This is the table of retention time of query internal standards (csv or xlsx format). It looks like below figure shows:

![](../man/figures/Screen Shot 2021-04-07 at 5.29.45 PM.png)

Query peak table

This is the table of retention time of query peaks (csv or xlsx format). It looks like below figure shows:

![](../man/figures/Screen Shot 2021-04-07 at 5.30.14 PM.png)

Demo data

Please down load demo data here: demo data

here I download the demo data into a folder named as "example", and then uncompress it, so the data now at the directory: ./example/rt_correction.

![](../man/figures/Screen Shot 2021-04-07 at 6.25.38 PM.png)

Run correct_rt() function

library(metflow2)
correct_rt(reference_is_table_name = "reference_is_table.csv",
           query_is_table_name = "query_is_table.csv",
           query_peak_table_name = "query_peak_table.csv",
           method = "loess",
           path = "example/rt_correction/")

The results are outputted into "example/rt_correction" folder.

![](../man/figures/Screen Shot 2021-04-07 at 6.31.45 PM.png)



jaspershen/metflow2 documentation built on Aug. 15, 2021, 4:38 p.m.