Workflows and Templates example

The purpose of the example is to show Phoenix’s ability to create and reuse workflows. This example shows users how to create a workflow to perform an analysis, save the workflow as a template, and use the template to complete the same analysis using different data.

This example assumes that a drug company wants to create a generic form of a popular drug. The company wants to test two formulations of a compound in order to decide which formulation is closest in bioequivalence to the name brand drug. In this example users will create a workflow to test the first formulation, save the workflow as a template, and reuse the template to test the second formulation.

Data for this study were created using Certara’s Trial Simulator™.

The completed project (Templates.phxproj) is available for reference in …\Examples\Data and Plots.

Most Phoenix objects require the same basic steps for their use. However, there may be multiple paths to accomplishing a step (e.g., main menu, right-click menu, drag-and-drop, etc.). For simplicity, only one is listed here.

Any object added to a project can be viewed in its own window by selecting the object in the Object Browser and double-clicking it or pressing ENTER. All instructions for setting up and executing an object are the same whether the object is viewed in its own window or in Phoenix’s viewing.

See also:

Phoenix workflows
Workflow template

Set up the workflow

A Workflow object is the part of the project that is used to contain and manage operational objects, similar to how the Data folder is used to contain and manage datasets.

Workflows can be set up to perform complex operational procedures using operational objects. A Workflow can be saved as a template file, which allows users to create complex operational proce­dures once, and reuse and share them multiple times.

The advantage of a template is that it saves the configuration settings in each of the operational objects it contains. However, templates do not save mappings to external datasets. This means that a template can be created that can be easily reused with multiple datasets.

  1. Create a project called Template.

  2. Import the datasets.
    From …\Examples\WinNonlin\Supporting files\, import:
    GenericForm1.xls 
    GenericForm2.xls 
    Pococuranitol.xls 

  3. Select the Has units row option for each worksheet (except the History worksheets), using the Right Arrow button to advance to the next preview screen.

  4. Once you get to the last screen, click Finish.

  5. Note:Datasets in XLS (Microsoft Excel Workbook) format are added to the Data folder as workbooks.

  6. Rename the workflow as Parallel BE.

ParallelBEworkflow.png 

Add Data Link objects

  1. Drag the following worksheets from the Data folder to the display area:
    Pococuranitol_data, Pococuranitol_dose, GenericForm1_data, and GenericForm1_dose.
    This creates a Data Link object for each input dataset.

  2. Execute the Parallel BE workflow object.

Later in the tutorial, you will switch the input datasets for two of the Data Link objects and then re-exe­cute the workflow objects using the new datasets. Without the Data Link objects, you would have to redefine the input for each of the individual objects affected by the dataset change.

Add BQL objects

BQL is an acronym for Below Quantifiable Limit. BQL rules are used to exclude values in a dataset that are too low to be useful in an analysis. See “BQL” for information.

  1. Right-click the Parallel BE workflow object, select New > Data Management > BQL.

  2. Rename the BQL object as BQL Brand.

  3. Insert a second BQL object named BQL Generic.

Create and map the BQL rule set

BQL rule sets are created and stored in the BQL Rules folder.

  1. Right-click the BQL Rules folder, select New > Rule Set.

  2. Type ERR under Nonnumeric Code.

  3. Type 0 (zero) under Unconditional Substitution.

  4. Check the Use When < LLOQ checkbox.

  5. In the Properties tab, check the Use Static LLOQ Value checkbox.

  6. Type 0.01 in the LLOQ Value field.

  7. Select the Parallel BE workflow in the Object Browser.

  8. In the Diagram, for both BQL Brand and BQL Generic objects:

    – Click the down_arrows.png button.
    – Click the (+) symbol to expand Rule Sets.
    – Drag the Rule Set from the BQL Rules folder to the BQL Rule Set input.

mapBQLrules.png 

Setup BQL objects

  1. In the Diagram, expand Pococuranitol_data and the Results section.

  2. Drag Data to BQL Brand > Inputs > Main.

  3. mapBQLinput.png 

  4. Expand GenericForm1_data and the Results section.

  5. Drag Data to BQL Generic > Inputs > Main.

  6. Select the BQL Brand object in the Object Browser.

  7. Map the data types in the Main Mappings panel as follows:
    Subject to the Sort context.
    Time to the Time context.
    Concentration to the Concentration context.

    Leave all other data types mapped to None.

  8. In the Properties tab, type BrandConc_gt_0_01 as the Output Column Name.

  9. Execute the object.

  10. Select the BQL Generic object.

  11. Map the data types as follows:
    Subject to the Sort context.
    Time to the Time context.
    Concentration to the Concentration context.

    Leave all other data types mapped to None.

  12. Type GenericConc_gt_0_01 as the Output Column Name.

  13. Execute the object.

Set up two Descriptive Statistics objects

  1. Go to the Results tab of the BQL Brand object.

  2. Right-click the Output worksheet, select Send To > Computation Tools > Descriptive Statis­tics.

    A Descriptive Statistics object is inserted into the Parallel BE workflow. The columns in the Output worksheet are automatically mapped to the Descriptive Stat object’s Main Mappings panel. See “Descriptive Statistics” for more information.)

  3. Rename the Descriptive Statistics object Descriptive Stats Brand.

  4. Map the data types as follows:
    Subject mapped to None.
    Time to the Sort context.
    BrandConc_gt_0_01 to the Summary context.

  5. In the Options tab:
    – Check the Confidence Intervals checkbox.
    – Check the Number of SD Statistics checkbox.
    Do not change the default value.

  6. Execute the object.

  7. Go to the Results tab of the BQL Generic object.

  8. Right-click the Output worksheet, select Send To > Computation Tools > Descriptive Statis­tics.

  9. Rename the Descriptive Statistics object Descriptive Stats Generic.

  10. Map the data types as follows:
    Subject mapped to None.
    Time to the Sort context.
    GenericConc_gt_0_01 to the Summary context.

  11. In the Options tab:
    – Check the Confidence Intervals checkbox.
    – Check the Number of SD Statistics checkbox.
    Do not change the default value.

  12. Execute the object.

Plot the concentration values over time

In this example, XY Plot objects will be used to graphically look at the data. Refer to “Plotting” for information on other plot objects.

  1. Go to the Results tab of the BQL Brand object.

  2. Right-click the Output worksheet, select Send To > Plotting > XY Plot.

  3. Rename the XY Plot object XY Plot Brand vs Generic.

  4. Map the data types as follows:
    Subject to the Group context.
    Time to the X context.
    BrandConc_gt_0_01 to the Y context.

  5. Add a second graph to the XY Plot object.

  6. With Plot selected in the Options tab menu tree, click the Graphs tab.

  7. Click Add.

    A second XY Plot input named XY 1 Data is added to the Setup list.

  8. add2ndXYgraph.png 

    setuplist2XYgraphs.png 

  9. Map the Output worksheet from BQL Generic as input for the second graph:
       – Click the XY 1 Data object in the Setup panel.
       – In the XY 1 Data Mappings panel, click icon_select_source.png (Select Source icon).
       – In the dialog, select the BQL Generic Output worksheet and click OK.

  10. Map the data types as follows:
    Subject to the Group context.
    Time to the X context.
    GenericConc_gt_0_01 to the Y context.

  11. Execute the object.

Examine the output in the Results tab. The plot shows that the concentration values peak at different times for the two formulations.

Plot the mean concentration values over time

  1. Go to the Results tab of the Descriptive Stats Brand object.

  2. Right-click the Statistics worksheet and select Send To > Plotting > XY Plot.

  3. Rename the XY Plot object XY Plot Mean Brand vs Generic.

  4. Map the data types as follows:
    Time to the X context.
    Mean to the Y context.
    SD to the Lower Error Bars and Upper Error Bars contexts.

    Leave all other data types mapped to None.

  5. Add a second graph to the XY Plot object.

  6. With Plot selected in the Options tab menu tree, click the Graphs tab.

  7. Click Add.

  8. Click the XY 1 Data object in the Setup panel.

  9. In the XY 1 Data Mappings panel, click the Select Source icon.

  10. Select the Descriptive Stats Generic Statistics worksheet and click OK.

  11. Map the data types as follows:
    Time to the X context.
    Mean to the Y context.
    SD to the Lower Error Bars and Upper Error Bars contexts.

    Leave all other data types mapped to None.

  12. Execute the object.

  13. The plot shows that the mean concentration values peak at very different times for the two formula­tions.

    The plot does not place the points close to the axes, it is hard to differentiate between the overlaid plots, and the plot does not have a title. Use the Options tab to change the X and Y axes ranges, change the plot colors, and add a title.

  14. In the Options tab, select Plot and go to the Title tab.
    – In the title field, type Brand and Generic Mean Concentration.

  15. Select Axes > X.
    – In the Range area, select the Custom option button.
    – Leave the Minimum field set to 0.
    – In the Maximum field enter 60.

  16. Select Axes > Y.
    – In the Range area, select the Custom option button.
    – In the Minimum field, enter 0.
    – In the Maximum field enter 50.

  17. Select Graphs > Mean vs Time (the first one in the list).
    – In the Appearance tab, select Red from the Marker Color menu.
    – In the Marker Border Color menu, select Red.
    – In the Line Color menu, select Red.

The Descriptive Statistics Brand plot is now highlighted in red.

The plot is automatically updated to reflect the new axes ranges, plot colors, and the title. Note that the XY Plot object did not have to be re-executed.

tempBrandGenericplot.png 

Set up two noncompartmental analysis objects

Refer to “NCA” for more information on the NCA object.

  1. Go to the Results tab for the BQL Brand object.

  2. Right-click the Output worksheet, select Send To > NonCompartmental Analysis > NCA.

  3. Rename the NCA object NCA Brand.

  4. Map the data types as follows:
    Subject to the Sort context.
    Time to the Time context.
    BrandConc_gt_0_01 to the Concentration context.

  5. In this example, one dose of 50 mg was administered at time zero. The Pococuranitol workbook has dosing data stored in the Pococuranitol_dose worksheet.

  6. Select Dosing in the NCA Setup tab.

  7. In the Mappings panel, click the Select Source icon.

  8. Select the Pococuranitol_dose worksheet and click OK.

  9. Map the data types as follows:
    Subject to the Sort context.
    Dose to the Dose context.
    Time_of_Dose to the Time context.

  10. Execute the object.

  11. Once the job finishes, go to the Results tab for the BQL Generic object.

  12. Right-click the Output worksheet, select Send To > NonCompartmental Analysis > NCA.

  13. Rename the NCA object NCA Generic.

  14. Map the data types as follows:
    Subject to the Sort context.
    Time to the Time context.
    GenericConc_gt_0_01 to the Concentration context.

  15. In this example, one dose of 50 mg was administered at time zero. The GenericForm1 workbook has dosing data store in the GenericForm1_dose worksheet.

  16. Select Dosing in the Setup tab.

  17. In the Mappings panel, click the Select Source icon.

  18. Select the GenericForm1_dose worksheet and click OK.

  19. Map the data types as follows:
    Subject to the Sort context.
    Dose to the Dose context.
    Time_of_Dose to the Time context.

  20. Execute the object.

Create the formulation dataset for the bioequivalence model

Combine the Final Parameters Pivoted worksheets from both NCA objects and use the combined out­put in a bioequivalence model. The new column created by the Append Worksheets object will con­tain the formulation information for the bioequivalence model.

  1. Go to the Results tab for the NCA Brand object.

  2. Right-click the Final Parameters Pivoted worksheet, select Send To > Data Management > Append Worksheets.

  3. Map Subject, Cmax, and AUClast to the Source Column context.
    Leave all other data types mapped to None.

  4. Click the Worksheet2 object in the Setup panel.

  5. In the Worksheet 2 Mappings panel for the Append Worksheets object, click the Select Source icon.

  6. Select NCA Generic Final Parameters Pivoted worksheet and click OK.

  7. Map Subject, Cmax, and AUClast to the Source Column context.
    Leave all other data types mapped to None.

  8. Execute the object.

Set up the first bioequivalence model

Refer to “Bioequivalence” for more information on the Bioequivalence object.

  1. Right-click the Results worksheet for the Append Worksheets object, select Send To > Computa­tion Tools > Bioequivalence.

  2. Map the data types as follows:
    Source to the Formulation context.
    Subject mapped to None.
    Cmax to the Dependent context.
    AUClast to the Dependent context.

  3. In the Model tab, select the Parallel/Other button.
    This option sets the model to a parallel bioequivalence model.

    Leave Reference Formulation set to NCA Brand.

  4. Execute the object.

Examine the output in the Results tab.

Create and add a template

The Parallel BE workflow looks like this:

worktempexdatalinks.png 

In Phoenix templates, any data mappings that are internal to the workflow are retained. For example, all expected output from the BQL objects, such as subject, time, and concentration, are retained in the NCA objects’ Main Mappings panel. Mappings that are external to the template, such as the BQL rules and the datasets used with the BQL objects are not retained.

  1. Select the Parallel BE workflow.

  2. Click icon_save_worktemp_1.png (Save Workflow Template icon) in the toolbar to save the workflow as a template.

  3. In the dialog, enter the name as Parallel BE.

  4. Click Save.

  5. The workflow is saved as a Workflow template file in the location set in the Preferences dialog (by default <default Project directory>/templates) and named Parallel BE.phxt­mplt.

  6. Select Template in the Object Browser.

  7. Click icon_load_worktemp_1.png (Load Workflow Template icon) in the toolbar to load the template file.

  8. In the dialog, select Parallel BE.phxtmplt and click Open.

The template is added to the project as a second workflow. The second workflow is nested below the first one and named Parallel BE 1.

Note:All references to workflows and operational objects in this section of the example refer to the Par­allel BE 1 workflow and the operational objects it contains.

Set up the objects in the template workflow

  1. Map the rule sets for both BQL Brand and BQL Generic objects.
    – In the Parallel BE 1 workflow object, expand the objects, if necessary.
    – Drag Rule Set from the BQL Rules folder to the Rule Set input for both objects.

  2. Drag the external data sources from the Data folder to the Data Link objects as follows:
    GenericForm2_data to Inputs > Data for the GenericForm1_data object.
    GenericForm2_dose to Inputs > Data for the GenericForm1_dose object.
    Pococuranitol_data to Inputs > Data for the Pococuranitol_data object.
    Pococuranitol_dose to Inputs > Data for the Pococuranitol_dose object.

  3. Execute each object in the Parallel BE 1 workflow.

  4. Select the XY Plot Brand vs Generic object, select Output in the Results tab.

    The plot shows that the concentration values peak at very different times in the two different study groups. The second generic formulation lasts longer and has much higher concentration values than the brand name formulation.

  5. Select the XY Plot Mean Brand vs Generic object, select Output in the Results tab.

    The plot shows that the mean concentration values peak at very different times in the two different study groups.

  6. Examine the Bioequivalence output against the results from the first Bioequivalence object.

  7. Right-click the project and select Close Project.

This concludes the Workflows and Templates example.


Last modified date:7/9/20
Certara USA, Inc.
Legal Notice | Contact Certara
© 2020 Certara USA, Inc. All rights reserved.