Skip to content

Commit

Permalink
updated ad*.r programs to call on adam-pilot-3.xlsx in metacore object.
Browse files Browse the repository at this point in the history
  • Loading branch information
laxamanaj committed Mar 15, 2024
1 parent 7037501 commit 0ab0dc1
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 56 deletions.
2 changes: 1 addition & 1 deletion submission/programs/adadas.r
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ adsl <- convert_blanks_to_na(adsl)


## origin=predecessor, use metatool::build_from_derived()
metacore <- spec_to_metacore(file.path(path$adam, "ADaM - Pilot 3.xlsx"), where_sep_sheet = FALSE)
metacore <- spec_to_metacore(file.path(path$adam, "adam-pilot-3.xlsx"), where_sep_sheet = FALSE)
# Get the specifications for the dataset we are currently building
adadas_spec <- metacore %>%
select_dataset("ADADAS")
Expand Down
2 changes: 1 addition & 1 deletion submission/programs/adae.r
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ adsl <- convert_blanks_to_na(adsl)
# Read in specifications from define
#----------------------------------------------------------------------------------------
## placeholder for origin=predecessor, use metatool::build_from_derived()
metacore <- spec_to_metacore(file.path(path$adam, "ADaM - Pilot 3.xlsx"), where_sep_sheet = FALSE, quiet = TRUE)
metacore <- spec_to_metacore(file.path(path$adam, "adam-pilot-3.xlsx"), where_sep_sheet = FALSE, quiet = TRUE)
adae_spec <- metacore %>% select_dataset("ADAE") # Get the specifications for the dataset we are currently building


Expand Down
2 changes: 1 addition & 1 deletion submission/programs/adlbc.r
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ supplb <- convert_blanks_to_na(read_xpt(file.path(path$sdtm, "supplb.xpt")))
adsl <- convert_blanks_to_na(read_xpt(file.path(path$adam, "adsl.xpt")))

# create labels
metacore <- spec_to_metacore(file.path(path$adam, "ADaM - Pilot 3.xlsx"), where_sep_sheet = FALSE, quiet = TRUE)
metacore <- spec_to_metacore(file.path(path$adam, "adam-pilot-3.xlsx"), where_sep_sheet = FALSE, quiet = TRUE)

adlbc_spec <- metacore %>%
select_dataset("ADLBC")
Expand Down
2 changes: 1 addition & 1 deletion submission/programs/adsl.r
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ sc <- convert_blanks_to_na(read_xpt(file.path(path$sdtm, "sc.xpt")))
mh <- convert_blanks_to_na(read_xpt(file.path(path$sdtm, "mh.xpt")))

## placeholder for origin=predecessor, use metatool::build_from_derived()
metacore <- spec_to_metacore(file.path(path$adam, "ADaM - Pilot 3.xlsx"), where_sep_sheet = FALSE)
metacore <- spec_to_metacore(file.path(path$adam, "adam-pilot-3.xlsx"), where_sep_sheet = FALSE)
# Get the specifications for the dataset we are currently building
adsl_spec <- metacore %>%
select_dataset("ADSL")
Expand Down
2 changes: 1 addition & 1 deletion submission/programs/adtte.r
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ds <- convert_blanks_to_na(read_xpt(file.path(path$sdtm, "ds.xpt")))

## placeholder for origin=predecessor, use metatool::build_from_derived()

metacore <- spec_to_metacore(file.path(path$adam, "ADaM - Pilot 3.xlsx"), where_sep_sheet = FALSE)
metacore <- spec_to_metacore(file.path(path$adam, "adam-pilot-3.xlsx"), where_sep_sheet = FALSE)

# Get the specifications for the dataset we are currently building

Expand Down
74 changes: 23 additions & 51 deletions vignettes/adrg.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,21 @@ This document provides context for the analysis datasets and terminology that be

## Study Data Standards and Dictionary Inventory

+-----------------------------+-----------------------------------------------+
| **Standard or Dictionary** | **Versions Used** |
+=============================+===============================================+
|-----------------------------|-----------------------------------------------|
| SDTM | SDTM Implementation Guide Version 3.1.2 |
+-----------------------------+-----------------------------------------------+
| | SDTM Version 1.2 |
+-----------------------------+-----------------------------------------------+
| | |
+-----------------------------+-----------------------------------------------+
| SDTM Controlled Terminology | CDISC SDTM Controlled Terminology, 2022-12-16 |
+-----------------------------+-----------------------------------------------+
| | |
+-----------------------------+-----------------------------------------------+
| ADaM | ADaM-IG v1.1 |
+-----------------------------+-----------------------------------------------+
| | ADaM v2.1 |
+-----------------------------+-----------------------------------------------+
| | |
+-----------------------------+-----------------------------------------------+
| ADaM Controlled Terminology | CDISC ADaM Controlled Terminology, 2022-06-24 |
+-----------------------------+-----------------------------------------------+
| | |
+-----------------------------+-----------------------------------------------+
| Data Definitions | Define-XML v2.0 |
+-----------------------------+-----------------------------------------------+
| | |
+-----------------------------+-----------------------------------------------+
| Medical Events Dictionary | MedDRA version 8.0 |
+-----------------------------+-----------------------------------------------+

## Source Data Used for Analysis Dataset Creation

Expand Down Expand Up @@ -279,11 +265,9 @@ Was define.xml evaluated?

## Issues Summary

+----------+------------------------------------------------------------------------------+---------+--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Check ID | Diagnostic Message | Dataset | Count (Issue Rate) | Explanation |
+==========+==============================================================================+=========+====================+=========================================================================================================================================================================================+
|----------|------------------------------------------------------------------------------|---------|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| AD1012 | Secondary custom variable is present but its primary variable is not present | ADSL | 1 (50.00%) | This is a Sponsor Extension to the ADaM Model. The VISNUMEN \[End of Trt Visit (Vis 12 or Early Term.)\] variable is a integer variable which is not related to any character variable. |
+----------+------------------------------------------------------------------------------+---------+--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

: {tbl-colwidths="\[17,22,15,22,25\]"}

Expand All @@ -303,19 +287,13 @@ The sponsor has provided all programs for analysis results. They are all created

The following table contains the list of programs that generate the analysis datasets in Pilot 3. It shows the program file name, the analysis dataset name and the label of the analysis dataset. The recommended steps to execute the analysis results using R are described in the Appendix.

+------------------+---------------------------+--------------------------------------+
| **Program Name** | **Analysis Dataset Name** | **Analysis Dataset Label** |
+==================+===========================+======================================+
|------------------|---------------------------|--------------------------------------|
| adsl.r | adsl.xpt | Subject-Level Analysis Dataset |
+------------------+---------------------------+--------------------------------------+
| adadas.r | adas.xpt | ADAS-Cog Analysis |
+------------------+---------------------------+--------------------------------------+
| adlbc.r | adlb.xpt | Analysis Dataset Lab Blood Chemistry |
+------------------+---------------------------+--------------------------------------+
| adae.r | adae.xpt | Adverse Events Analysis Dataset |
+------------------+---------------------------+--------------------------------------+
| adtte.r | adtte.xpt | AE Time to 1st Derm. Event Analysis |
+------------------+---------------------------+--------------------------------------+

## Analysis Output Programs

Expand Down Expand Up @@ -361,17 +339,12 @@ The following table contains a list of programs that generate outputs used in th

For reference, below is a description of the analysis programs utilized and outputs generated in Pilot 1.

+-------------------+-------------------------+-----------------------------------------------------------------------------------+
| **Program Name** | **Output Table Number** | **Title** |
+===================+=========================+===================================================================================+
|-------------------|-------------------------|-----------------------------------------------------------------------------------|
| tlf-demographic.r | Table 14-2.01 | Summary of Demographic and Baseline Characteristics |
+-------------------+-------------------------+-----------------------------------------------------------------------------------+
| tlf-primary.r | Table 14-3.01 | Primary Endpoint Analysis: ADAS Cog (11) - Change from Baseline to Week 24 - LOCF |
+-------------------+-------------------------+-----------------------------------------------------------------------------------+
| tlf-efficacy.r | Table 14-3.02 | ANCOVA of Change from Baseline at Week 20 |
+-------------------+-------------------------+-----------------------------------------------------------------------------------+
| tlf-kmplot.r | Figure 14-1 | KM plot for Time to First Dermatologic Event: Safety population |
+-------------------+-------------------------+-----------------------------------------------------------------------------------+

## Proprietary R Packages

Expand Down Expand Up @@ -569,6 +542,8 @@ To install and execute the R programs, follow all of the procedures below. Ensur

In  addition, create  a  new  directory  to  hold  the  unpacked  Pilot  3  ADaM and tlf programs and files. For demonstration purposes, the procedures below assume the new directory is this location: C:\\pilot3-files, where the unpacked files are shown as the m1 and m5 directories.

![](images/clipboard-641727471.png)

### Installation of R and R Studio

Download and install R 4.2.3 for Windows from[ ](https://cran.r-project.org/bin/windows/base/old/4.2.1/R-4.2.1-win.exe)<https://cran.r-project.org/bin/windows/base/old/4.2.3/> . Then download and run the [R-4.2.3-win.exe](https://cran.r-project.org/bin/windows/base/old/4.2.3/R-4.2.3-win.exe) file. Also download RStudio for Windows by visiting[ ](https://www.rstudio.com/products/rstudio/download/#download)<https://dailies.rstudio.com/version/2023.03.1+446.pro1/>
Expand All @@ -585,15 +560,19 @@ Download and install R 4.2.3 for Windows from[ ](https://cran.r-project.org/bin/

- Once the location has been confirmed, click the Create Project button.

- These .Rproj files will be created.

![](images/clipboard-2366076638.png)

### Installation of R Packages

A minimum set of R packages are required to ensure the Pilot 3 analysis programs are successfully run and the custom package environment used for the application is replicated correctly. 
A minimum set of R packages are required to ensure the Pilot 3 analysis programs are successfully run and the custom package environment used for the application is replicated correctly. Please follow these steps below to install these R packages.

1. The first package to install is the {remotes} package:
1. In the `Files` window pane, ensure that this directory `~/pilot3-files/m5/datasets/rconsortiumpilot3/analysis/adam/programs` has both the `renv-lock.txt` and `pilot3utils_0.0.2.zip` files.

```
install.packages("remotes")
```
![](images/clipboard-398207727.png)

2. In the R Studio console install the {remotes} package: `install.packages("remotes")`

+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Notes : |
Expand Down Expand Up @@ -1072,21 +1051,14 @@ First 10 of 20 rows are shown in table below

In pilot3, variable labels were updated per ADaM IG 1.1, which caused some discrepancies with original CDISC pilot data label.

+-----------+-----------+---------------------------------+------------------------------------+
| Dataset | Variable | CDISC pilot data label | Pilot3 label |
+:==========+:==========+:================================+:===================================+
| ADAE | ADURN | Analysis Duration (N) | AE Duration (N) |
+-----------+-----------+---------------------------------+------------------------------------+
| | ADURU | Analysis Duration Units | AE Duration Units |
+-----------+-----------+---------------------------------+------------------------------------+
| | AOCCFL | 1st Occurrence of Any AE Flag | 1st Occurrence within Subject Flag |
+-----------+-----------+---------------------------------+------------------------------------+
| ADADAS | ANL01FL | Analysis Record Flag 01 | Analysis Flag 01 |
+-----------+-----------+---------------------------------+------------------------------------+
| | ITTFL | Intent-to-Treat Population Flag | Intent-To-Treat Population Flag |
+-----------+-----------+---------------------------------+------------------------------------+
| ADTTE | SRCDOM | Source Data | Source Domain |
+-----------+-----------+---------------------------------+------------------------------------+
| Dataset | Variable | CDISC pilot data label | Pilot3 label |
|:--------|:---------|:--------------------------------|:-----------------------------------|
| ADAE | ADURN | Analysis Duration (N) | AE Duration (N) |
| | ADURU | Analysis Duration Units | AE Duration Units |
| | AOCCFL | 1st Occurrence of Any AE Flag | 1st Occurrence within Subject Flag |
| ADADAS | ANL01FL | Analysis Record Flag 01 | Analysis Flag 01 |
| | ITTFL | Intent-to-Treat Population Flag | Intent-To-Treat Population Flag |
| ADTTE | SRCDOM | Source Data | Source Domain |

{{< pagebreak >}}

Expand Down

0 comments on commit 0ab0dc1

Please sign in to comment.