-
Notifications
You must be signed in to change notification settings - Fork 14
Closes #217: Add microbiology related SDTM (MB, MS, BE) #218
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
Merged
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
dd96ad3
add MS domain example (ms.R)
Gero1999 596cdc0
add ms.rda
Gero1999 4aca7dd
ms: order columns and add labels
Gero1999 093edc4
fix: env issues ms.R
Gero1999 a0fb2ff
ms: limit samples, treatments and change units
Gero1999 e719e91
mb: define MB domain based on MS domain info (ms)
Gero1999 ec70bf8
mb: define labels
Gero1999 317b96d
ms & mb: refine REFID and GRPID, rm from ms NHOID (organism)
Gero1999 03f890d
mb: remake domain defining organisms and samples
Gero1999 23a228c
ms: derive MS domain from MB domain (mb.R)
Gero1999 66ab626
ms: derive MS domain from MB domain (mb.R)
Gero1999 0c428d8
create a common source of truth for BE, MB and MS domains
Gero1999 6fd98da
use nested list and looping to create be, mb, and ms
Gero1999 2addb33
refactor: standardize funs, loop & list
Gero1999 21e2c23
fix: typo MSORRES
Gero1999 fcd4ce7
arrange metadata final preparation in 3 files: mb.R, ms.R, be.R
Gero1999 915fd20
run files and add metadata to /data (mb, be, ms)
Gero1999 b9093d4
specs.json: add as "microbiology" therapeutic area for MB, MS and BE
Gero1999 3923c90
codeowners: add datasets mb, ms, be in "others"
Gero1999 38d1e73
style_file: ms.R, mb.R
Gero1999 b1ca4ab
run create_sdtms_data.R: generates be, mb, ms docs
Gero1999 e8c1c8e
run create_sdtms_data.R: unexpected udpated files (dm_neuro, nv_neuro)
Gero1999 2872fb1
news: inform of new microbiology datasets
Gero1999 4b21746
rm: unneded R file
Gero1999 42c4229
Merge branch 'main' into 217-add-mb-ms-be
Gero1999 55a8e35
spelling: correct mispelling (Measuremet -> Measurement)
Gero1999 e0d65d9
spelling: update WORDLIST
Gero1999 de745d6
fix: potential issue with styler
Gero1999 1f3eaad
styler: fix check using last pkg version
Gero1999 f293d42
Merge branch 'main' into 217-add-mb-ms-be
Fanny-Gautier 574abeb
Apply suggestions from code review
Gero1999 763c93f
apply suggestions to mb.R & update ms data/documentation
Gero1999 04d34ad
change comments style based on admiraldev style guide
Gero1999 785d5ac
use STUDYID & USUBJIDs from pharmaversesdtm::dm
Gero1999 2e34909
fix: mispelling Micoba(c)terium, add to WORDLIST & space with styler
Gero1999 c698f5e
Merge branch 'main' into 217-add-mb-ms-be
Fanny-Gautier 73e9e31
update mb: apply MBORRES correct label & populate cultured BE samples…
Gero1999 062c3b1
Add Microbiology Datasets section to pkgdown
Gero1999 c5bb3f0
mv "Microbiology Datasets" after "Metabolism Datasets" in _pkgdown.yml
Gero1999 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
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 |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # This file is automatically generated by data-raw/create_sdtms_data.R. | ||
| # For updating it please edit inst/extdata/sdtms-specs.json and rerun create_sdtms_data.R. | ||
| # Manual edits are not recommended, as changes may be overwritten. | ||
| #' Biospecimen Events | ||
| #' | ||
| #' A synthetic SDTM BE domain representing specimen collection, aliquoting, and culturing events, with linkage to MB and MS domains | ||
| #' | ||
| #' @name be | ||
| #' @title Biospecimen Events | ||
| #' @keywords dataset microbiology | ||
| #' @description A synthetic SDTM BE domain representing specimen collection, aliquoting, and culturing events, with linkage to MB and MS domains | ||
| #' @docType data | ||
| #' @format A data frame with 13 columns: | ||
| #' \describe{ | ||
| #' \item{STUDYID}{Study Identifier} | ||
| #' \item{DOMAIN}{Domain Abbreviation} | ||
| #' \item{USUBJID}{Unique Subject Identifier} | ||
| #' \item{BESEQ}{Sequence Number} | ||
| #' \item{BEREFID}{Reference ID} | ||
| #' \item{BELNKID}{Link Identifier} | ||
| #' \item{BETERM}{Reported Term for the Biospecimen Event} | ||
| #' \item{BECAT}{Category for Biospecimen Event} | ||
| #' \item{BELOC}{Anatomical Location of Event} | ||
| #' \item{VISITNUM}{Visit Number} | ||
| #' \item{BEDTC}{Date/Time of Specimen Collection} | ||
| #' \item{BESTDTC}{Start Date/Time of Biospecimen Event} | ||
| #' \item{BEENDTC}{End Date/Time of Biospecimen Event} | ||
| #' } | ||
| #' | ||
| #' @source [Access the source of the Biospecimen Events dataset.](https://github.com/pharmaverse/pharmaversesdtm/blob/main/data/be.rda) | ||
| "be" |
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 |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # This file is automatically generated by data-raw/create_sdtms_data.R. | ||
| # For updating it please edit inst/extdata/sdtms-specs.json and rerun create_sdtms_data.R. | ||
| # Manual edits are not recommended, as changes may be overwritten. | ||
| #' Microbiology Specimen | ||
| #' | ||
| #' A synthetic SDTM MB domain representing microbiology findings and linkage to MS domain (ms) | ||
| #' | ||
| #' @name mb | ||
| #' @title Microbiology Specimen | ||
| #' @keywords dataset microbiology | ||
| #' @description A synthetic SDTM MB domain representing microbiology findings and linkage to MS domain (ms) | ||
| #' @docType data | ||
| #' @format A data frame with 21 columns: | ||
| #' \describe{ | ||
| #' \item{STUDYID}{Study Identifier} | ||
| #' \item{DOMAIN}{Domain Abbreviation} | ||
| #' \item{USUBJID}{Unique Subject Identifier} | ||
| #' \item{MBSEQ}{Sequence Number} | ||
| #' \item{MBGRPID}{Group ID} | ||
| #' \item{MBREFID}{Reference ID} | ||
| #' \item{MBLNKGRP}{Link Group ID} | ||
| #' \item{MBTESTCD}{Microbiology Test or Finding Short Name} | ||
| #' \item{MBTEST}{Microbiology Test or Finding Name} | ||
| #' \item{MBTSTDTL}{Measurement, Test or Examination Detail} | ||
| #' \item{MBORRES}{Result or Finding in Original Units} | ||
| #' \item{MBORRESU}{Original Units} | ||
| #' \item{MBRSLSCL}{Result Scale} | ||
| #' \item{MBSTRESC}{Result or Finding in Standard Format} | ||
| #' \item{MBSTRESN}{Numeric Result/Finding in Standard Units} | ||
| #' \item{MBSTRESU}{Standard Units} | ||
| #' \item{MBSPEC}{Specimen Material Type} | ||
| #' \item{MBLOC}{Specimen Collection Location} | ||
| #' \item{MBMETHOD}{Method of Test or Examination} | ||
| #' \item{VISITNUM}{Visit Number} | ||
Fanny-Gautier marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| #' \item{MBDTC}{Date/Time of Collection} | ||
| #' } | ||
| #' | ||
| #' @source [Access the source of the Microbiology Specimen dataset.](https://github.com/pharmaverse/pharmaversesdtm/blob/main/data/mb.rda) | ||
| #' @details Contains a set of 6 unique Test Short Names and Test Names: \tabular{ll}{ | ||
| #' \strong{MBTESTCD} \tab \strong{MBTEST} \cr | ||
| #' GMNCOC \tab Gram Negative Cocci \cr | ||
| #' GNROD \tab Gram Negative Rods \cr | ||
| #' GPRCOC \tab Gram Positive Cocci \cr | ||
| #' MCCOLCNT \tab Colony Count \cr | ||
| #' MCORGIDN \tab Microbial Organism Identification \cr | ||
| #' MTBCMPLX \tab Mycobacterium tuberculosis complex | ||
| #' } | ||
|
|
||
| "mb" | ||
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 |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # This file is automatically generated by data-raw/create_sdtms_data.R. | ||
| # For updating it please edit inst/extdata/sdtms-specs.json and rerun create_sdtms_data.R. | ||
| # Manual edits are not recommended, as changes may be overwritten. | ||
| #' Microbiology Susceptibility | ||
| #' | ||
| #' A synthetic SDTM MS domain with susceptibility results and linkage to MB domain (mb) | ||
| #' | ||
| #' @name ms | ||
| #' @title Microbiology Susceptibility | ||
| #' @keywords dataset microbiology | ||
| #' @description A synthetic SDTM MS domain with susceptibility results and linkage to MB domain (mb) | ||
| #' @docType data | ||
| #' @format A data frame with 23 columns: | ||
| #' \describe{ | ||
| #' \item{STUDYID}{Study Identifier} | ||
| #' \item{DOMAIN}{Domain Abbreviation} | ||
| #' \item{USUBJID}{Unique Subject Identifier} | ||
| #' \item{MSSEQ}{Sequence Number} | ||
| #' \item{MSREFID}{Reference ID} | ||
| #' \item{NHOID}{Non-host Organism ID} | ||
| #' \item{MSGRPID}{Group ID} | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you move |
||
| #' \item{MSLNKID}{Link ID} | ||
| #' \item{MSTESTCD}{Short Name of Assessment} | ||
| #' \item{MSTEST}{Name of Assessment} | ||
| #' \item{MSAGENT}{Agent Name} | ||
| #' \item{MSCONC}{Agent Concentration} | ||
| #' \item{MSCONCU}{Agent Concentration Units} | ||
| #' \item{MSORRES}{Result or Finding in Original Units} | ||
| #' \item{MSORRESU}{Original Units} | ||
| #' \item{MSSTRESC}{Result or Finding in Standard Format} | ||
| #' \item{MSSTRESN}{Numeric Result/Finding in Standard Units} | ||
| #' \item{MSSTRESU}{Standard Units} | ||
| #' \item{MSSPEC}{Specimen Material Type} | ||
| #' \item{MSLOC}{Location Used for the Measurement} | ||
| #' \item{MSMETHOD}{Method of Test or Examination} | ||
| #' \item{VISITNUM}{Visit Number} | ||
| #' \item{MSDTC}{Date/Time of Collection} | ||
| #' } | ||
| #' | ||
| #' @source [Access the source of the Microbiology Susceptibility dataset.](https://github.com/pharmaverse/pharmaversesdtm/blob/main/data/ms.rda) | ||
| #' @details Contains a set of 3 unique Test Short Names and Test Names: \tabular{ll}{ | ||
| #' \strong{MSTESTCD} \tab \strong{MSTEST} \cr | ||
| #' DIAZOINH \tab Diameter of the Zone of Inhibition\cr | ||
| #' MIC \tab Minimum Inhibitory Concentration \cr | ||
| #' MICROSUS \tab Microbial Susceptibility | ||
| #' } | ||
|
|
||
| "ms" | ||
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 |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # This file only processes and saves the BE domain from that shared data source. | ||
| # Dataset: BE | ||
| # A synthetic SDTM BE domain representing specimen collection, aliquoting | ||
| # and culturing events with linkage to Microbiology Specimen (mb) and Microbiology Susceptibility (ms) domains | ||
|
|
||
| # NOTE: To add or modify records in the BE domain, you must edit the data structure in 'mb.R'. | ||
| # All synthetic microbiology data (patients, specimens, results) are defined in 'mb.R'. | ||
|
|
||
| # Source microbiology synthetic data | ||
| source("data-raw/mb.R") | ||
|
|
||
| be <- be %>% | ||
| # Order columns | ||
| select( | ||
| STUDYID, | ||
| DOMAIN, | ||
| USUBJID, | ||
| BESEQ, | ||
| BEREFID, | ||
| BELNKID, | ||
| BETERM, | ||
| BECAT, | ||
| BELOC, | ||
| VISITNUM, | ||
| BEDTC, | ||
| BESTDTC, | ||
| BEENDTC | ||
| ) %>% | ||
| # Label columns (as per CDISC SDTM v3.4) | ||
| set_variable_labels( | ||
| STUDYID = "Study Identifier", | ||
| DOMAIN = "Domain Abbreviation", | ||
| USUBJID = "Unique Subject Identifier", | ||
| BESEQ = "Sequence Number", | ||
| BEREFID = "Reference ID", | ||
| BELNKID = "Link Identifier", | ||
| BETERM = "Reported Term for the Biospecimen Event", | ||
| BECAT = "Category for Biospecimen Event", | ||
| BELOC = "Anatomical Location of Event", | ||
| VISITNUM = "Visit Number", | ||
| BEDTC = "Date/Time of Specimen Collection", | ||
| BESTDTC = "Start Date/Time of Biospecimen Event", | ||
| BEENDTC = "End Date/Time of Biospecimen Event" | ||
| ) | ||
|
|
||
| # Save dataset | ||
| usethis::use_data(be, overwrite = TRUE, internal = FALSE) |
Oops, something went wrong.
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.