openlab cds 2.5 custom calculation formulas

Hello,

Have you ever encountered a problem with the injection result of a CC:

I have encountered this problem with the result display for the CCs: "PATeneurUT5" and "PATeneurUT10" .I have encountered this problem for the CC's: "PATeneurUT5" and "PATeneurUT10" which once did not display. and after

closing the resultset and reopening it followed by a process, the values were displayed.

Are these formulas written correctly?

  

CC : PATeneurUT5first : currentinjection.AllPeaksAndGroupsByName("PA").where(function(x) x.Injection.Sample.sample_name like "*UT5*").Where(function (x) x.Compound_AMOUNT = CurrentPeakOrGroup.Compound_AMOUNT).select(function (x) x.Compound_AMOUNT/500). first()

CC : PATeneurUT5MoyenneAverage : CurrentSequence.AllPeaksAndGroupsbyname("PA").Where(function (x) x.Injection.Sample.Sample_Type = 3) .Where(function (x) x.Injection.GetStringCC("Nomslots") = CurrentInjection.GetStringCC("Nomslots")).Where(function (x) x.Compound_Name = CurrentPeakOrGroup.Compound_Name).Select(function(x) x.GetDoubleCC("PATeneurUT5")) .Average()

  

CC : PATeneurUT10first : currentinjection.AllPeaksAndGroupsByName("PA").where(function(x) x.Injection.Sample.sample_name like "*UT10*").Where(function (x) x.Compound_AMOUNT = CurrentPeakOrGroup.Compound_AMOUNT).select(function (x) x.Compound_AMOUNT/1000). first()

 

CC : PATeneurUT10Average : CurrentSequence.AllPeaksAndGroupsbyname("PA").Where(function (x) x.Injection.Sample.Sample_Type = 3) .Where(function (x) x.Injection.GetStringCC("Nomslots") = CurrentInjection.GetStringCC("Nomslots")).Where(function (x) x.Compound_Name = CurrentPeakOrGroup.Compound_Name).Select(function(x) x.GetDoubleCC("PATeneurUT10")) .Average()

 

CC : PATeneurUT : if(CurrentInjection.sample.sample_name like ("*UT5*"),PATeneurUT5,if(CurrentInjection.sample.sample_name like ("*UT10*"),PATeneurUT10,if(CurrentInjection.sample.sample_name like ("*UT25*"),PATeneurUT25,"")))

cc: Nomslots : CStr(Split ( sample_name, "-" )( 0 ))

Example sample name :

lot1 UT5-D1:PATeneurUT5     PATeneur UT5Average: AVERAGE(lot1 UT5)

lot1 UT5-D2:PATeneurUT5

lot2 UT5-D1:PATeneurUT5   PATeneur UT5Average:AVERAGE(lot2 UT5)

lot2 UT5-D2:PATeneurUT5

 

lot1 UT10-D1; PATeneurUT10    PATeneur UT10Average :AVERAGE(lot1 UT10)

lot1 UT10-D2: PATeneurUT10

lot2 UT10-D1: PATeneurUT10  PATeneur UT10Average:(Average(lot2UT10 )

lot2 UT10-D2: PATeneurUT10

Thank you for your advice and help

SYB

Parents
  • Hello,

    Just at a glance they look to be okay at least by syntax depending on the scope of each CC. I am not sure exactly what you are trying to do without full context as the filters and the main definition seem to be redundant CurrentSequence.AllPeaksAndGroupsbyname("PA"). I would note you need to use reprocess all when doing CCs and also the CC must be included in all methods in the sequence. This means if you change processing methods for any injection in the sequence you must have the same CCF file linked or imbedded. 

    Marty Adams

Reply
  • Hello,

    Just at a glance they look to be okay at least by syntax depending on the scope of each CC. I am not sure exactly what you are trying to do without full context as the filters and the main definition seem to be redundant CurrentSequence.AllPeaksAndGroupsbyname("PA"). I would note you need to use reprocess all when doing CCs and also the CC must be included in all methods in the sequence. This means if you change processing methods for any injection in the sequence you must have the same CCF file linked or imbedded. 

    Marty Adams

Children
  • Thank you for your reply,
    In each process, I apply the ccfile on all the injections.

    What simplification would you bring, to avoid redundancy?


    It is the value of "PATeneurmoyenneUT", which is not always reported. It is the value of "PATeneurmoyenneUT", which is not always reported: perhaps it is at the level of the report that I make a mistake.
    I put a single field "=CCR(First(Compound_CustomCalculationResults), "PATeneurmoyenneUT") in a group composed of a table and this single field repeated on "Nomlot" .
    Is my report wrong?

    If not what I wanted to do:
    -If the sample name contains ut5 I divide compound amount by 500, if the sample name contains ut10 I divide by 1000.

    -Then I do the average for the samples that have the same "Nomlot" and that contain UT5. Same thing for UT10;

    With the cc "PATeneurmoyenneUT", for each "Nomlot", I would like to obtain in my report the average of the contents with a singlefield (Result to 2 decimal places for UT5, and 1 decimal place for UT10).

    Maybe it is possible with a table that repeats for each "Nomlot", and depending on whether it contains UT5 or UT10 to have the average with 2 or 1 decimal place?

    Thank you for your advice and help

    syb

  • Hello,

    Due to the age of this forum post I’ve marked this as resolved.  If you are able to please reply to this thread and let us know how the problem was solved. 

    Thanks!

Was this helpful?