Compound_CalibAmount in report

Hello

I have a processing method where there is some calibration amount entered for a compound. When I am processing a sequence where there are no standards, only QC checks, I cannot get the Compound_CalibAmount values from the processing method and use it in reporting. Is there a way?

Thank you

Martin

Parents
  • Hi Martin,

     

    The Compound_CalibAmount function could only be called out if the processing data file is defined as "Calibration" in the sequence. I am not sure which calculations you are trying to perform that need those calibration amounts as most of the time you would just need to use the compound_responsefactor instead. Perhaps you could elaborate your calculation.

     

    In case you really need the calibration amount, and depending on which version you are using, you could do this:

     

    1. For C.01.08 and below: you can store these amount in compound custom fields or report parameters.

    2. For C.01.09 and above: it would be more convenient to store the amounts in an external file like txt and use some VB codes to import the values.

    3. For CDS2.x you could simply create a constant file.

     

    Hope this helps. 

     

    Peter.

  • Hello petertran,

    thank you for your reply. in that case there is probably a way to calculate recovery of standard checks? say i have a sequence with only samples and QC checks. calibration is stored in the processing method. I want to show in report simple % value of the QC check with respect to the corresponding calibration amount.

    thank you

    martin 

  • Hi Martin,

     

    Is your calibration table having multiple levels or only one level ? And is your QC the same as one of the levels in your calibration table ? Also which software revision are you using ?

     

    Peter.

  • Hello

    multiple levels, QC is one of the standards. 

    OpenLab Data Analysis - Build 2.205.0.1344 version 2.5

  • Hi Martin Adams,

     

    That's helpful. Thanks for the custom formulas. However I can't find any official documents discussing about the classes you are using in the formula. Would you please suggest one ? Without understanding the whole formula it would be hard for us as users to modify or create new formula for our needs.

     

    Hi Martin,

     

    Back to your original question since the QC is one of the calibration levels, an alternative to Adam's suggestion would be to change the QC run from "Quality Control" to "Calibration" in the sequence and select the appropriate level (no update to RT and RF). That way you should be able to use compound_calibamount function for any of your calculations.

     

    Peter.

  • Thanks Martin, it's very useful.

     

    Peter.

  • Hello,

     

    The following custom calculations would work as long as you run the standards with the sample in the same sequence. They are 2 typical calculations for check standards. The level number can be changed to the level your QC check corresponds to in the original standard. If you do not run you standards with the sample or the QC check is a unique concentration level the I would use a constants file as Peter suggests. 

     

    Marty Adams

     

    Compound_Amount / CurrentSequence.AllIdentifiedPeaks.Where(function(x) x.Compound_Name = CurrentPeakOrGroup.Compound_Name).Where(function (x) x.injection.Sample.Sample_CalibrationLevel = 2).Select(function(x) x.Compound_CalibrationAmount).Average * 100

     

    Abs(Compound_Amount - CurrentSequence.AllIdentifiedPeaks.Where(function(x) x.Compound_Name = CurrentPeakOrGroup.Compound_Name).Where(function (x) x.injection.Sample.Sample_CalibrationLevel = 2).Select(function(x) x.Compound_CalibrationAmount).Average) / CurrentSequence.AllIdentifiedPeaks.Where(function(x) x.Compound_Name = CurrentPeakOrGroup.Compound_Name).Where(function (x) x.injection.Sample.Sample_CalibrationLevel = 2).Select(function(x) x.Compound_CalibrationAmount).Average * 100

     

     

     

  • Peter,

     

    Using a calibration run type with no update is useful in Chemstation but unfortunately there is no equivalent in CDS 2.x. I think in the previous update Martin responded his version was OpenLab Data Analysis - Build 2.205.0.1344 version 2.5.

     

     

    The best resource currently is the OpenLab 2.5 help. Also on the install media for CDS 2.x, in the UCL folder you can find example CCFs (M8490-0001\Setup\Tools\Support\UCL\CustomCalculatorExamples).There was user guide in earlier versions of CDS 2.x but it focused on the built-in functions which were limited in use. The current focus on is using LINQ to create expressions for CC formulas. 

    LINQ

    The custom calculation formula language is based on VB and can be extended with LINQ. You can at any time write your formula in LINQ if you are not able to perform your calculations with the pre-defined functions.

    Below is a list of some useful LINQ expressions. This is not exhaustive. Please refer to Microsoft Visual basic LINQ documentation for more details.

    Recommended links:

    Filter

    The principle of filters is to filter a given list of items according to a predicate. To apply filter, you need:

    • a list to filter

    • a predicate (function taking a list item and returning a boolean)

    The result is a new list with some of the items of input list.

    The number of items in the new list is smaller than in the input list.

    Syntax:

    • InputList.Where(Function(x) predicate)

    • Where: to call the filter

    • Function: to write the predicate

    Example:

    CurrentSignal.AllPeaks.Where(Function(p) p.Peak_Area>1.2 and p.Peak_Height<1000) returns a list of peaks with an area greater than 1.2 and height lower than 1000.

    You can use this list in a formula to do the sum of the areas of all peaks in the list:

    Sum("Peak_Area", CurrentSignal.AllPeaks.Where(Function(p) p.Peak_Area>1.2 And p.Peak_Height<1000))

    Projection

    The principle of projection is to create a list from a given list of items by transforming every item. To apply projection, you need:

    • A list to transform

    • A projection function (function taking a list item and returning a new item)

    The result is a new list of same length as input list. Item types can be different!

    Syntax:

    • InputList.Select(Function(x) projection)

    • Select: to call the transformation

    • Function: to write the projection function

    Example:

    CurrentSignal.AllPeaks.Select(Function(p) p.Peak_Area) returns a list of Peak_Area values from a list of peaks.

    You can then do the sum: CurrentSignal.AllPeaks.Select(Function(p) p.Peak_Area).Sum()

    Note that this is equivalent to the predefined Custom Calculation function Sum(“Peak_Area”, CurrentSignal.AllPeaks).

    Aggregate

    The principle of aggregate is to compute a single value from a list. To apply aggregation, you need:

    • InputList.Select(Function(x) projection)

    • A list to aggregate

    • An accumulation function (function taking aggregate and current item)

    • An initial value for aggregate

    The result is a unique aggregated value. The type of aggregated value can be different from item type.

    Syntax:

    • InputList.Aggregate(initial value,Function(acc,x) accumulation)

    • Aggregate: to call the aggregation

    • Function: to write the accumulation function

    Examples:

    (CurrentSignal.AllPeaks.Select(Function(p) p.Peak_Area)).Aggregate("", Function(acc,x) acc+" ; "&x) returns the list of all peaks area separated with a " ; ".

    Note that this is equivalent to a VB function: string.join(" ; " ,CurrentSignal.AllPeaks.Select(Function(p) p.Peak_Area)).

     

    (CurrentSignal.AllPeaks.Select(Function(p) p.Peak_Area)).Aggregate(0.0, Function(acc,x) acc+x) returns the sum of the peak areas.

    Note that it is equivalent to the predefined Custom Calculation function Sum("Peak_Area", CurrentSignal.AllPeaks).

     

     

    .  

  • thank you, that is very useful. 

    however, none of the answers can really be used in practice for my problem. Creating some external file with a constant value and importing it during reporting is simply out of question for a routine lab usage. the other solutions rely on running calibration together with the samples. in which case the calculation is not difficult, just pulling the calibration amount values. 

    I guess i expected something like QC and Cal accuracy or recovery values being available as builtins somehow. as they are in other DA programs.

    Thank you for your efforts though.

  • Hello,

     

    Typically for methods using a QC check standard at unique concentrations from a current calibration level, I would assign a static value in a constants file for the compounds.  I would then design the SOP to produce the QC standard at that level with tolerances inside the error windows of the method as a whole. If that is not possible and you are changing the QC standard values each time you remake the standard or more frequently then I would use compound custom fields. Custom fields are created at the project level. Compound custom fields can be entered during sequence generation or in data analysis. They can be used in CC or IR to do calculations where you need individual custom values for each compound.  

     

    Marty Adams

     

Reply Children
No Data
Was this helpful?