library(dplyr) library(knitr) knitr::opts_chunk$set(echo = TRUE,message=FALSE, warning=FALSE) remote_dir="https://raw.githubusercontent.com/PacktPublishing/R-Bioinformatics-Cookbook/master/datasets/ch6"
if (!require(mzR)) { BiocManager::install("mzR") } if (!require(MSnbase)) { BiocManager::install("MSnbase") } if (!require(MSnID)) { BiocManager::install("MSnID") } if (!require(EnsDb.Hsapiens.v86)) { BiocManager::install("EnsDb.Hsapiens.v86") } if (!require(protViz)) { BiocManager::install("protViz") } library(mzR) library(MSnbase)
mzxml_file <- "threonine_i2_e35_pH_tree.mzXML" if (!file.exists(mzxml_file)) { download.file(file.path(remote_dir, mzxml_file), mzxml_file) } ms1 <- openMSfile(mzxml_file) mzdata_file <- "HAM004_641fE_14-11-07--Exp1.extracted.mzdata" if (!file.exists(mzdata_file)) { download.file(file.path(remote_dir, mzdata_file), mzdata_file) } ms2 <- openMSfile(mzdata_file) mzml_file <- "MM8.mzML" if (!file.exists(mzml_file)) { download.file(file.path(remote_dir, mzml_file), mzml_file) } ms3 <- openMSfile(mzml_file)
runInfo(ms3)
msn_exp <- MSnbase::readMSData(mzxml_file) MSnbase::plot(msn_exp, full = TRUE) MSnbase::plot(msn_exp[5], full = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.