readXICs: Extracts XICs of a given mass vector

View source: R/rawDiag.R

readXICsR Documentation

Extracts XICs of a given mass vector

Description

Extracts XICs of a given mass vector

Usage

readXICs(
  rawfile,
  masses,
  tol = 10,
  mono = if (Sys.info()["sysname"] %in% c("Darwin", "Linux")) TRUE else FALSE,
  exe = .rawDiagAssembly()
)

Arguments

rawfile

the file name

masses

a vector of masses

tol

tolerance in ppm

mono

if the mono enviroment should be used.

exe

the exe file user by mono

Value

list of XIC objects

Examples

# Example 1: extract iRT peptides
iRTpeptide <- c("LGGNEQVTR", "YILAGVENSK", "GTFIIDPGGVIR", "GTFIIDPAAVIR",
"GAGSSEPVTGLDAK", "TPVISGGPYEYR", "VEATFGVDESNAK",
"TPVITGAPYEYR", "DGLDAASYYAPVR", "ADVTPADFSEWSK",
"LFLQFGAQGSPFLK")

library(protViz)
# 2Hplus 
(mZ <- (parentIonMass(iRTpeptide) + 1.008) / 2)

## Not run: 
f <- "ftp://massive.ucsd.edu/MSV000086542/raw/20181113_010_autoQC01.raw"
rawfile <- file.path(cachedir <- tools::R_user_dir("rawrr", which='cache'), "20181113_010_autoQC01.raw")
if (!dir.exists(cachedir)) { dir.create(cachedir, recursive = TRUE) }
if (!file.exists(rawfile)) { download.file(f, rawfile) }
X <-readXICs(rawfile, masses=mZ)

## End(Not run)


(rawfile <- file.path(path.package(package = 'rawDiag'), 'extdata', 'sample.raw'))
RAW <- read.raw(rawfile)

# not meaning full but proof-of-concept
X <- readXICs(rawfile, masses=unique(RAW$PrecursorMass), tol=1000)
plot.XIC(X)


protViz/rawDiag documentation built on March 27, 2024, 10:28 p.m.