knitr::opts_chunk$set( collapse = TRUE, comment = "#>", warning = FALSE, message = TRUE, out.width = "100%" )
Download the demo data and refer this article.
We have positive and negative mode. For each mode, we have control
, case
and QC
groups. Control group have 110 samples, and case group have 110 samples as well.
massprocesser
package is used to do the raw data processing. Please refer this website.
The code used to do raw data processing.
library(tidymass)
process_data( path = "mzxml_ms1_data/POS", polarity = "positive", ppm = 10, peakwidth = c(10, 60), threads = 4, output_tic = FALSE, output_bpc = FALSE, output_rt_correction_plot = FALSE, min_fraction = 0.5, group_for_figure = "QC" )
All the results will be placed in the folder mzxml_ms1_data/POS/Result
. More information can be found here.
You can just load the object
, which is a mass_dataset
class object.
load("mzxml_ms1_data/POS/Result/object") object
We can see that there are 10,149 metabolic features in positive mode.
You can use the plot_adjusted_rt()
function to get the interactive plot.
load("mzxml_ms1_data/POS/Result/intermediate_data/xdata2") ##set the group_for_figure if you want to show specific groups. And set it as "all" if you want to show all samples. plot = massprocesser::plot_adjusted_rt(object = xdata2, group_for_figure = "QC", interactive = TRUE) plot
The processing of negative mode is same with positive mode data.
Same with positive mode, change polarity
to negative
.
massprocesser::process_data( path = "mzxml_ms1_data/NEG", polarity = "negative", ppm = 10, peakwidth = c(10, 60), threads = 4, output_tic = FALSE, output_bpc = FALSE, output_rt_correction_plot = FALSE, min_fraction = 0.5, group_for_figure = "QC" )
Same with positive mode.
load("mzxml_ms1_data/NEG/Result/object") object
We can see that there are 8,804 metabolic features in negative mode.
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.