-
Notifications
You must be signed in to change notification settings - Fork 17
Closes #120 Add landing pages for each section (SDTM, ADaM, TLG, Documents, Interactive, Logs, eSubmission) #136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Copilot
wants to merge
24
commits into
main
Choose a base branch
from
copilot/add-landing-pages-sections
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
e1fd12e
Initial plan
Copilot d37c6e2
Add comprehensive landing pages for all sections
Copilot 6006c8a
#120 add landing page for each section
jeffreyad 9ed0f52
#120 styler and spelling
jeffreyad 38e62d0
#120 test exclude relative link check to qmd files
jeffreyad 069ffa9
#120 spelling
jeffreyad ac94c5f
#120 test update switch for relative links
jeffreyad 5e21f2a
#120 styler
jeffreyad 0a05185
#120 test link checker
jeffreyad e9e1048
#120 update TLG index to distinguish approaches #122
jeffreyad 0ba3d8b
#120 styler and spelling
jeffreyad eee8c94
#120 updates to ADAM index
jeffreyad 0ae3a34
#120 spelling
jeffreyad 6c5204e
merge main into branch
jeffreyad 042deb4
#120 a few formatting edits
jeffreyad f631e5c
Update adam/index.qmd
jeffreyad 577c600
Update adam/index.qmd
jeffreyad 7fc5391
Update tlg/index.qmd
jeffreyad 446efd5
#120 updates from review
jeffreyad d57ee41
#120 update logging index
jeffreyad ab2f543
Update adam/index.qmd
jeffreyad 0378829
Update esub/index.qmd
jeffreyad fbe7d24
#120 update adam index
jeffreyad ef2f5f2
#120 update esub index
jeffreyad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,51 +1,57 @@ | ||
| #' fixes link-check problem | ||
| #' Finds whether any files use the string: "(.mailto:" for linking email adresses | ||
| #' then just replaces with: "(mailto:" as is markdown standard | ||
| #' Fixes link-check problem | ||
| #' - Finds files that use the string "(.mailto:" and corrects to "(mailto:" | ||
| #' - Updates links to `.qmd` files to point to `.md` files. | ||
| #' | ||
| #' @param file_list vector of filenames | ||
| #' | ||
| #' @return messages only. side effect is: changes files. | ||
| #' @return messages. Side effect: modifies files. | ||
| modify_files <- function(file_list) { | ||
| # Create an empty vector to store the file names that contain the string | ||
| # Create an empty vector to store file names that need modifications | ||
| matching_files <- c() | ||
|
|
||
| # Iterate over each file in the directory | ||
| # Iterate over each file to check for issues | ||
| for (file in file_list) { | ||
| # Read the contents of the file | ||
| file_contents <- readLines(file) | ||
|
|
||
| # Check if the file contains the string "(.mailto:" | ||
| if (any(grepl("\\(\\.mailto:", file_contents))) { | ||
| # Check if the file contains the string "(.mailto:" OR references to `.qmd` files | ||
| if (any(grepl("\\(\\.mailto:", file_contents)) || any(grepl("\\.qmd\\)", file_contents))) { | ||
| # Add the file name to the vector | ||
| matching_files <- c(matching_files, file) | ||
| } | ||
| } | ||
|
|
||
| # Iterate over the matching files | ||
| # Iterate over the matching files to apply fixes | ||
| for (file in matching_files) { | ||
| # Read the contents of the file | ||
| file_contents <- readLines(file) | ||
|
|
||
| # Remove the "." from each line that contains the string | ||
| # Fix email links | ||
| modified_contents <- gsub("\\(\\.mailto:", "(mailto:", file_contents) | ||
|
|
||
| # Update links to `.qmd` files to point to `.md` files | ||
| # Matches patterns like `[text](filename.qmd)` and replaces `.qmd` with `.md` | ||
| modified_contents <- gsub("\\.qmd\\)", ".md)", modified_contents) | ||
|
|
||
| # Write the modified contents back to the file | ||
| writeLines(modified_contents, file) | ||
|
|
||
| # Print a message indicating the modification has been made | ||
| # Print a message indicating what modifications have been made | ||
| message("Modified file:", file, "\n") | ||
| } | ||
|
|
||
| # Print the list of matching files | ||
| # Print a list of matching files that were modified | ||
| message("Matching files:", matching_files, "\n") | ||
| } | ||
|
|
||
| # get all qmd files | ||
| # Get all `.qmd` files | ||
| all_qmd <- list.files(full.names = FALSE, all.files = FALSE, pattern = ".qmd$", recursive = TRUE) | ||
|
|
||
| # modify if needed the link to email problem for link checker | ||
| # Modify files to fix email links and update `.qmd` references | ||
| modify_files(all_qmd) | ||
| # get filenames ending with .md | ||
|
|
||
| # Generate a list of `.md` filenames that will replace `.qmd` files | ||
| all_md <- gsub(".qmd$", ".md", all_qmd) | ||
| # rename all files | ||
|
|
||
| # Rename all `.qmd` files to `.md` | ||
| file.rename(all_qmd, all_md) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,114 @@ | ||
| --- | ||
| title: "ADaM" | ||
| --- | ||
|
|
||
| ## Overview | ||
|
|
||
| This section provides end-to-end examples for creating Analysis Data Model (ADaM) datasets using pharmaverse packages. ADaM is a CDISC standard designed to facilitate efficient generation, replication, and review of clinical trial statistical analyses. | ||
|
|
||
| The examples demonstrate how to leverage multiple pharmaverse packages together, including `{admiral}`, `{metacore}`, `{metatools}`, and `{xportr}`, to build analysis-ready datasets from SDTM data. | ||
|
|
||
| All examples use SDTM datasets from `{pharmaversesdtm}` as input, ensuring consistency and reproducibility. | ||
|
|
||
| ## Examples | ||
|
|
||
| ### Subject-Level Analysis Dataset (`ADSL`) | ||
|
|
||
| - **[ADSL (Subject-Level Analysis Dataset)](adsl.qmd)** - Create the foundational subject-level dataset containing demographic, treatment, and study participation information. | ||
|
|
||
| ::: {.callout-tip} | ||
| ## Start Here | ||
| `ADSL` is the foundation for most other ADaM datasets. We recommend starting with this example if you're new to ADaM development with pharmaverse packages. `ADSL` contains one record per subject and serves as the basis for merging subject-level variables into other ADaM datasets. | ||
| ::: | ||
|
|
||
| ### Basic Data Structure (BDS) Analysis Datasets | ||
|
|
||
| BDS datasets follow a standard structure with one observation per subject per analysis parameter per analysis timepoint. These are commonly used for efficacy and safety analyses. | ||
|
|
||
| - **[`ADVS` (Vital Signs Analysis)](advs.qmd)** - Generate vital signs analysis dataset with baseline and change from baseline calculations. | ||
| - **[`ADRS` (Response Analysis)](adrs.qmd)** - Create response analysis dataset for oncology efficacy endpoints. | ||
|
|
||
| ### Occurrence Data Structure (OCCDS) Analysis Datasets | ||
|
|
||
| OCCDS datasets have one observation per subject per occurrence of an event, capturing multiple events per subject. | ||
|
|
||
| - **[`ADAE` (Adverse Events Analysis)](adae.qmd)** - Build an analysis dataset for adverse events with derived variables for analysis and reporting. | ||
|
|
||
| ### Time-to-Event Analysis Dataset (`ADTTE`) | ||
|
|
||
| - **[`ADTTE` (Time-to-Event Analysis)](adtte.qmd)** - Develop oncology time-to-event analysis dataset for survival analyses, including censoring and event derivations. | ||
|
|
||
| ### Pharmacokinetic Analysis Datasets | ||
|
|
||
| - **[`ADPC` (Pharmacokinetic Concentrations)](adpc.qmd)** - Build pharmacokinetic concentration analysis dataset with timepoint derivations. | ||
| - **[`ADPPK` (Population Pharmacokinetic)](adppk.qmd)** - Create population pharmacokinetic analysis dataset for modeling and simulation. | ||
|
|
||
| ## Quick Reference | ||
|
|
||
| | Dataset Type | Example | Key Packages | Structure | | ||
| |--------------|---------|--------------|-----------| | ||
| | **Subject-Level** | [`ADSL`](adsl.qmd) | admiral, metacore, metatools, xportr | One record per subject | | ||
| | **BDS - Vitals** | [`ADVS`](advs.qmd) | admiral, metacore, metatools, xportr | One record per subject per parameter per timepoint | | ||
| | **BDS - Response** | [`ADRS`](adrs.qmd) | admiral, metacore, metatools, xportr | One record per subject per parameter per timepoint | | ||
| | **OCCDS - Safety** | [`ADAE`](adae.qmd) | admiral, metacore, metatools, xportr | One record per subject per event | | ||
| | **Time-to-Event** | [`ADTTE`](adtte.qmd) | admiral, metacore, metatools, xportr | One record per subject per parameter | | ||
| | **PK Concentration** | [`ADPC`](adpc.qmd) | admiral, metacore, metatools, xportr | One record per subject per timepoint per analyte | | ||
| | **Population PK** | [`ADPPK`](adppk.qmd) | admiral, metacore, metatools, xportr | One record per subject per timepoint | | ||
|
|
||
| ## Workflow Overview | ||
|
|
||
| Each example demonstrates a consistent workflow for creating ADaM datasets: | ||
|
|
||
| 1. **Data Input** - Load SDTM datasets and required metadata specifications | ||
| 2. **Derivations** - Apply ADaM derivation functions to create analysis variables (e.g., baseline flags, change from baseline, derived parameters) | ||
| 3. **Metadata Application** - Use metadata specifications to control dataset attributes, labels, and formats | ||
| 4. **Validation** - Perform dataset checks and validation against specifications | ||
| 5. **Export** - Create SAS transport files ready for regulatory submission | ||
|
|
||
| ::: {.callout-note} | ||
| ## Dataset Dependencies | ||
|
|
||
| Most ADaM datasets require `ADSL` as input for subject-level variables. The typical flow is: | ||
|
|
||
| **SDTM datasets** → **`ADSL`** → **Other ADaM datasets** → **TLGs** | ||
| ::: | ||
|
|
||
| ## Key Packages Used | ||
|
|
||
| - **[`{admiral}`](https://pharmaverse.github.io/admiral/)** - Core ADaM derivations and functions for creating analysis datasets following CDISC standards | ||
| - **[`{metacore}`](https://atorus-research.github.io/metacore/)** - Metadata and specifications management, storing variable-level metadata | ||
| - **[`{metatools}`](https://pharmaverse.github.io/metatools/)** - Dataset building and validation using metadata, applying specifications to datasets | ||
| - **[`{xportr}`](https://atorus-research.github.io/xportr/)** - SAS transport file creation and eSub compliance checks for regulatory submissions | ||
|
|
||
| ## Meet the `{admiral}` Family | ||
|
|
||
| The `{admiral}` ecosystem includes specialized extension packages for different therapeutic areas and study types: | ||
|
|
||
| - **[Admiral Family Overview](https://pharmaverse.org/e2eclinical/adam/)** - Explore the complete admiral family | ||
| - **Extension Packages** - These packages provide additional therapeutic area support, for example including functions for oncology endpoints such as RECIST v1.1 for solid tumors (`{admiralonco}`) | ||
| - **Additional extensions** - Packages for other therapeutic areas are under development | ||
|
|
||
| Each extension package builds on `{admiral}` core functionality while providing domain-specific derivations. | ||
|
|
||
| ## Additional Resources | ||
|
|
||
| ::: {.callout-note} | ||
| ## Learn More | ||
|
|
||
| - [CDISC ADaM Implementation Guide](https://www.cdisc.org/standards/foundational/adam) - Official ADaM standard documentation and data structure specifications | ||
| - [{admiral} Documentation](https://pharmaverse.github.io/admiral/) - Comprehensive guide to admiral functions, workflows, and best practices | ||
| - [Pharmaverse E2E Clinical Reporting](https://pharmaverse.org/e2eclinical/) - Complete list of pharmaverse packages supporting the full clinical reporting pipeline | ||
| ::: | ||
|
|
||
| ## Common Derivations Across Examples | ||
|
|
||
| While each ADaM dataset has unique requirements, several derivation patterns appear across multiple examples: | ||
|
|
||
| - **Baseline derivations** - Identifying and flagging baseline records | ||
| - **Change from baseline** - Calculating analysis values relative to baseline | ||
| - **Analysis flags** - Creating indicators for analysis populations and key events | ||
| - **Date/time imputations** - Handling partial or missing dates | ||
| - **Treatment variables** - Deriving planned and actual treatment information | ||
| - **Parameter derivations** - Creating derived or calculated parameters | ||
|
|
||
| These common patterns are demonstrated throughout the examples, showing how `{admiral}` functions can be reused across different dataset types. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,43 @@ | ||
| --- | ||
| title: "Documents" | ||
| --- | ||
|
|
||
| ## Overview | ||
|
|
||
| This section contains examples for generating various document outputs from clinical trial data using pharmaverse packages. These examples demonstrate how to create professional reports, presentations, and other document formats commonly used in pharmaceutical research and regulatory submissions. | ||
|
|
||
| The examples leverage R's document generation capabilities combined with pharmaverse tools to automate the creation of formatted outputs. | ||
|
|
||
| ## Examples | ||
|
|
||
| The following document generation examples are available: | ||
|
|
||
| ### Word Documents | ||
|
|
||
| - **[DOCX Output](docx.qmd)** - Learn how to generate Microsoft Word documents from R, including tables, listings, and formatted text. This is particularly useful for creating clinical study reports and documentation that require Word format. | ||
|
|
||
| ### PowerPoint Presentations | ||
|
|
||
| - **[Auto Slider](autoslider.qmd)** - Create automated PowerPoint presentations with clinical trial outputs. This example demonstrates how to programmatically generate slides containing tables, figures, and analysis results, streamlining the creation of study presentations and data review meetings. | ||
|
|
||
| ## Use Cases | ||
|
|
||
| These document generation capabilities are valuable for: | ||
|
|
||
| - Clinical study reports (CSRs) | ||
| - Statistical analysis plans (SAPs) | ||
| - Data review meetings | ||
| - Regulatory submission documents | ||
| - Study team presentations | ||
| - Internal stakeholder communications | ||
|
|
||
| ## Getting Started | ||
|
|
||
| Each example demonstrates: | ||
|
|
||
| - Setting up document templates | ||
| - Populating documents with analysis results | ||
| - Formatting and styling outputs | ||
| - Automating repetitive document creation tasks | ||
|
|
||
| These tools can significantly reduce the time and effort required to produce professional documentation from your clinical trial analyses. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,58 @@ | ||
| --- | ||
| title: "eSubmission" | ||
| --- | ||
|
|
||
| ## Overview | ||
|
|
||
| This section provides examples for preparing electronic submissions (eSubmissions) to regulatory agencies using pharmaverse packages. eSubmissions are a critical component of the drug approval process, requiring properly formatted and validated datasets along with comprehensive documentation. | ||
|
|
||
| The examples demonstrate how to leverage pharmaverse tools to ensure your submissions meet regulatory requirements and follow industry best practices. | ||
|
|
||
| ## Examples | ||
|
|
||
| In our [eSubmission example](esub.qmd), you will find ever-evolving guidance on creating and checking all of the key clinical reporting components of an eSubmission when using R and open source | ||
|
|
||
| ### Analysis Data Reviewer's Guide | ||
|
|
||
| - **[ADRG (Analysis Data Reviewer's Guide)](esub.qmd)** - Learn how to create an Analysis Data Reviewer's Guide, a key document in regulatory submissions. The ADRG provides reviewers with essential information about the analysis datasets, data structures, and derivations used in the submission. This example demonstrates how to document dataset specifications, define.xml generation, and other critical components of a complete eSubmission package. | ||
|
|
||
| ## Key Components of eSubmissions | ||
|
|
||
| Successful electronic submissions typically include: | ||
|
|
||
| - **Datasets** - Properly formatted SDTM and ADaM datasets in SAS transport (XPT) format | ||
| - **Define.xml** - Machine-readable dataset and variable definitions | ||
| - **Reviewers Guides** - Comprehensive guide to the tabulation and analysis datasets and derivations | ||
| - **Readable Code** - Accessible and understandable TLG programs for key endpoints | ||
|
|
||
| ## Regulatory Standards | ||
|
|
||
| eSubmissions must comply with various regulatory standards and guidance: | ||
|
|
||
| - **CDISC Standards** - SDTM, ADaM, Define-XML specifications | ||
| - **FDA Guidance** - Study Data Technical Conformance Guide | ||
| - **ICH Guidelines** - International standards for data standards and eCTD | ||
|
|
||
| ## Key Packages Used | ||
|
|
||
| - **`{xportr}`** - Creating SAS transport files and performing eSub checks | ||
| - **`{metacore}`** - Managing metadata and specifications | ||
| - **`{metatools}`** - Working with metadata and specifications to format and check data | ||
| - **Various pharmaverse packages** - Dataset creation and validation | ||
|
|
||
| ## Getting Started | ||
|
|
||
| The examples demonstrate: | ||
|
|
||
| - Preparing analysis datasets for submission | ||
| - Generating required documentation | ||
| - Validating datasets against specifications | ||
| - Creating submission-ready packages | ||
|
|
||
| Following these examples will help ensure your submissions meet regulatory requirements and facilitate efficient review by regulatory agencies. | ||
|
|
||
| ## Resources | ||
|
|
||
| For more information on eSubmissions and regulatory requirements, consult: | ||
| - [CDISC website](https://www.cdisc.org/) | ||
| - [FDA Study Data Standards Resources](https://www.fda.gov/industry/fda-data-standards-advisory-board/study-data-standards-resources) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.