Skip to content
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

Closes #225, Closes #228, Closes #229: Updates on Navbar Description and admiral core impacts #226

Merged
merged 36 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
744f6e8
add templates workflow
dgrassellyb Sep 5, 2023
01d31ef
fix typo
dgrassellyb Sep 5, 2023
73ebaac
trigger
dgrassellyb Sep 6, 2023
7dda7e6
trigger
dgrassellyb Sep 7, 2023
2b30897
trigger
dgrassellyb Sep 7, 2023
e9666c3
trigger
dgrassellyb Sep 7, 2023
6ae6fc7
trigger
dgrassellyb Sep 7, 2023
d975e72
Update templates.yml
dgrassellyb Sep 11, 2023
f89fe0f
Update templates.yml
dgrassellyb Sep 11, 2023
cfda9eb
Merge pull request #224 from pharmaverse/618_templates_action
ahasoplakus Sep 18, 2023
e513ede
#225 included Lee's name
arjoon-r Nov 3, 2023
a26dc86
included Lee's name
arjoon-r Nov 6, 2023
05e3079
#225
arjoon-r Nov 6, 2023
8f63ac1
#225
arjoon-r Nov 6, 2023
0555ab6
Update admiralvaccine-package.Rd
arjoon-r Nov 6, 2023
f684131
Update ad_adface.R
arjoon-r Nov 7, 2023
18cd609
Update adface.Rmd
arjoon-r Nov 7, 2023
9b63408
Update ad_adce.R
arjoon-r Nov 14, 2023
a6d3928
Update ad_adface.R
arjoon-r Nov 14, 2023
fa11a12
Update ad_adis.R
arjoon-r Nov 14, 2023
dbce081
Update derive_fever_records.R
arjoon-r Nov 14, 2023
1538438
Update test-derive_fever_records.R
arjoon-r Nov 14, 2023
501b7d9
Update adce.Rmd
arjoon-r Nov 14, 2023
75dc5ed
Update adface.Rmd
arjoon-r Nov 14, 2023
2004811
Update adis.Rmd
arjoon-r Nov 14, 2023
c0639d1
#229
arjoon-r Nov 30, 2023
c4214d9
#229
arjoon-r Nov 30, 2023
1e03b30
#229
arjoon-r Nov 30, 2023
a3ec48f
#229
arjoon-r Nov 30, 2023
33f7858
#229
arjoon-r Nov 30, 2023
2875275
#229
arjoon-r Nov 30, 2023
8914613
#228 Replace test data from pharmaversesdtm
ahasoplakus Dec 20, 2023
f398584
#228 Replace example test data with pharmaversesdtm
ahasoplakus Dec 20, 2023
0256e27
Merge branch 'main' into 225_navbar_update_and_description
ahasoplakus Dec 21, 2023
1779111
Fix links and templates
ahasoplakus Dec 21, 2023
02541b4
Fix styling
ahasoplakus Dec 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@
^admiralvaccine\.Rcheck$
^admiralvaccine.*\.tar\.gz$
^admiralvaccine.*\.tgz$
^doc$
18 changes: 18 additions & 0 deletions .github/workflows/templates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Check Templates

on:
workflow_dispatch:
pull_request:
branches:
- main
- devel

jobs:
templates:
name: Check Templates
uses: pharmaverse/admiralci/.github/workflows/check-templates.yml@main
secrets: inherit
with:
r-version: "4.1"
push-templates-data: true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@ admiralvaccine*.tar.gz
admiralvaccine*.tgz

.Rproj.user
/doc/
/Meta/
11 changes: 6 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Title: Vaccine Extension Package for ADaM in 'R' Asset Library
Version: 0.1.0
Authors@R: c(
person("Sukalpo", "Saha", email = "[email protected]", role = c("aut", "cre")),
person("Vikram", "S", email = "vikram.s@pfizer.com", role = "aut"),
person("Arjun", "Rubalingam", email = "arjun.rubalingam@pfizer.com", role = "aut"),
person("Ben", "Straub", email = "[email protected]", role = "aut"),
person("Arjun", "Rubalingam", role = "aut"),
person("Vikram", "S", role = "aut"),
person("Dhivya", "Kanagaraj", role = "aut"),
person("Federico", "Baratin", role = "aut"),
person("Yamini", "Purna Bollu", role = "aut"),
Expand All @@ -18,6 +18,7 @@ Authors@R: c(
person("Ankur", "Jindal", role = "ctb"),
person("Jayashree", "V", role = "ctb"),
person("Jagadish", "Katam", role = "ctb"),
person("Lee", "Armishaw", role = "ctb"),
person("Andrea", "Pammolli", role = "ctb"),
person("Daniele", "Bottigliengo", role = "ctb"),
person("Ranya", "Ben Hsain", role = "ctb"),
Expand Down Expand Up @@ -49,8 +50,8 @@ BugReports: https://github.com/pharmaverse/admiralvaccine/issues/
Depends:
R (>= 3.5)
Imports:
admiral (>= 0.10.2),
admiraldev (>= 0.4.0),
admiral (>= 1.0.0),
admiraldev (>= 1.0.0),
assertthat (>= 0.2.1),
dplyr (>= 0.8.4),
hms (>= 0.5.3),
Expand All @@ -64,7 +65,6 @@ Imports:
tidyr (>= 1.0.2),
tidyselect (>= 1.0.0)
Suggests:
admiral.test,
covr,
devtools,
diffdf,
Expand All @@ -73,6 +73,7 @@ Suggests:
lintr,
methods,
miniUI,
pharmaversesdtm,
pkgdown,
rmarkdown,
roxygen2,
Expand Down
109 changes: 15 additions & 94 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -1,118 +1,39 @@
#' Immunogenicity Specimen
#' Subject Level Analysis Dataset - Vaccine Specific
#'
#' A SDTM IS dataset
#'
#' @keywords dataset
#' @family dataset
#' @source
#' (\url{https://github.com/pharmaverse/admiralvaccine/tree/main/inst/create_vx_data/vx_is.R})
"vx_is"

#' Clinical Events
#'
#' A SDTM CE dataset
#'
#' @keywords dataset
#' @family dataset
#' @source
#' (\url{https://github.com/pharmaverse/admiralvaccine/tree/main/inst/create_vx_data/vx_ce.R})
"vx_ce"

#' Demographics
#'
#' A SDTM DM dataset
#'
#' @keywords dataset
#' @family dataset
#' @source
#' (\url{https://github.com/pharmaverse/admiralvaccine/tree/main/inst/create_vx_data/vx_dm.R})
"vx_dm"

#' Exposure
#'
#' A SDTM EX dataset
#'
#' @keywords dataset
#' @family dataset
#' @source
#' (\url{https://github.com/pharmaverse/admiralvaccine/tree/main/inst/create_vx_data/vx_ex.R})
"vx_ex"

#' Findings About Clinical Events
#'
#' A SDTM FACE dataset
#'
#' @keywords dataset
#' @family dataset
#' @source
#' (\url{https://github.com/pharmaverse/admiralvaccine/tree/main/inst/create_vx_data/vx_face.R})
"vx_face"

#' Vital Signs
#'
#' A SDTM VS dataset
#'
#' @keywords dataset
#' @family dataset
#' @source
#' (\url{https://github.com/pharmaverse/admiralvaccine/tree/main/inst/create_vx_data/vx_vs.R})
"vx_vs"

#' Subject Level Analysis - Vaccine Specific
#'
#' A subject level analysis dataset
#' An example Subject Level analysis dataset
#'
#' @keywords dataset
#' @family dataset
#' @source
#' (\url{https://github.com/pharmaverse/admiralvaccine/tree/main/inst/templates/ad_adsl.R})
"vx_adsl"
"admiralvaccine_adsl"

#' Supplemental Immunogenicity Specimen
#' Clinical Events Analysis Dataset - Vaccine Specific
#'
#' A SDTM Supplementary IS dataset
#' An example Clinical Events analysis dataset
#'
#' @keywords dataset
#' @family dataset
#' @source
#' (\url{https://github.com/pharmaverse/admiralvaccine/tree/main/inst/create_vx_data/vx_suppis.R})
"vx_suppis"
#' (\url{https://github.com/pharmaverse/admiralvaccine/tree/main/inst/templates/ad_adce.R})
"admiralvaccine_adce"

#' Supplemental Clinical Events
#' Findings About Clinical Events Analysis Dataset - Vaccine Specific
#'
#' A SDTM Supplementary CE dataset
#'
#' @keywords dataset
#' @family dataset
#' @source
#' (\url{https://github.com/pharmaverse/admiralvaccine/tree/main/inst/create_vx_data/vx_suppce.R})
"vx_suppce"

#' Supplemental Demographics
#'
#' A SDTM Supplementary DM dataset
#'
#' @keywords dataset
#' @family dataset
#' @source
#' (\url{https://github.com/pharmaverse/admiralvaccine/tree/main/inst/create_vx_data/vx_suppdm.R})
"vx_suppdm"

#' Supplemental Exposure
#' A SDTM Supplementary EX dataset
#' An example Findings About Clinical Events analysis dataset
#'
#' @keywords dataset
#' @family dataset
#' @source
#' (\url{https://github.com/pharmaverse/admiralvaccine/tree/main/inst/create_vx_data/vx_suppex.R})
"vx_suppex"
#' (\url{https://github.com/pharmaverse/admiralvaccine/tree/main/inst/templates/ad_adface.R})
"admiralvaccine_adface"

#' Supplemental Findings About Clinical Events
#' Immunogenicity Specimen Assessments Analysis Dataset - Vaccine Specific
#'
#' A SDTM Supplementary FACE dataset
#' An example Immunogenicity Specimen Assessments analysis dataset
#'
#' @keywords dataset
#' @family dataset
#' @source
#' (\url{https://github.com/pharmaverse/admiralvaccine/tree/main/inst/create_vx_data/vx_suppface.R})
"vx_suppface"
#' (\url{https://github.com/pharmaverse/admiralvaccine/tree/main/inst/templates/ad_adis.R})
"admiralvaccine_adis"
2 changes: 1 addition & 1 deletion R/derive_fever_records.R
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ derive_fever_records <- function(dataset,
),
FASTRESC = FAORRES
) %>%
select(-(starts_with("VS")), VSSTRESN)
select(-(starts_with("VS")), VSSTRESN) # nolint

bind_rows(dataset, fev_rec)
} else if (row_rec > 0) {
Expand Down
13 changes: 7 additions & 6 deletions R/derive_vars_merged_vaccine.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@
#' library(tibble)
#' library(admiral)
#' library(dplyr)
#' library(pharmaversesdtm)
#'
#' derive_vars_merged_vaccine(
#' dataset = vx_face,
#' dataset_ex = vx_ex,
#' dataset = face_vaccine,
#' dataset_ex = ex_vaccine,
#' dataset_supp = NULL,
#' dataset_suppex = NULL,
#' by_vars_sys = exprs(USUBJID, FATPTREF = EXLNKGRP),
Expand All @@ -75,10 +76,10 @@
#' head(10)
#'
#' derive_vars_merged_vaccine(
#' dataset = vx_face,
#' dataset_ex = vx_ex,
#' dataset_supp = vx_suppface,
#' dataset_suppex = vx_suppex,
#' dataset = face_vaccine,
#' dataset_ex = ex_vaccine,
#' dataset_supp = suppface_vaccine,
#' dataset_suppex = suppex_vaccine,
#' by_vars_sys = exprs(USUBJID, FATPTREF = EXLNKGRP),
#' by_vars_adms = exprs(USUBJID, FATPTREF = EXLNKGRP, FALOC = EXLOC, FALAT = EXLAT),
#' ex_vars = exprs(EXTRT, EXDOSE, EXDOSU, EXSTDTC, EXENDTC)
Expand Down
2 changes: 1 addition & 1 deletion R/post_process_reacto.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ post_process_reacto <- function(dataset,
favars <- names(dataset %>% select(starts_with("FA"), FATESTCD))

dataset %>% mutate(across(
favars,
all_of(favars),
function(x) ifelse(!!filter_dataset, NA, x)
))
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ for vaccine ADaMs.
## References and Documentation

- Please refer to the [{admiral} References and
Documentation](https://pharmaverse.github.io/admiral/main/)
Documentation](https://pharmaverse.github.io/admiral/)

## R Versions

Expand Down
9 changes: 9 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ reference:
navbar:
structure:
left: [getstarted, reference, articles, news]
right: [search, slack, newissue, github]
components:
getstarted:
text: Get Started
Expand All @@ -62,3 +63,11 @@ navbar:
href: articles/adce.html
- text: Creating ADFACE
href: articles/adface.html
slack:
icon: fa-slack
href: https://app.slack.com/client/T028PB489D3/C02M8KN8269
aria-label: Slack
newissue:
icon: fa-bug
href: https://github.com/pharmaverse/admiralvaccine/issues/new/choose
aria-label: New Issue
Binary file added data/admiralvaccine_adce.rda
Binary file not shown.
Binary file added data/admiralvaccine_adface.rda
Binary file not shown.
Binary file added data/admiralvaccine_adis.rda
Binary file not shown.
Binary file added data/admiralvaccine_adsl.rda
Binary file not shown.
Binary file removed data/vx_adsl.rda
Binary file not shown.
Binary file removed data/vx_ce.rda
Binary file not shown.
Binary file removed data/vx_dm.rda
Binary file not shown.
Binary file removed data/vx_ex.rda
Binary file not shown.
Binary file removed data/vx_face.rda
Binary file not shown.
Binary file removed data/vx_is.rda
Binary file not shown.
Binary file removed data/vx_suppce.rda
Binary file not shown.
Binary file removed data/vx_suppdm.rda
Binary file not shown.
Binary file removed data/vx_suppex.rda
Binary file not shown.
Binary file removed data/vx_suppface.rda
Binary file not shown.
Binary file removed data/vx_suppis.rda
Binary file not shown.
Binary file removed data/vx_vs.rda
Binary file not shown.
25 changes: 17 additions & 8 deletions inst/templates/ad_adce.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ library(admiral)
library(dplyr)
library(lubridate)
library(admiralvaccine)
library(pharmaversesdtm)


# Load source datasets
Expand All @@ -15,12 +16,12 @@ library(admiralvaccine)
# as needed and assign to the variables below.
# For illustration purposes read in admiral test data

data("vx_ce")
data("vx_adsl")
data("ce_vaccine")
data("admiralvaccine_adsl")


adsl <- vx_adsl
ce <- vx_ce
adsl <- admiralvaccine_adsl
ce <- ce_vaccine


# When SAS datasets are imported into R using haven::read_sas(), missing
Expand Down Expand Up @@ -84,7 +85,8 @@ adce03 <-
adce02,
dataset_add = adperiods,
by_vars = exprs(STUDYID, USUBJID),
filter_join = ASTDT >= APERSDT & ASTDT <= APEREDT
filter_join = ASTDT >= APERSDT & ASTDT <= APEREDT,
join_type = "all"
) %>%
mutate(
APERSTDY = as.integer(ASTDT - APERSDT) + 1,
Expand Down Expand Up @@ -148,7 +150,14 @@ adce <- adce05 %>%
)


# Save output
admiralvaccine_adce <- adce

dir <- tempdir() # Change to whichever directory you want to save the dataset in
saveRDS(adce, file = file.path(dir, "adce.rds"), compress = "bzip2")
# Save output ----

dir <- tools::R_user_dir("admiralvaccine_templates_data", which = "cache")
# Change to whichever directory you want to save the dataset in
if (!file.exists(dir)) {
# Create the folder
dir.create(dir, recursive = TRUE, showWarnings = FALSE)
}
save(admiralvaccine_adce, file = file.path(dir, "adce.rda"), compress = "bzip2")
Loading
Loading