How do people in the Pilots collaborate, ensure accuracy and reproducibility while working across multiple companies, platforms, OS, timezone and skill sets?
renv
git, GitHub
CI/CD
LLMs
A drug company uses open source products, like R, to demonstrate that a drug is safe and effective.
How can the company ensure the analysis is reproducible when given to a regulatory agency?
renv.lock
renv.lock
is the anchor for everything.renv.lock
{
"R": {
"Version": "4.4.3",
"Repositories": [
{
"Name": "CRAN",
"URL": "https://packagemanager.posit.co/cran"
}
]
},
"Packages": {
"MASS": {
"Package": "MASS",
"Version": "7.3-65",
"Source": "Repository",
"Priority": "recommended",
"Date": "2025-02-19",
"Revision": "$Rev: 3681 $",
"Depends": [
"R (>= 4.4.0)",
"grDevices",
"graphics",
"stats",
"utils"
],
"Imports": [
"methods"
],
"Suggests": [
"lattice",
"nlme",
"nnet",
"survival"
],
"Authors@R": "c(person(\"Brian\", \"Ripley\", role = c(\"aut\", \"cre\", \"cph\"), email = \"Brian.Ripley@R-project.org\"), person(\"Bill\", \"Venables\", role = c(\"aut\", \"cph\")), person(c(\"Douglas\", \"M.\"), \"Bates\", role = \"ctb\"), person(\"Kurt\", \"Hornik\", role = \"trl\", comment = \"partial port ca 1998\"), person(\"Albrecht\", \"Gebhardt\", role = \"trl\", comment = \"partial port ca 1998\"), person(\"David\", \"Firth\", role = \"ctb\", comment = \"support functions for polr\"))",
"Description": "Functions and datasets to support Venables and Ripley, \"Modern Applied Statistics with S\" (4th edition, 2002).",
"Title": "Support Functions and Datasets for Venables and Ripley's MASS",
"LazyData": "yes",
"ByteCompile": "yes",
"License": "GPL-2 | GPL-3",
"URL": "http://www.stats.ox.ac.uk/pub/MASS4/",
"Contact": "<MASS@stats.ox.ac.uk>",
"NeedsCompilation": "yes",
"Author": "Brian Ripley [aut, cre, cph], Bill Venables [aut, cph], Douglas M. Bates [ctb], Kurt Hornik [trl] (partial port ca 1998), Albrecht Gebhardt [trl] (partial port ca 1998), David Firth [ctb] (support functions for polr)",
"Maintainer": "Brian Ripley <Brian.Ripley@R-project.org>",
"Repository": "CRAN"
}
...
Initializes a new renv project by creating a project-specific library and a lockfile.
Checks for any discrepancies between the state of the project’s library and the renv.lock
file.
Captures the state of your current project environment and writes it to the renv.lock
file.
Removes one or more packages from your project’s library, making it easy to manage unused dependencies.
We don’t need to deliver every package to regulatory agencies, e.g. as we have built custom solutions to help with our processes we realized these are not actually used in the analysis. How can we ignore them!?!
.renvignore
is a big win here! Just like a .gitignore
Don’t edit the renv.lock
file manually - use the nice functions!
Don’t be scarred to update to latest packages either - but use the nice functions!
Manually generated ADRG from pilot 3
🤖LLM generated ADRG in pilot 5
Our goals:
To maximize useful dev work,
to maximize code quality, and
to maximize code velocity.
Code moving between branches or a transision of “state.” A structured way for reviewing code
Code being deployed out to the world
Assemble Submission Pilot 5 files to meet eCTD specifications:
create-ectd-bundle.sh
# Define file and directory paths
ECTD_BUNDLE_DIR=submissions-pilot5-datasetjson-to-fda
ECTD_LETTER_DIR=${ECTD_BUNDLE_DIR}/m1/us
ECTD_ROOT_DIR=${ECTD_BUNDLE_DIR}/m5/datasets/rconsortiumpilot4container/analysis/adam
# additional paths ...
# Create directory structure for ectd bundle
mkdir -p "${ECTD_LETTER_DIR}"
mkdir -p "${ECTD_PROGRAMS_DIR}"
mkdir -p "${ECTD_ADAM_DATASETS_DIR}"
mkdir -p "${ECTD_SDTM_DATASETS_DIR}"
# example: copy helper fcns script
if [ -f "${PROGRAMS_SOURCE_DIR}/pilot5-helper-fcns.r" ]; then
cp "${PROGRAMS_SOURCE_DIR}/pilot5-helper-fcns.r" "${PROGRAMS_DESTINATION_DIR}/."
echo "pilot 5 helper script copied to ${PROGRAMS_DESTINATION_DIR}/pilot5-helper-fcns.r"
fi
# additional operations ...
push-ectd-bundle.sh
# Set up file paths
ECTD_REPO_DIR=submissions-pilot5-datasetjson-to-fda
# Navigate to clone of ECTD repo
cd "./${ECTD_REPO_DIR}"
echo "Open root of ECTD GitHub Repo"
# Commit updated bundle to repository
git add -A .
git config user.name github-actions
git config user.email github-actions@github.com
git commit -am "GH Action: Update Pilot 5 ECTD bundle"
git push --set-upstream origin main
echo "Updated ECTD bundle successfully to repository"
Run automatically on each push to main branch event
publish-ectd-bundle.yaml
Unlocking Collaborative Power with Git, GitHub CI/CD, and LLMs in Pharma