IsotopeCorrection

Documentation for IsotopeCorrection.

IsotopeCorrection.CM_convMethod
CM_conv(
    formula::String,
    label::String,
    isotopes::Dict,
    tracer_purity::Float64
) -> Matrix{Float64}

Outputs the correction matrix constructed by iterative convolution of the correction vector for each column.

Arguments

  • formula: full chemical formula of the fragment to be corrected e.g. "C3H3O3LabC3" (or "C3H3O3" in conjunction with label)
  • label: labeled element and amount e.g. "C3", can be ignored if the formula contains LabC
  • isotopes: dictionary containing the natural isotope abundances of elements, default is isotope_NAs
  • tracer_purity::Float64: purity of the tracer, default is 1.0 (corresponding to 100%)
source
IsotopeCorrection.calculate_MDVMethod
calculate_MDV(
    formula::String,
    label::String,
    isotopes::Dict
) -> Tuple{Vector{Float64}, Int64}

Outputs a tuple containing two elements:

  • The mass distribution vector (MDV) of a fragment, calculated by convolving the vectors of natural isotope abundances n times for each element with n atoms.
  • The number of possible isotopologues (which is equal to the number of possibly labeled carbon atoms + 1).

Arguments

  • formula: full chemical formula of the fragment to be corrected e.g. "C3H3O3LabC3" (or "C3H3O3" in conjunction with label)
  • label: labeled element and amount e.g. "C3", can be ignored if the formula contains LabC
  • isotopes: dictionary containing the natural isotope abundances of elements, default is isotope_NAs
source
IsotopeCorrection.fragmentMethod
fragment(
    formula::String,
    label::String
) -> Tuple{Dict{SubString{String}, Int64}, Int64}

Outputs a tuple containing two elements:

  • A dictionary of all elements in the fragment and their respective amounts.
  • The number of possible isotopologues (which is equal to the number of possibly labeled carbon atoms + 1).

Arguments

  • formula::String: full chemical formula of the fragment to be corrected e.g. "C3H3O3LabC3" (or "C3H3O3" in conjunction with label)
  • label::String: labeled element and amount e.g. "C3", can be ignored if the formula contains LabC
source
IsotopeCorrection.isotope_correctionMethod
isotope_correction(
    response::Vector,
    formula::String;
    label,
    isotopes,
    tracer_purity,
    optimization
) -> Union{Tuple{Any, Any, Any}, NTuple{4, Any}}

Outputs the corrected response measurements, mass isotopomer distribution (MID) and mean enrichment of a fragment. Additionally outputs the residuum when using L-BFGS-B for optimization. Only to be used with low resolution GC-/LCMS data.

Arguments

  • response::Vector: the response / measurement vector obtained from LC-/GCMS, must have the length n+1 if n is equal to the amount of possibly labeled atoms in the fragment
  • formula::String: chemical formula of the fragment to be corrected.
  • label::String = "": labeled element and amount e.g. "C3", can be ignored if the formula contains LabC
  • isotopes::Dict = isotope_NAs: dictionary containing the natural isotope abundances of elements
  • tracer_purity::Number = 1.0: purity of the tracer, the default represents 100%.
  • optimization::Bool = true: whether to use the L-BFGS-B optimization algorithm.

Examples

julia> response_vec = [3500000, 1000000, 3500000, 800000]
julia> pyruvate = "C3H3O3"
julia> pyruvate_label = "C3"
julia> corr_response, corr_MID, mean_enrichment, residuum = isotope_correction(response_vec, 
                                                                               pyruvate; 
                                                                               label = pyruvate_label)
([3.6336363843460013e6, 844166.0884382844, 3.5694537799896887e6, 780365.311750165], 
[0.4116212229745574, 0.09562780668246623, 0.4043505664463884, 0.08840040389658813], 
0.5423825378162519, 
[-1.0054050521417098e-15, -2.645802768793973e-16, -8.466568860140713e-16, -1.852061938155781e-16])

julia> pyruvate = "C3H3O3LabC3"
julia> corr_response, corr_MID, mean_enrichment, residuum = isotope_correction(response_vec, 
                                                                               pyruvate; 
                                                                               tracer_purity = 0.99)
([3.6336363843460013e6, 844166.0884382844, 3.5694537799896887e6, 780365.311750165], 
[0.4116212229745574, 0.09562780668246623, 0.4043505664463884, 0.08840040389658813], 
0.5423825378162519, 
[-1.0054050521417098e-15, -2.645802768793973e-16, -8.466568860140713e-16, -1.852061938155781e-16])
source