A possible solution can also be to identify the pairs of injection with the help of a sample custom field.
For example, create a Sample Custom parameter Spike_Sample in the Control Panel. Enter the sample name of its corresponding unspiked sample. You enter "" if the injection is not a spiked injection.
Scope: Peak or Group
Type: Double
Formula:
IF(CurrentSample.GetCustomField("Spike_Sample")<>””, (CurrentSequence.AllInjectionsBySampleName(CurrentSample.GetCustomField("Spike_Sample")).First().AllPeaksAndGroupsByName(Compound_Name).first().Compound_Amount - Compound_Amount)/ CurrentPeakOrGroup .GetCustomField(“SpikedAmount”)*100, "")
Part of equation (highlighted) | Description |
|---|---|
IF(CurrentSample.GetCustomField("Spike_Sample")<>””, (CurrentSequence.AllInjectionsBySampleName(CurrentSample.GetCustomField( "Spike_Sample" )).First().AllPeaksAndGroupsByName( Compound_Name).first().Compound_Amount - Compound_Amount) / CurrentPeakOrGroup.GetCustomField( “SpikedAmount”) *100, "") | Means the computation is done for Spiked samples only (Spike_Sample not empty) |
IF(CurrentSample.GetCustomField("Spike_Sample")<>””, (CurrentSequence.AllInjectionsBySampleName( CurrentSample.GetCustomField( "Spike_Sample" )).First().AllPeaksAndGroupsByName( Compound_Name ).first().Compound_Amount - Compound_Amount) / CurrentPeakOrGroup .GetCustomField( “SpikedAmount” )*100, "") | Select the injections which sample_name has the correct name. This name must be unique so that taking the first works as expected. |
IF(CurrentSample.GetCustomField("Spike_Sample")<>””, (CurrentSequence.AllInjectionsBySampleName(CurrentSample.GetCustomField( "Spike_Sample" )).First().AllPeaksAndGroupsByName( Compound_Name ).first().Compound_Amount - Compound_Amount ) / CurrentPeakOrGroup.GetCustomField( “SpikedAmount” )*100, "") | Select the compounds that have the same name as the current one and take the first. Since there is only one, it returns the right peak. |
base-id: 9502440075
id: 9502440075