Problem with summarizing custom fields incrementally for multiple batches in one sample set

I have encountered a big problem when trying to force empower to do calculations for separate sample groups in one sample set. My example sample set looks like this attached. I need to use summarize intersample functions for every group (like average assay, number of samples in a group etc. for further custom fields calculations). Every calculation works fine with the first group but for the next ones empower uses e.g., average assay for all samples above summarize incrementally function not only those between last "summarize custom fields incrementally" and next spotted.

I tried to use "label reference" field in "summarize custom fields incrementally row but I can only put full label name i.e. trying to type something like "U*" will prompt window that this label doesn't exist (while putting e.g., "U11" works fine). I could label all samples per group "A", "B", "C" etc. but I need for samples to be separately recognizable in summarize custom fields calculations.

I have made a research on this forum and on other sites but couldn't find a simple solution for this, as it might seem, simple problem.


Best Answers

  • Empower2018
    edited April 2019 Answer ✓
    Hi Empuser, the labels you are using for calibration and quantitation have nothing to do with what you are trying to achieve. From your first post you have set up the standards such that you inject standards first followed by samples which are quantified off those standards before the clear calibration wipes the curve and starts another one- no calibrate or quantitate lines required. A ? only replaces one character so values like A1 A4 Ay A0 can be referenced by A? but the * symbol references everything that follows so A10000999 or A677 can be referenced by A*.

    Assuming your Run Mode is Run Only,Write a peak, real custom field called Average_Assay, sample and peak type = all. Search Order = Result Set Only. Formula = SAME.%..AVE(Amount). I presume by assay you mean amount? Label each block of samples the same so the first 10 can all be A the second 10 can all be B etc. Insert Summarize Custom Fields as the last line of your sample set then process the sample set to generate a result set and you will get values for each block of samples. 

    Not sure I understand you when you say you want further calculations like count the number of samples per block? Why would you need that? Do you mean a further calculation like the average amount * 100 or similar?  
  • Empower2018
    edited April 2019 Answer ✓
    Hi Empuser, I don't think Neil Lander has covered anything about labels for calibration or quantitation etc. I have all his tips and that's not mentioned yet, but keep an eye out for it. 

    Im glad my formula worked for you. To answer your question about the % RSD selectively calculating for individual samples:

    If you leave the Label section of an intersample custom field (Label.Injection.Channel.Summary Function.Field) blank OR don't specify it as U01, U02 etc then Empower assumes the current line of the sample set/result set. When samples or sample sets are batch processed, either by selecting a block of injections/channels to process or by batch processing a sample set, the sample set is processed line by line, so Line 1 is processed before Line 2 and Line 2 is processed before Line 3 etc etc. A summary CF with no Label specified will only work on the current sample line, regardless of the number of injections. Plus its important to know that your "Search Order" has absolutely no affect if your label is missing and in fact the only way to get a CF like .%..%RSD(Area) to function is to create a result set, and if you set a search order to such a CF to anything other than Result Set Only, it still behaves as if a result set was created- Summary CFs with no label ONLY work when processed as a result set. 

    Getting back to your set-up, when Empower encounters the summarize custom fields function, it automatically goes back to the top of the sample set at Line 1 and starts to collate all the summary functions like AVE, MIN or MAX according to the formula AND label. For example, a CF like A.%..AVE(Area) and Result Set Only will first identify all the samples labelled as A, then Empower adds up all the Area values and divides by the number of samples called A. Having NO label kills this process and Empower takes each line "as is" to calculate RSD. So when it encounters your first sample, labelled as U01, it ignores that label because it isn't specified in the formula and calculates the %RSD of the peak area from injection 1 so you probably get nothing or a nonsense value for Injection 1 of your samples. However, at Injection 2, it has more than 1 value to work on and calculates the %RSD for peak areas for the 2 injections and (if im not mistaken) stores this value for both injection 1 and injection 2 because all conditions are satisfied? Then it goes to the next line (label U02) and the whole process starts all over again...

Answers

  • You need to use clear calibration and calibrate functions within the sample set. For the calibrate function you need to specify the labels of the standards to use for calibration.

    If I were you I would use S1-3 for the first set, S10-13 for the second, S20-3 for the third. Label references for calibrate functions would be S? for the first set, S1? for the second set, S2? for the third set...

  • Yes that should work as 'shaunwat' described

    I have an example above ,... ie CU= 30 and assay rels test

    Clear , calibrate quantitate and summarize custom fields for each 'bracket ' as it were .

    To check results before processing click ignore points in calibration curve then calibrate and quantitate


  • I don't think the labels is going to solve this problem. If I understand you, you want Empower to calculate average amounts for certain blocks of samples/standards and to only store these values in the same block? The problem with Summarize Custom Fields Incrementally is Empower doesn't know that you want to "exclude" a particular block of samples or standards and therefore as each line is processed, when Empower sees this function its going to go back to the top of the sample set and count all the relevant values right up to that line again. 

    So you get a continually updated set of values until the last SCFI line which will then store the value using all samples in the sample set. Im open to correction here but I think the label column is ignored with the SCF or SCFI function. I don't know why you would use SCFI unless maybe looking to see how precise a standard area is through a run. The only difference between SCF and SCFI is that SCF stores the result in all summary custom fields whereas SCFI stores the value in an incremental manner until the last line which will use all above values. 

    Maybe for you a CF like SAME. %..AVE(Assay) which is a Peak, Real, Calculated CF, Set it to Result Set Only. Label all your samples the same eg U1 or U2 etc. Then put one SCF function at the very end of the sample set and this will calculate average assay for all batches which have the same label and store this value for those samples only. Then you can use the CF in a further CF eg GT(Average_Assay,CConst1). 
  • Oh meant to say, if you are using the custom field in a further custom filed, then make sure the naming of the custom field is named as per ASCII format ie in alphabetical order. in Empower, Capital letters take precedence, so a CF like ZZZ is calculated BEFORE aaa. Summary custom fields that depend on each other must be named in alphabetical order to function correctly. So for your average Assay CF I would name as Average_Assay then for any following CFs that depend on the Average_Assay result, name them as B..... on wards eg Factor_Average_Assay etc. If the cfs are not named correctly, they are calculated out of sequence which will lead to empty fields. 
  • Thank you for all your replies and informations!

    Empower2018 said:

    "If I understand you, you want Empower to calculate average amounts for certain blocks of samples/standards and to only store these values in the same block?"

    This is exactly what I want to achieve (and additional calculations pertaining to block of samples e.g. number of samples per block)

    Shaunwat - you meant e.g. "S*" instead of "S?" (when "S?" is put in label reference it gives wrong name prompt). I tried your solution but it didn't work. It's still calculating e.g. assay, incrementally, not in blocks.

    ydan1977 - I have to label each sample with different labels (U0101, U0102..etc) because I want empower to count number of samples in block for further calculations, maybe it will work when in quantitate row label reference would be something like "U01*"?

    There would be no problem if we would be allowed to put summary functions into report editor tables - we  can only use functions that currently are there e.g. mean, %RSD, min, max which do calculations for columns in table. I would like to put there my formulas but we simply can't so I have to use summarizing custom fields that are previously calculated...

    Sorry for all language mistakes.

  • Sample Labels should be able to use * in a Custom Field but it also uses % or for a specific variable. I have an idea that you might find a tip on this in Neil Lander's Tip of the week @Neil
  • I am really very grateful for all your help and involvement!

    @Empower2018 Your solution, with labeling groups of samples the same, works! I can get average of each block of samples which is important for my further calculations like deviation from average assay for each sample in the block. I need number of samples for standard deviation calculations which is further used for acceptance value (to evaluate uniformity of dosage units) but I can somehow bypass that with transformation of %RSD formula (SD=%RSD*average/100).

    By assay I mean amount with some additional transformations (e.g. amount*Label claim/some factors/dilutions etc. which gives me final assay result)

    I had another problem with calculating %RSD between injections for the same vial - when all vials have the same label e.g. "A" it showed me the same %RSD for all vials (when formula was SAME.%..%RSD(Area)). Luckily, changing formula into .%..%RSD solved the problem completely! Now I can either see individual %RSD values for samples and keep average assay value for selected blocks. Btw, how formula "knows" that I want calculating %RSD for individual samples when I leave label part of formula empty?

    @HeatherLongden Thanks for idea, I know Neil Lander's Tips and it helped me a lot - I am new to Empower's custom fields and I have been dealing with them only for a month. Some of my questions may be very basic.

  • @Empower2018 Everything works fine using your guide. Now I can focus on custom fields validation. Custom fields that finally work, thank you once more!