Package: massFlowR
Authors: Elzbieta Lauzikaite
Modified: r file.info("massFloWR.Rmd")$mtime
Compiled: r date()

BiocStyle::markdown() 
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
Biocpkg <- function (pkg) {
    sprintf("[%s](http://bioconductor.org/packages/%s)", pkg, pkg)
}
options(kpb.suppress_noninteractive = TRUE) ## supressing progress bar
suppressWarnings(library(massFlowR))
suppressWarnings(library(xcms))
rda_dir <- "~/Documents/Projects/DBannotate/NPC-RPOS-LCE-SubDB"
db_dir <- "~/Documents/Projects/massFlowR/packageDEV/db"
out_directory <- getwd()
url <- "https://htmlpreview.github.io/?https://github.com/lauzikaite/massFlowR/blob/master/doc/massFlowR.html"

massFlowR performs automatic annotation during peak alignment if LC-MS files for chemical reference compounds are available. To enable annotation, provide a database table in a csv format when initiating peak alignment (see section peak annotation).

Database table can be obtained from raw LC-MS files in two steps:

Chemical spectra extraction

(code under development)

Raw LC-MS files had been processed by M.Lewis. Code for corresponding functionality will be added to massFlowR package for those that have acquired LC-MS data independently.

Database table

Building database from rda files

Previously processed LC-MS files were recorded in rda files. Function getDB can be used to build a database table using these rda files. The generated table will have the following columns:

buildDB(rda_dir = rda_dir, out_dir = out_directory)
db_table <- read.csv(file.path(out_directory, "DBtemplate.csv"))
# rda_dir <- "absolute_path_to_rda_files"
# out_dir <- "absolute_path_to_output_directory"
buildDB(rda_dir = rda_dir, out_dir = out_directory)
db_table <- read.csv(file.path(out_directory, "DBtemplate.csv"))
db_table <- db_table[which(db_table$chemid %in% c(1,2,3)),]
dt <- head(db_table)

kableExtra::kable_styling(
  knitr::kable(x = dt,
           format = "html",
           row.names = F),
  full_width = TRUE, bootstrap_options = c("striped"), position = "left")

See also



lauzikaite/massFlowR documentation built on April 29, 2020, 9:45 a.m.