# Adaptive processing of LC-MS data

## Documentation for package ‘recetox.aplcms’ version 0.13.3

- DESCRIPTION file.

## Help Pages

adaptive.bin | Adaptive binning
adjust.time | Adjust retention time across spectra.
aggregate_by_rt | Aggregate the intensities and select median mz for features with identical rt.
augment_known_table | Add newly detected aligned features to a known features table.
clean_data_matrix | Replace NA values by zero, relocate 'sample_names' column to the very beginning and convert to a tibble
comb | Combines the output (i.e. metadata, intensity and RT) from different clusters to one respective tibble.
compute_boundaries | Compute bounds of area using given peak and mass valley points.
compute_clusters | Compute clusters of mz and rt and assign cluster id to individual features.
compute_clusters_simple | Compute clusters using simple grouping based on numeric thresholds.
compute_curr_rec_with_enough_peaks | Compute the rectangle around recovered features given that enough peaks are present.
compute_delta_rt | Compute custom smoothed h-method derivative of function.
compute_mass_density | Compute the density function of mz values.
compute_min_mz_tolerance | Compute minimum mz tolerance to use.
compute_mu_sc_std | Compute interpolated retention time, its standard deviation, and intensity values,.
compute_peaks_and_valleys | Compute peaks and valleys of density function.
compute_pks_vlys_rt | Compute peaks and valleys which have at least 'recover_min_count' peaks.
compute_rectangle | Compute rectangle around feature with 'aligned_feature_mz' and 'target_rt' for recovery.
compute_rt_tol_relative | Compute rt relative tolerance to use.
compute_target_times | Compute target times for regions of interest for recovery.
compute_uniq_grp | Computes unique groups
concatenate_feature_tables | Concatenate multiple feature lists and add the sample id (origin of feature) as additional column.
count_peaks | Count the number of peaks in all valleys
create_aligned_feature_table | Align peaks from spectra into a feature table.
create_features_from_cluster | Group the mz and RT for particular cluster.
create_intensity_row | Compute summed area for each sample
create_output | Create a list containing 3 tibbles: metadata, intensities and RTs.
create_rt_row | Compute median RT for each sample
duplicate.row.remove | Custom way of removing duplicate rows from a specifically formatted table.
enrich_table_by_known_features | Add entries from the known features table to the aligned table.
filter_based_on_density | Subset data within lower and upper bound from density estimation
find.match | Internal function: finding the best match between a set of detected features and a set of known features.
find.tol.time | An internal function that find elution time tolerance level.
find.turn.point | Find peaks and valleys of a curve.
find_mz_match | Compute matches between mz array and specific mass value with a tolerance.
find_mz_tolerance | An internal function that is not supposed to be directly accessed by the user. Find m/z tolerance level.
find_optima | Compute the kernel density estimation and find the peaks and valleys of a smooth curve.
get_custom_rt_tol | Compute custom chromatographic tolerance.
get_features_in_rt_range | Get peaks and valleys of smoothed rt values in range.
get_mzrange_bound_indices | Compute range of valley indices which are in mz_tol range around aligned_feature_mass.
get_rt_region_indices | Get indices where rt in 'features' is within 'rt_tol' of 'target_time'.
get_single_occurrence_mask | Get boolean mask for values that occur only once.
get_times_to_use | Get retention time values to use
hybrid | Runs features extraction in hybrid mode.
interpol.area | Interpolate missing intensities and calculate the area for a single EIC.
l2normalize | Normalize vector so that sum(vec) = 1
label_val_to_keep | This function labels the indices of values kept to perform further calculations
load.lcms | Loading LC/MS data.
load_data | Load data either from cache or load raw file and detect peaks.
load_file | Load raw data from file
match_peaks | Match peaks from sample table to already known peaks via similar m/z and rt.
merge_features_and_known_table | A wrapper function to join knowledge from aligned features and known table.
peak_characterize | Internal function: Updates the information of a feature for the known feature table.
predict_mz_break_indices | Predict the indices for the valley points with low mass density.
predict_smoothed_rt | Computes the smoothed retention times by using The Nadaraya-Watson kernel regression estimate function.
prof.to.features | Generate feature table from noise-removed LC/MS profile.
recover.weaker | Recover weak signals in some profiles that is not identified as a peak, but corresponds to identified peaks in other spectra.
refine_selection | Refine the selection based on mz and rt differences.
remove_noise | Filter noise and detect peaks from LC/MS data in CDF format
rm.ridge | Removing long ridges at the same m/z.
run_filter | Continuity index.
semi.sup | Semi-supervised feature detection
two.step.hybrid | Two step hybrid feature detection.
unsupervised | Runs features extraction in unsupervised mode.
validate_contents | Validates if the data is present in more than "min_occurence" of samples.