Skip to contents

mzML mass spectrometry data container with some useful methods.

Details

Provides our own container for mzML data, and does conversion to frequency, filtering scans, choosing a single frequency regression model, and generating the frequency data for use in the peak characterization.

Public fields

mzml_metadata

metadata from an external json file

mzml_data

the actual mzml data from MSnbase

mzml_df_data

a list of data.frames of the data

scan_range

the range of scans to be used

rtime_range

the range of retention times to keep

mz_range

the mz range to use

scan_info

data.frame of scan information

remove_zero

should zero intensity data points be removed?

frequency_fit_description

the model for m/z -> frequency

mz_fit_description

the model for going from frequency -> m/z

frequency_coefficients

the coefficients for the frequency model

mz_coefficients

the coefficients for the m/z model

difference_range

how wide to consider adjacent frequency points as good

filter_remove_outlier_scans

the function to remove scans that shouldn't be used as well as outliers

choose_single_frequency_model

function to choose a single frequency model

Methods


Method extract_mzml_data()

get the mzml data into data.frame form so we can use it

Usage

SCMzml$extract_mzml_data(remove_zero = self$remove_zero)

Arguments

remove_zero

whether to remove zero intensity points or not


Method predict_frequency()

predict frequency and generate some summary information. This does regression of frequency ~ m/z for each scan separately.

Usage

SCMzml$predict_frequency(
  frequency_fit_description = self$frequency_fit_description,
  mz_fit_description = self$mz_fit_description
)

Arguments

frequency_fit_description

the regression model definition

mz_fit_description

the regression model definition


Method convert_to_frequency()

actually do the conversion of m/z to frequency

Usage

SCMzml$convert_to_frequency()


Method check_frequency_model()

check how well a given frequency model works for this data

Usage

SCMzml$check_frequency_model(scan = 1, as_list = FALSE)

Arguments

scan

which scan to show predictions for

as_list

whether plots should be returned as a single plot or a list of plots


Method get_instrument()

get instrument data from associated mzml file metadata

Usage

SCMzml$get_instrument()


Method get_frequency_data()

get the frequency data to go into the next steps of analysis.

Usage

SCMzml$get_frequency_data()


Method new()

Usage

SCMzml$new(
  mzml_file,
  frequency_fit_description = c(a.freq = 0, x.freq = -1, y.freq = -1/2, z.freq = -1/3),
  mz_fit_description = c(a.mz = 0, x.mz = -1, y.mz = -2, z.mz = -3),
  metadata_file = NULL,
  scan_range = NULL,
  rtime_range = NULL,
  mz_range = NULL,
  remove_zero = FALSE,
  filter_remove_outlier_scans = NULL,
  choose_single_frequency_model = NULL
)

Arguments

mzml_file

the file to load and use

frequency_fit_description

a description of the regression model for frequency ~ m/z

mz_fit_description

a description of the regression model for m/z ~ frequency

metadata_file

a metadata file generated by ...

scan_range

which scans can be used for analysis

rtime_range

the retention time to use for scans

mz_range

what m/z range to use

remove_zero

should zero intensity data be removed?

filter_remove_outlier_scans

the function to use to filter scans

choose_single_frequency_model

the function to use to choose single frequency regression model


Method clone()

The objects of this class are cloneable with this method.

Usage

SCMzml$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

if (FALSE) {
  lipid_sample = system.file("extdata", "lipid_example.mzML",
  package = "ScanCentricPeakCharacterization")
}