man/openMSfile.Rd
60c84217
 \name{openMSfile}
 \alias{openMSfile}
 \alias{isInitialized}
 \alias{fileName}
8e42dc25
 \alias{openIDfile}
60c84217
 
 \title{
   Create and check mzR objects from netCDF, mzXML, mzData or mzML files.
 }
 \usage{
75d74a65
  openMSfile(filename, backend = NULL, verbose = FALSE)
60c84217
 
  isInitialized(object)
 
0af5d7d6
  fileName(object, ...)
8e42dc25
  
  openIDfile(filename, verbose = FALSE)
60c84217
 }
 \arguments{
75d74a65
   \item{filename}{
     Path name of the netCDF, mzData, mzXML or mzML file to
     read/write.
   }
   \item{backend}{
     A \code{character(1)} specifiying which backend API to
e3f79ff5
     use. Currently 'netCDF'  and 'pwiz' are supported. If
75d74a65
     \code{backend = NULL} (the default), the function tries to determine
     the backend to be used based on either the file extension of the
     file content.
   }
60c84217
   \item{object}{ An instantiated mzR object. }
   \item{verbose}{ Enable verbose output. }
0af5d7d6
   \item{...}{ Additional arguments, currently ignored. }
60c84217
 }
 
 \description{
   The \code{openMSfile} constructor will create a new format-specifc
   \code{mzR} object, open 'filename' file and all header information is
e3f79ff5
   loaded as a Rcpp module and made accessible through the \code{pwiz}
8e42dc25
   slot of the resulting object.
   
   The \code{openIDfile} constructor will create a new format-specifc
   \code{mzR} object, open 'filename' file and all information is
6361383c
   loaded as a Rcpp module. The mzid format is supported throught
   \code{pwiz} backend. Only mzIdentML 1.1 is supported.
60c84217
 
 }
 
 \author{
2ea52d2a
   Steffen Neumann, Laurent Gatto, Qiang Kou
60c84217
 }
 
 \examples{
  library(msdata)
  filepath <- system.file("microtofq", package = "msdata")
  file <- list.files(filepath, pattern="MM14.mzML",
8e42dc25
                      full.names=TRUE, recursive = TRUE)
  mz <- openMSfile(file)
  fileName(mz)
  runInfo(mz)
  close(mz)
 
e2e288e8
  \dontrun{
     ## to use another backend
     mz <- openMSfile(file, backend = "pwiz")
     mz
   }
8e42dc25
   
   file <- system.file("mzid", "Tandem.mzid.gz", package="msdata")
   mzid <- openIDfile(file)
   softwareInfo(mzid)
   enzymes(mzid)
60c84217
 }