Skip to contents

Represents the zip mass spec file

Represents the zip mass spec file

Details

This reference class represents the zip mass spec file. It does this by providing objects for the zip file, the metadata, as well as various bits underneath such as the mzml data and peak lists, and their associated metadata. Although it is possible to work with the SCZip object directly, it is heavily recommended to use the SCCharacterizePeaks object for carrying out the various steps of an analysis, including peak finding.

Public fields

zip_file

the actual zip file

zip_metadata

the metadata about the zip file

metadata

the metadata itself

metadata_file

the metadata file

sc_mzml

the mzML data object.

peaks

??

sc_peak_region_finder

the peak finder object

json_summary

jsonized summary of the peak characterization

id

the identifier of the sample

out_file

where to put the final file

temp_directory

where we keep everything until peak characterization is done

Methods


Method load_mzml()

Loads the mzML file

Usage

SCZip$load_mzml()


Method load_sc_peak_region_finder()

Loads the SCPeakRegionFinder object

Usage

SCZip$load_sc_peak_region_finder()


Method save_json()

Save the jsonized summary out to actual json files

Usage

SCZip$save_json()


Method save_sc_peak_region_finder()

Saves the SCPeakRegionFinder binary object

Usage

SCZip$save_sc_peak_region_finder()


Method load_peak_list()

loads just the peak list data-frame instead of peak region finder

Usage

SCZip$load_peak_list()


Method compare_mzml_corresponded_densities()

compare peak densities

Usage

SCZip$compare_mzml_corresponded_densities(
  mz_range = c(150, 1600),
  window = 1,
  delta = 0.1
)

Arguments

mz_range

the mz range to work over

window

the window size in m/z

delta

how much to move the window


Method new()

Create a new SCZip object.

Usage

SCZip$new(
  in_file,
  mzml_meta_file = NULL,
  out_file = NULL,
  load_mzml = TRUE,
  load_peak_list = TRUE,
  temp_loc = tempfile("zipms")
)

Arguments

in_file

the mzML file to load

mzml_meta_file

an optional metadata file

out_file

where to save the final file

load_mzml

should the mzML file actually be loaded into an SCMzml object?

load_peak_list

should the peak list be loaded if this is previously characterized?

temp_loc

where to make the temp file while working with the data


Method show_temp_dir()

Show the temp directory where everything is being worked with

Usage

SCZip$show_temp_dir()


Method write_zip()

Write the zip file

Usage

SCZip$write_zip(out_file = NULL)

Arguments

out_file

where to save the zip file


Method cleanup()

delete the temp directory

Usage

SCZip$cleanup()


Method finalize()

delete when things are done

Usage

SCZip$finalize()


Method add_peak_list()

Add peak list data to the temp directory

Usage

SCZip$add_peak_list(peak_list_data)

Arguments

peak_list_data

the peak list data


Method clone()

The objects of this class are cloneable with this method.

Usage

SCZip$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.