UpdateRawfiles: UpdateRawfiles

View source: R/Spectra_import.R

UpdateRawfilesR Documentation

UpdateRawfiles

Description

Update the Raw spectra included for Processing. All wrong format and uncentroided files will be filtered. NOTE: this function is only effective before data import stage AND can NOT be used for resuming pipeline.

Usage

UpdateRawfiles(mSet = NULL, filesIncluded = NULL)

Arguments

mSet

mSet objects generated with \"mSet <- InitDataObjects(\"spec\", \"raw\", FALSE)\", or omitted.

filesIncluded

filesIncluded is a vector containing the files' paths for the following processing;

Value

will return an mSet object with raw files updated

Author(s)

Zhiqiang Pang zhiqiang.pang@mail.mcgill.ca and Jeff Xia jeff.xia@mcgill.ca McGill University, Canada License: GNU GPL (>= 2)

Examples

### Example 1 ---
data(mSet)
newfiles <- dir(system.file("mzData", package = "mtbls2"), 
full.names = TRUE, recursive = TRUE)[c(14:16)]
mSet <- UpdateRawfiles(mSet, filesIncluded = newfiles)
 
### Example 2 ---
## load googledrive package to download example data
# library("googledrive");
# data_folder_Sample <- "Raw_data_example"
# temp <- tempfile(fileext = ".zip");
## Please authorize the package to download the data from web
# dl <- drive_download(as_id("1CjEPed1WZrwd5T3Ovuic1KVF-Uz13NjO"), path = temp, overwrite = TRUE);
# out <- unzip(temp, exdir = data_folder_Sample);
# out;
# mSet<-InitDataObjects("spec", "raw", FALSE);
## include only two samples CD_SM-77FXR.mzML and CD_SM-6KUCT.mzML for data import.
# mSet<-UpdateRawfiles(mSet, c("Raw_data_example/CD/CD_SM-77FXR.mzML", 
#                      "Raw_data_example/CD/CD_SM-6KUCT.mzML"))

xia-lab/OptiLCMS documentation built on Nov. 26, 2024, 3:50 a.m.