custom calculation on several specific compounds

Hi,

Just need a reminder on formulating custom calculation (Chemstation ver.C.01)  as I haven't worked on it for years and feel something is missing from my memory.  I have got several LC peaks with specific compound names, eg. A, B, C and D, and I need to build calculations arounds these peaks. Eg. to get ratios of (C+D)/(A+B) in different batches.  How do I refer these specific compound peaks in a table to do the calculation?

Many thanks for anyone's help.

Parents
  • I work in CDS so it may be slightly different, but from videos online it looks pretty similar so I'll tell you how I would go about it. I will use curly brackets {} for when the text I put should be modified or replaced.

    1. Make 4 different text fields (one for each compound).
    2. Put a group around each individually
    3. Set the group repeat =1
    4. Filter by Compound_Name = {the compound name}
    5. Group all four groups into a larger group
    6. Make this group invisible (on the group repeat options tab)
    7. Repeat by Injection_ID
    8. Filter out sample types you don't want (such as blanks). Refer to sample_type enumeration list for the values here.
    9. In the formula of each text field, set it equal to =Peak_Area
    10. Save as a Custom Calculation Variable Named {compound name}Area and unique key = Injection_ID
    11. Make your table with any raw statistics you want (such as Sample_Name, Sample Description, etc). I would recommend using one of the defaults that starts out displaying statistics about each injection so you don't have to mess with any filtering, repeating, or sorting properties.
    12. Make a new column at the end with custom calculation.
    13. Make the formula of the custom calculation =({compound name C}Area(Injection_ID)+{compound name D}Area(Injection_ID))/({compound name A}Area(Injection_ID)+{compound name B}Area(Injection_ID))

    This should give you a table with the wanted ratio calculated for individual injections. If you want to do average, then I would recommend doing this outside of a table since the average of the ratios may not necessarily be equal to the ratio of the averages and the table will only give you the first with the preset aggregates. If you want to do the second, simply remove the grouping by injection ID around the 4 groups, make each one invisible, and change the formula to be =Avg(Peak_Area) instead, then do the final ratio calculation with the same formula as recommended for the table but in its own text field. If you have multiple batches in one run, then you will need to group the four again but determine some criteria that separates them (such as batch number, if you have that as a custom field in the project), then do the same calculation, but repeat on batch number.

    Hope this helps,

    Cole

  • Hi Cole, many thanks for your swift response, I will give it a go and see if I can make it working again on my end..

Reply Children
Was this helpful?