SCMzml | R Documentation |
mzML mass spectrometry data container with some useful methods.
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.
mzml_file
the mzml file location
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
ms_level
which MS level will we be using from the mzml file?
memory_mode
how will the mzml data be worked with to start, inMemory or onDisk?
difference_range
how wide to consider adjacent frequency points as good
choose_frequency_model_function
where the added model selection function will live
filter_scan_function
where the added filter scan function will live.
choose_single_frequency_model
function to choose a single frequency model
import_mzml()
import the mzml file defined
SCMzml$import_mzml( mzml_file = self$mzml_file, ms_level = self$ms_level, memory_mode = self$memory_mode )
mzml_file
what file are we reading in?
ms_level
which ms level to import (default is 1)
memory_mode
use inMemory or onDisk mode
extract_mzml_data()
get the mzml data into data.frame form so we can use it
SCMzml$extract_mzml_data(remove_zero = self$remove_zero)
remove_zero
whether to remove zero intensity points or not
predict_frequency()
predict frequency and generate some summary information. This does regression of frequency ~ m/z for each scan separately.
SCMzml$predict_frequency( frequency_fit_description = self$frequency_fit_description, mz_fit_description = self$mz_fit_description )
frequency_fit_description
the regression model definition
mz_fit_description
the regression model definition
convert_to_frequency()
actually do the conversion of m/z to frequency
SCMzml$convert_to_frequency()
choose_frequency_model()
choose a frequency model using the previously added function
SCMzml$choose_frequency_model()
generate_choose_frequency_model_function()
generate a frequency model choosing function and attach it
SCMzml$generate_choose_frequency_model_function(f_function = NULL)
f_function
the function you want to pass in
Creates a new function that access the scan_info
slot of an SCMzml
object
after conversion to frequency space, and chooses a single model based on the information
there.
filter_scans()
filter the scans using the previously added function
SCMzml$filter_scans()
generate_filter_scan_function()
generate a filter function and attach it
SCMzml$generate_filter_scan_function( rtime = NA, y.freq = NA, f_function = NULL )
rtime
retention time limits of scans to keep (NA)
y.freq
y-frequency coefficient limits of scans to keep (NA)
f_function
a full function to set as the filtering function
Creates a new function that accesses the scan_info
slot of
an SCMzml
object, filters the scans by their retention-time and
y-frequency coefficients, tests for outliers in the y-frequency
coefficients, and denotes which scans will be kept for further
processing.
NA
means no filtering will be done, one-sided limits, eg. (NA, 10)
or (10, NA)
implies to filter <=
or >=
, respectively.
check_frequency_model()
check how well a given frequency model works for this data
SCMzml$check_frequency_model(scan = NULL, as_list = FALSE)
scan
which scan to show predictions for
as_list
whether plots should be returned as a single plot or a list of plots
get_instrument()
get instrument data from associated mzml file metadata
SCMzml$get_instrument()
get_frequency_data()
get the frequency data to go into the next steps of analysis.
SCMzml$get_frequency_data()
new()
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, ms_level = 1, memory_mode = "inMemory" )
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?
ms_level
what MS level should be extracted (default is 1)
memory_mode
what memory mode should MSnbase be using (inMemory or onDisk)
clone()
The objects of this class are cloneable with this method.
SCMzml$clone(deep = FALSE)
deep
Whether to make a deep clone.
choose_single_frequency_model_default()
## Not run:
lipid_sample = system.file("extdata", "lipid_example.mzML",
package = "ScanCentricPeakCharacterization")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.