View source: R/noisy_spectra.R
get_noisy_deuteration_curves | R Documentation |
This function creates a list of lists of noisy deuteration curves based on theoretical spectra in order to imitate the data from the HDX experiments.
get_noisy_deuteration_curves( theoretical_spectra, compare_pairs = TRUE, reference = NA, n_replicates = 4, n_experiments = 100, mass_deviations = 50, intensity_deviations = NULL, per_run_deviations = NULL, relative = TRUE )
theoretical_spectra |
a data table or a list of data tables of
theoretical spectra created by the function
|
compare_pairs |
if FALSE, all groups (defined by the protection factor) will be considered jointly. If TRUE (default), each protection factor will be considered together with the protection factor given by the 'reference' parameter. |
reference |
protection factor that will be used for comparison to other
protection factors in. The function accepts either |
n_replicates |
number of technical replicates to create |
n_experiments |
number of replicates of an experiment for power calculation. |
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 |
per_run_deviations |
optional, standard deviations of random noise that
will be added to deuteration curves. 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 |
relative |
logical, if TRUE (default), each deuteration curve will start
at 0 (relative mass will be returned). Default |
a list (for paired states when compare_pairs
is TRUE
)
of lists (repetitions of experiment for power calculations) of data tables of
the variables:
- Sequence
- provided amino acid sequence
- Rep
- technical replication
- State
- provided protection factor (the theoretical - in practice
unknown - state of the protein)
- Exposure
- exposure time
- Mass
- mass or deuterium uptake when relative
is TRUE
.
- Charge
- charge
- Experimental_state
- the biological state (from the viewpoint of the
experimenter) provided in the case when compare_pairs
is TRUE
.
theo_spectra_pf_100 <- simulate_theoretical_spectra(sequence = "LVRKDLQN", charge = c(3, 5), protection_factor = 100, times = c(0.167, 5), pH = 7.5, temperature = 15, n_molecules = 500, time_step_const = 1, use_markov = TRUE) theo_spectra_pf_200 <- simulate_theoretical_spectra(sequence = "LVRKDLQN", charge = c(3, 5), protection_factor = 200, times = c(0.167, 5), pH = 7.5, temperature = 15, n_molecules = 500, time_step_const = 1, use_markov = TRUE) theo_spectra_two_states <- rbind(theo_spectra_pf_100, theo_spectra_pf_200) deut_curves_p_states <- get_noisy_deuteration_curves(theo_spectra_two_states, n_replicates = 4, n_experiments = 2, compare_pairs = TRUE, reference = "all")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.