Calculate isotopic probabilities (intensity).
get_observed_iso_dist(HDmatrix, isotopic_distribution, maxD)
simulated matrix after hydrogen-deuterium-exchange
vector of isotopic probabilities of a peptide
length of the sequence - amount of prolines
a vector of observed isotopic distribution (observed_dist
) and
the observed peaks for mass spectrum (observed isotopic probabilities).
The exchangeable-hydrogen distribution describing the increase of
the mass is obtained from the exchange matrix from
get_HD_matrices
or
get_HD_matrices_using_markov
and the number of
exchangeable hydrogens n_exchangeable
. First, the numbers of hydrogens
exchanged in each molecule are calculated as sums of rows of the exchange
matrix. Next, a vector of the counts is built and stored in a vector of
length n_exchangeable
plus one (for the lack of exchange). To obtain
fractions counts are averaged.
The isotopic probabilities for the deuterated peptide are computed as the
convolution of obtained distribution and the isotopic distribution for the
undeuterated peptide (isotopic_distribution
) as it is a sum of those
variables (Claesen and Burzykowski 2017, Deconvolution-Based Approach).
Namely
$$M_delta = M_{mol} - M_{mon}$$
where M_mol
is the random variable describing molecular mass,
M_mon
is the random variable describing monoisotopic mass and
M_delta
is the random variable describing the increase in mass.