create_experimental_file: Create experimental file

View source: R/create_experimental_file.R

create_experimental_fileR Documentation

Create experimental file

Description

This function generates replications of mass spectra that are consistent with common experimental data files

Usage

create_experimental_file(
  peptides,
  times = c(0.167, 1, 5, 25, 1440),
  charge,
  n_replicates = 3,
  mass_deviations = 50,
  intensity_deviations = NULL,
  file_type = "DynamX"
)

Arguments

peptides

a data frame of sequences (sequence), Protein, and Start, End and parameters except times that can be used for simulating mass spectra. See simulate_theoretical_spectra for more details about the additional parameters.

times

a vector of times at which deuteration levels will be measured (seconds)

charge

vector of charges of the peptide ion. If NULL, one value is sampled from vector 2:6. Default NULL.

n_replicates

number of technical replicates to create

mass_deviations

mass deviation in parts per million. Either a single number (then the error at each time point will be the same) or a vector of the same length as number of unique time points in the experiment. The error will be sampled from normal distribution with standard deviation equal to

mass_deviations * undeuterated_mass/1e6

Default to 50.

intensity_deviations

optional, standard deviations of random noise that will be added to intensities. Either a single number (then the error at each time point will be the same) or a vector of the same length as number of unique time points in the experiment. The error will be sampled from normal distribution with these standard deviations.Default NULL.

file_type

the type of file. Default to "DynamX".

Value

data table. The table of HDX-MS results consistent with 'file_type' format.

Examples

peptides <- data.frame(sequence = c("FPTTKTY", "LVRKDLQN"),
                       protection_factor = c(10, 100))
create_experimental_file(peptides, charge = 1:3)


powerHaDeX documentation built on March 18, 2022, 7:40 p.m.