SCCharacterizePeaks | R Documentation |
Peak characterization control
Peak characterization associates data with the SCZip
,
SCPeakRegionFinder
, and controls their execution.
found_peaks
peaks found by a function
id
a holder for the ID of the sample
frequency_fit_description
the model for conversion to frequency
mz_fit_description
the model for converting back to m/z
calculate_peak_area
whether to calculate peak area or not
sc_peak_region_finder
the peak finder object
sc_zip
the SCZip
that represents the final file
in_file
the input file
metadata_file
the metadata file
out_file
where everything gets saved
temp_loc
where intermediates get saved
load_file()
Loads the mzml data into the SCZip
SCCharacterizePeaks$load_file()
filter_scans()
Filter the scans in data.
SCCharacterizePeaks$filter_scans()
choose_frequency_model()
Choose the single frequency model.
SCCharacterizePeaks$choose_frequency_model()
prepare_mzml_data()
Prepare the mzml data.
SCCharacterizePeaks$prepare_mzml_data()
set_frequency_fit_description()
Set the frequency fit description
SCCharacterizePeaks$set_frequency_fit_description(frequency_fit_description)
frequency_fit_description
the frequency model description
set_mz_fit_description()
Set the mz fit description
SCCharacterizePeaks$set_mz_fit_description(mz_fit_description)
mz_fit_description
the m/z model description
generate_filter_scan_function()
Sets the scan filtering and check for outlier function.
SCCharacterizePeaks$generate_filter_scan_function( rtime = NA, y.freq = NA, f_function = NULL )
rtime
retention time limits of scans to keep
y.freq
y-frequency coefficient limits of scans to keep (NA)
f_function
a full function to set as the filtering function
generate_choose_frequency_model_function()
Sets the function for choosing a single frequency model
SCCharacterizePeaks$generate_choose_frequency_model_function(f_function = NULL)
f_function
the function for choosing a single model
predict_frequency()
Run frequency prediction
SCCharacterizePeaks$predict_frequency()
check_frequency_model()
Check the frequency model
SCCharacterizePeaks$check_frequency_model()
get_frequency_data()
Get the frequency data from the SCMzml
bits
SCCharacterizePeaks$get_frequency_data()
scan_info()
Get the SCMzml$scan_info
out
SCCharacterizePeaks$scan_info()
find_peaks()
Do the peak characterization without saving
SCCharacterizePeaks$find_peaks(stop_after_initial_detection = FALSE)
stop_after_initial_detection
should it stop after the initial peak finding
summarize()
Generates the JSON output summary.
SCCharacterizePeaks$summarize()
save_peaks()
Saves the peaks and JSON to the temp file
SCCharacterizePeaks$save_peaks()
write_zip()
Write the zip file
SCCharacterizePeaks$write_zip()
run_all()
Runs all of the pieces for peak characterization in order
SCCharacterizePeaks$run_all( filter_scan_function = NULL, choose_frequency_model_function = NULL )
filter_scan_function
the scan filtering function
choose_frequency_model_function
the function for choosing a frequency model
prep_data()
Loads and preps the data for characterization
SCCharacterizePeaks$prep_data()
add_regions()
Adds initial regions for finding real peak containing regions
SCCharacterizePeaks$add_regions()
run_splitting()
Does initial region splitting and peak finding in scans
SCCharacterizePeaks$run_splitting()
new()
Creates a new SCCharacterizePeaks
class
SCCharacterizePeaks$new( in_file, metadata_file = NULL, out_file = NULL, temp_loc = tempfile("scpcms"), frequency_fit_description = NULL, mz_fit_description = NULL, filter_remove_outlier_scans = NULL, choose_single_frequency_model = NULL, sc_peak_region_finder = NULL, calculate_peak_area = FALSE )
in_file
the mass spec data file to use (required)
metadata_file
a json metadata file (optional)
out_file
where to save the final zip container
temp_loc
a specified temporary location
frequency_fit_description
mz -> frequency model
mz_fit_description
frequency -> mz model
filter_remove_outlier_scans
function for scan filtering
choose_single_frequency_model
function to choose a single frequency model
sc_peak_region_finder
a blank SCPeakRegionFinder
to use instead of the default
calculate_peak_area
should peak areas be returned as well as height?
clone()
The objects of this class are cloneable with this method.
SCCharacterizePeaks$clone(deep = FALSE)
deep
Whether to make a deep clone.
## Not run:
lipid_sample = system.file("extdata",
"lipid_example.mzML",
package = "ScanCentricPeakCharacterization")
sc_char = SCCharacterizePeaks$new(lipid_sample)
# prep data and check model
library(ggplot2)
library(patchwork)
sc_char$load_file()
sc_char$generate_filter_scan_function()
sc_char$generate_choose_frequency_model_function()
sc_char$prepare_mzml_data()
sc_char$check_frequency_model()
# run characterization
save_loc = "test.zip"
sc_char = SCCharacterizePeaks$new(lipid_sample,
out_file = save_loc)
sc_char$run_all()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.