Workflows and Templates example

This example shows 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. The instructions are grouped into the following sections:

Set up the workflow

Add Data Link objects

Add BQL objects

Create and map the BQL rule set

Setup BQL objects

Set up two Descriptive Statistics objects

Plot concentration values over time

Plot mean concentration values over time

Set up two noncompartmental analysis objects

Create the formulation dataset for the bioequivalence model

Set up the first bioequivalence model

Create and add a template

Set up the objects in the template workflow

Assume that a drug company wants to create a generic form of a popular drug. They want to test two formulations of a compound to decide which formulation is closest in bioequivalence to the name brand drug. A workflow will be created to test the first formulation, saved as a template, and the template re-used 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.

Note:    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.

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.

Create a project called Template.

Import GenericForm1.xls, GenericForm2.xls, and Pococuranitol.xls from …\Examples\WinNonlin\Supporting files\.

In the File Import Wizard dialog, select the Has units row option for each worksheet (except the History worksheets), using the arrow button to advance to the next screen.

On the last screen, press Finish.

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

Right-click Workflow, select Rename, and enter Parallel BE as the new name.

ParallelBEworkflow

Add Data Link objects

1.  Drag the following worksheets from the Data folder to the Diagram 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, the input datasets for two of Data Link objects will be switched and the workflow objects re-executed 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 Object” 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, near the bottom of the window, check the Use Static LLOQ Value box.

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:

a.  Click the down_arrows button.

b.  Click the (+) symbol to expand Rule Sets.

c.  Drag the Rule Set from the BQL Rules folder to the BQL Rule Set input.

mapBQLrules

Setup BQL objects

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

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

mapBQLinput

3.  Expand GenericForm1_data and the Results section.

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

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

6.  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.

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

8.  Execute the object.

9.  Select the BQL Generic object.

10.  Map the data types as follows:

Subject to Sort.

Time to Time.

Concentration to Concentration.

Leave all other data types mapped to None.

11.  Type GenericConc_gt_0_01 as the Output Column Name.

12.  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 Statistics.

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 to None.

Time to Sort.

BrandConc_gt_0_01 to Summary.

5.  In the Options tab:

a.  Check the Confidence Intervals box.

b.  Check the Number of SD Statistics box.

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 Statistics.

9.  Rename the Descriptive Statistics object Descriptive Stats Generic.

10.  Map the data types as follows:

Subject to None.

Time to Sort.

GenericConc_gt_0_01 to Summary.

11.  In the Options tab:

a.  Check the Confidence Intervals box.

b.  Check the Number of SD Statistics box.

Do not change the default value.

12.  Execute the object.

Plot concentration values over time

In this example, XY Plot objects will be used to graphically look at the data. Refer to “Plot Objects” 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 Group.

Time to X.

BrandConc_gt_0_01 to Y.

Add a second graph to the XY Plot object.

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

6.  Press Add.

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

add2ndXYgraph

setuplist2XYgraphs

7.  Map the Output worksheet from BQL Generic as input for the second graph:

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

b.  In the XY 1 Data Mappings panel, click icon_select_source (Select Source icon).

c.  In the dialog, select the BQL Generic Output worksheet and press OK.

8.  Map the data types as follows:

Subject to Group.

Time to X.

GenericConc_gt_0_01 to Y.

9.  Execute the object.

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

Plot 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 X.

Mean to Y.

SD to Lower Error Bars and Upper Error Bars.

Leave all other data types mapped to None.

Add a second graph to the XY Plot object.

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

6.  Press Add.

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

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

9.  Select the Descriptive Stats Generic Statistics worksheet and press OK.

10.  Map the data types as follows:

Time to X.

Mean to Y.

SD to Lower Error Bars and Upper Error Bars.

Leave all other data types mapped to None.

11.  Execute the object.

The plot shows that the mean concentration values peak at quite different times for the two formulations.

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.

12.  In the Options tab, select Plot and go to the Title tab.

13.  In the title field, type Brand and Generic Mean Concentration.

14.  Select Axes > X.

a.  In the Range area, select the Custom option button.

b.  Leave the Minimum field set to 0.

c.  In the Maximum field enter 60.

15.  Select Axes > Y.

a.  In the Range area, select the Custom option button.

b.  In the Minimum field, enter 0.

c.  In the Maximum field enter 50.

16.  Select Graphs > Mean vs Time (the first one in the list).

a.  In the Appearance tab, select Red as the Marker Color.

b.  Select Red as the Marker Border Color.

c.  Select Red as the Line Color.

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

Set up two noncompartmental analysis objects

Refer to “NCA Object” for more information on this 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 Sort.

Time to Time.

BrandConc_gt_0_01 to Concentration.

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.

5.  Select Dosing in the NCA Setup tab.

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

7.  Select the Pococuranitol_dose worksheet and press OK.

8.  Map the data types as follows:

Subject to Sort.

Dose to Dose.

Time_of_Dose to Time.

9.  Execute the object.

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

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

12.  Rename the NCA object NCA Generic.

13.  Map the data types as follows:

Subject to Sort.

Time to Time.

GenericConc_gt_0_01 to Concentration.

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.

14.  Select Dosing in the Setup tab.

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

16.  Select the GenericForm1_dose worksheet and press OK.

17.  Map the data types as follows:

Subject to Sort.

Dose to Dose.

Time_of_Dose to Time.

18.  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 output in a bioequivalence model. The new column created by the Append Worksheets object will contain 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 press 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 Object” for more information on Bioequivalence.

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

2.  Map the data types as follows:

Source to Formulation.

Subject to None.

Cmax to Dependent.

AUClast to Dependent.

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

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 (Save Workflow Template icon) in the main toolbar to save the workflow as a template.

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

4.  Press Save.

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.phxtmplt.

5.  Select Template in the Object Browser.

6.  Click icon_load_worktemp (Load Workflow Template icon) in the main toolbar to load the template file.

7.  In the dialog, select Parallel BE.phxtmplt and press 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 Parallel 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.

a.  In the Parallel BE 1 workflow object, expand the objects, if necessary.

b.  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 quite 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.

The Output plot shows that the mean concentration values peak at quite 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.


Legal Notice | Contact Certara
© Certara USA, Inc. All rights reserved.