Monthly Archives: July 2015

Interesting Article on Drugs of Abuse Analysis using TraceFinder

Detection of drugs of abuse in exhaled breath using a device for rapid collection: comparison with plasma, urine and self-reporting in 47 drug users

by: Olof Beck, Niclas Stephanson, Sren Sandqvist and Johan Franck


Example of Simple Physician Office Style Report – TF 3.3

Below is a simple report that converts raw data to plain language text.

The example is of a style that has been dubbed, the Physicians report, as it simply states if a component is found and above a value. If the calculated amount is above the Cutoff amount, a custom “Outcome” column will state that the value is “Positive”, otherwise its “Negative”.

It also has a custom column, that will display the calculated amount if the value is above the Cutoff and a peak was detected. If a peak is detected, but the value is below the cutoff the cell will display “< Cutoff”, otherwise if a peak is not detected it will display either NA or NF.

Click here to download the Template: Physicians Report

Simply unzip into the folder C:\TraceFinderData\3.3\Templates\ReportTemplates

or unzip into the folder C:\TraceFinderData\32\Templates\ReportTemplates

Physicians Report

The excel like script for the Calculated Amount (AMT) column is:

if(quanresults.calcamount(“Report”) <= compound.LOR,”<Cutoff”, quanresults.calcamount)

It simply takes the calculated value and compares to the LOR (Limit of Reporting) value in the method if is equal to of less than the set limit it will show “<Cutoff”, otherwise it will report the calculated value.

The script for the “Outcome” column is very simple.

IF(quanresults.LORFlag= TRUE, “Positive”, “Negative”)

If the value triggers the flag, the flag value is TRUE. IF true show “Positive” in the cell, otherwise show “Negative”

For the function of the LOR flag to work in the case of all reports, the setting to report a value above a set limit and not to show components that didn’t meet that criteria, two setting mu be activated in the method as shown below.

Physicians Report1

The setting in the table filter text field limit the reporting components in to only be Target Compounds and not display Internal Standards.

quanresults.compoundtype= “eTargetCompound”

Physicians Report2

TF 3.3 – Example Of How To Create a Highly Customized Report Template

TraceFinder has a Excel-like report template creation tool. It was first introduced as a plug-in beta release in TF 3.1 and a final product in TF 3.2. After feedback from the user based we made some modifications that should allow for easier template editing and creation. The more feedback we receive the better we can make this tool in the future.

The example below goes into detail how to create some very custom data table information and flagging. This includes taking values that are stored as numbers or TRUE/FALSE text and changing then to read PASS/FAIL with highlighted, bolded and color changed text. It also includes setting up test range criteria for the information to be flagged against without the number having to appear in the data table as being read directly from the results table in the batch to give the PASS/FAIL flag.

The report is a Batch report that shows only compounds that were found to be positive in a concentration above the limit of reporting used set in the Master Method template. It uses typical fields in the header and contains a blend of regular data columns and custom columns in the table. It is separated by the Sample ID as a line unto itself between each set of sample results.

Custom Report page

Below is shown the data fields used to create the table.

The statement in the Table Filter ensures that only compounds that have result greater than the Limit of Reporting (LOR) value, set in the Master Method template, will be displayed in the report.

Setting the sorting by the Sample ID and having it be the top most data field in the selector, allows for that value to be used as the Repeat Header Per Group field. By unchecking the box, the field won’t display on the row, but will appear in the separation row above only.

Custom Report page data feild table

The listings below are the custom fields created to do the special flagging a show data. If you notice these are all the same small scripts that you would use in Excel to create the information. The difference is that the underlying individual results don’t have to be on the sheet, in a hidden column or a second worksheet. It just reflective of the results in the batch. The functions are entered into the Formula text cell when the data field is selected.

Custom Report page data feild table formula field

The way these statements work is whatever is designated as the “=” state(True or False) the first text will be set to display for that state. All other states will render the second text.

To get the data field to use in the functions below simply click on a data element in the selector, highlight the text in the Formula cell and copy/paste it into a custom column’s formula text field and then edit the function around it.

IS Flag

IF(quanresults.ISTDAreaOutOfRangeFlag=False, “Pass”, “Fail”)

This function looks at the internal standard out of range flag. It creates the condition that if the flag is FALSE, meaning it is not indicating a failure of the flag criteria, the show “Pass” in the cell. If the flag is TRUE, meaning that the criteria indicates it has failed, the show “Fail” in the cell.

IR Flag

IF(quanresults.irFlag=False, “Pass”, “Fail”)

This function shows that if the Ion Ratio criteria has been meet by all confirming ions then the flag will be False. This state will then display “Pass” in the cell. If the flag is True then “Fail” will be displayed. The way these statements work is whatever is designated as the “=” state(True or False) the first text will be set for that state. All other states will render the second text.



One limit of the tool is that the table builder can only natively create one column for a set of information. However, you can create a custom column to show 2nd, 3rd, etc… of a data entry. One instance of this is a second confirming ion ratio. The setting (1,2) will display the result for quantitative peak 1, confirming peak 2.

mz Flag

if(quanresults.mzDelta(“Report”) > “2.5”,”Fail”, “Pass”)

This function sets the high precision number of the delta mass, derived from the expected mass minus the actual measured mass, which is always an abolute number, to display “Fail” if its greater than 2.5. If not or less then display “Pass”.

RT Flag

IF(ABS(quanresults.RTDelta(1,0)) >=0.06, “Fail”,”Pass”)

This function declares with the ABS statement that the RT delta result number which can be positive or a negative number will be evaluated by its positive equivalent. If it’s greater than or equal to 0.06 then display “Fail”, in all other cases display “Pass”.

Ion CoE Flag

IF(AND(quanresults.RTDelta(1,1) < 0.01,quanresults.RTDelta(1,1) > -0.01),  “Fail”,”Pass”)

This function combines two conditions the value of these two confirming ions, designated by the values (1,1), must fall outside these two conditions to display “Fail”, if it falls between them then display “Pass”.

Lastly I set conditional formats for each column separately for the custom flagging that if the cell value was “Fail” that it would change the Font to bold and red and the borders of the cell red.

Custom Report page conditional format

Use FreeStyle to Create NIST 2014 Spectral Library Entries

TraceFinder 3.3 utilizes both the Thermo Library Manager and NIST 2014 HRAM library search system for confirmation and identification of found chromatographic peaks. To support the creation of HRAM libraries with NIST 2014 there are a few things to setup.

First, acquire NIST 2014 from a NIST distributor. Thermo has the rights to distribute via purchase this application. Also, FreeStyle 1.1SP1 will be needed.

Once installed there you must set up the spectra import default settings to match the decimal place criteria you plan on using for the type of data contained in your RAW file.

NIST import settings

Next you must have Thermo FreeStyle 1.1SP1 installed.

Then you must set up two settings for data export to NIST.

Under the File menu, select File there is an OPTIONS button to click on. Then select Mass Precision and set the number of decimal places for the data type you will be using.

Next select the Library Search option and set the default to be MSMS or In-Source.

Save the settings. (Note: in some instances FreeStyle must be restarted for the settings to be implemented)

FreeStyle Default settings

The next step in the process is to open the data file(s) you want to use to create library entries. Select the Workspace Processing selector and click the Library Manager button. Select the Library you want perform an initial search against. This must be done even if you are creating your own library.

Set NISt Library

This is followed by working up your data to reflect the spectra you wish to utilize and then clicking the Export to NIST button, while the spectra panel is highlighted. The NIST search panel will open and display an initial search result.


Next select the Librarian tab on the bottom of the screen and select edit button in the middle toolbar to open the editing panel; make adjustments such as changing the name of the spectra to be entered. Then select the Add to Library button finalize with the library file selection.

edit entry NIST

Retention Time Reference Compounds Used For Correcting Chromtographic Drift

TraceFinder has an option to allow the user to set a reference compound to assist in corrections of retention time drift.

The feature is the same implementation that has been a part of the Xcalibur feature set for over 20 years and is well characterized. The user simply selects a checkbox in the RT Reference compound column of the Method – Identification tab. This sets the compound for use in linking other compounds to its found RT.

To set a compound to use a RT reference compound, simply select a RT Reference from a dropdown  selector in the same definition grid.

RT reference

The typical use of this feature is to set your Internal Standards as RT Reference Compounds and then link the nearby eluting components to the Reference Compound. Also, the IS retention time peak detection window is set a little larger than the target components to allow for detection if a large RT drift occurs.

When the RT reference is detected the difference, whether + or – in time are adjusted in the connected compounds. This new RT is specific to each compound in each sample. Therefore it is not reflected as a change in the method because the method is set as a batch level setting. The compound using the RT reference must have an original expected retention time to be adjusted, it cannot be left as zero for this feature to work.

How to use the Threshold Sample in Comparative View

To utilize comparative view to its fullest, one must set 3 three properties.

  • Method-Limits-Threshold setting – this setting allows the user to set the height of the horizontal threshold bar in data review. There are two settings.
    1. Threshold – a fixed peak height amount
    2. % of Threshold the Sample – dynamic threshold according the peak height of the specified Threshold sample, as described below.

Method Threshold Setting

  • Batch view-samples-groups column – this setting assigns samples to groups that are displayed horizontally in the comparative view peaks panel. A unique alpha numeric symbol is used to assign a sample to a group. Each sample with the same symbol is a member of that group. The samples are shown side by side in the peak review panel and are ordered left to right by descending order in the sample grid above.Batchview Threshold Setting
  • Batch view-threshold samples – the setting allows the user to assign a threshold sample for each group. Any member of the group can be set as the threshold sample. However, only one sample can be utilized at a time in the group. If you want one particular sample to be used as the threshold across the batch make sure it is a member of all the group. For example if you used numbers for the group name and you have 10 groups, the entry for this sample in the groups column would be 1,2,3,4,5,6,7,8,9,10.Threshold sample selection

The settings in the examples above allow for the display shown below.

The tall red vertical bar marks the expected retention time and the smaller vertical bars are the edges of the retention time window. Both set in the method parameters for each compound. This allows you to see the drift of chromatography within the sample group. The horizontal red line is the threshold as set in the method as a fixed amount or relative percentage of the threshold sample, as set in the method.

Comparative View in Data Review

A point to note, there were a few instances where everything was setup properly but nothing displayed in the Comparative view. It was found that some older  video drivers not comply with technologies Microsoft used to render the images in this complex grid. However, the issue was fixed in all cases by updating to the latest video drivers for the PC.

Ion Ratios – How the range is calculated in the Methods, with added twist in TF 3.3

TraceFinder has 4 functions for ion range calculations.

Ion Range

1) Manual – This functions as the name implies, it allows the user to define a targeted ratio by manually entering it in the ratios section of the detection tab of the confirming ions of a compound.

2) Average – This functions allows the data to drive the targeted ratio of each confirming peak by averaging the detected peaks for each confirming ion in each component from the calibration curve and applying the average as the target ratio. This is useful in many clinical experiments where response may be variable across sample sets.

3) Weighted Average – Performs the same function as Average with the exception that it weights the bottom end of the curve in the calculation of the target amount. This is useful in assays where the expected amounts in the unknown sample types are typically on the lower end of the calibration range.

4) Level – This selection allows the user to select a level from the calibration curve as the target ratio reference. In some labs the SOP’s  require that a specific calibration point be compared for the batch of samples.

The selection of 2-4 are widely used in the applied markets. This relieves the use of having to perform the calculations manually outside of the application and then hand entering the data.

Also to note is that if you are working in a batch of samples such as a verification samples set. You may use settings 2-4 to calculate the values then changes the setting to manual. This action keeps the calculated value in the target field. you can then update the Master Method template and use these ratios for all validated batches to follow.

TraceFinder 3.3 has the benefit of being able to store the ion ratio criteria in the Compound Database so that you may perform quick holistic edits or use the same criteria in different assays without recalculating the values and manually entering them. As with the methods themselves, each ratio has properties that can be set as:

  • Window Type – How to calculate the width of the range around the target ratio
  • Ratio Window – The amount of the range
  • Coelution Value – The amount in time that the peak apex of the confirming ion can be different from the quan peak.


The file hyperlinked below is an example CSV file template for a compound database for TraceFinder 3.3. This file will allow you to record settings from other methods. If you are transferring from one instrument platform to another, this enables you to quickly create the same method in TraceFinder.

Click here to download the ZIP file -> Default

As a reminder TF can group in the CDB and the Method up to 6 components as individual integrated quantitative peaks under the compound name. This allows the peaks to be viewed and manually manipulated individually in data review but the responses summed as the total response of the compound. Each of the 6 quantitative peaks may have up to 10 confirming peaks with individual ratios and ranges.  (A key note is that the Quantitative peaks need NOT be coeluting. (ie.. Chiral compound analysis)) This feature is mostly when using GC EI experiments or LC experiments with multiply charged components.