Skip to content

Commit

Permalink
Merge pull request #26 from OdyOSG/shiny2
Browse files Browse the repository at this point in the history
Shiny2
  • Loading branch information
mdlavallee92 authored Nov 7, 2023
2 parents 820c2dc + 03b5cff commit 63d073c
Show file tree
Hide file tree
Showing 14 changed files with 3,185 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ hidden/
results.zip

scratchDiagnostics
shiny/data/
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# EHDEN HMB v0.2.0

* Add shiny app to preview results

# EHDEN HMB v0.1.8

* Fix pid and std file names in cohort definitions, changes anticipated build order
Expand Down
5 changes: 5 additions & 0 deletions docs/howToRun.html
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ <h2 id="toc-title">On this page</h2>
<li><a href="#troubleshooting-1" id="toc-troubleshooting-1" class="nav-link" data-scroll-target="#troubleshooting-1"><span class="header-section-number">2.3.1</span> Troubleshooting</a></li>
</ul></li>
<li><a href="#results-folder" id="toc-results-folder" class="nav-link" data-scroll-target="#results-folder"><span class="header-section-number">2.4</span> Results Folder</a></li>
<li><a href="#review-results" id="toc-review-results" class="nav-link" data-scroll-target="#review-results"><span class="header-section-number">2.5</span> Review Results</a></li>
</ul></li>
</ul>
</nav>
Expand Down Expand Up @@ -391,6 +392,10 @@ <h3 data-number="2.3.1" class="anchored" data-anchor-id="troubleshooting-1"><spa
<section id="results-folder" class="level2" data-number="2.4">
<h2 data-number="2.4" class="anchored" data-anchor-id="results-folder"><span class="header-section-number">2.4</span> Results Folder</h2>
<p>Following successful execution of the study, each database will have its own sub-folder within results. There will be a further 14 subfolders containing results from the execution underneath the database. Within each of these folders there will be a combination of <code>csv</code>, <code>rds</code> and <code>parquet</code> (only for treatmentHistory) that contain the results. You may review these files individually if you wish. Instructions on how to share the results are maintained in the contribution tab of the website.</p>
</section>
<section id="review-results" class="level2" data-number="2.5">
<h2 data-number="2.5" class="anchored" data-anchor-id="review-results"><span class="header-section-number">2.5</span> Review Results</h2>
<p>In version 0.2 of the study code, we have added code to launch a shiny app to locally review results prior to distributing them to the study host. In order to run the shiny app the user needs to prep the data for the app. Navigate to <code>extras/PreviewResults.R</code> and run the first step. This will take all databases run in the results section and build a data folder for the shiny app. This data folder is ignored to prevent accidental commits back to github. Next launch the shiny app.</p>


</section>
Expand Down
9 changes: 8 additions & 1 deletion docs/news.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@
<h2 id="toc-title">On this page</h2>

<ul>
<li><a href="#ehden-hmb-v0.1.8" id="toc-ehden-hmb-v0.1.8" class="nav-link active" data-scroll-target="#ehden-hmb-v0.1.8">EHDEN HMB v0.1.8</a></li>
<li><a href="#ehden-hmb-v0.2.0" id="toc-ehden-hmb-v0.2.0" class="nav-link active" data-scroll-target="#ehden-hmb-v0.2.0">EHDEN HMB v0.2.0</a></li>
<li><a href="#ehden-hmb-v0.1.8" id="toc-ehden-hmb-v0.1.8" class="nav-link" data-scroll-target="#ehden-hmb-v0.1.8">EHDEN HMB v0.1.8</a></li>
<li><a href="#ehden-hmb-v0.1.7" id="toc-ehden-hmb-v0.1.7" class="nav-link" data-scroll-target="#ehden-hmb-v0.1.7">EHDEN HMB v0.1.7</a></li>
<li><a href="#ehden-hmb-v0.1.6" id="toc-ehden-hmb-v0.1.6" class="nav-link" data-scroll-target="#ehden-hmb-v0.1.6">EHDEN HMB v0.1.6</a></li>
<li><a href="#ehden-hmb-v0.1.5" id="toc-ehden-hmb-v0.1.5" class="nav-link" data-scroll-target="#ehden-hmb-v0.1.5">EHDEN HMB v0.1.5</a></li>
Expand Down Expand Up @@ -194,6 +195,12 @@ <h1 class="title">News</h1>

</header>

<section id="ehden-hmb-v0.2.0" class="level1">
<h1>EHDEN HMB v0.2.0</h1>
<ul>
<li>Add shiny app to preview results</li>
</ul>
</section>
<section id="ehden-hmb-v0.1.8" class="level1">
<h1>EHDEN HMB v0.1.8</h1>
<ul>
Expand Down
9 changes: 8 additions & 1 deletion docs/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"href": "news.html",
"title": "News",
"section": "",
"text": "EHDEN HMB v0.1.8\n\nFix pid and std file names in cohort definitions, changes anticipated build order\n\n\n\nEHDEN HMB v0.1.7\n\nCorrect event in time to procedure intervention\n\n\n\nEHDEN HMB v0.1.6\n\nMinor bug fix to treatment patterns analysis\nCorrect typo in functions\n\n\n\nEHDEN HMB v0.1.5\n\nCorrect bug in analysis settings (Issue #12)\nUpdate package website\nAdd yearly incidence to Incidence Analysis (Issue #13)\nAdd R scripts for data exchange and CD preview (Issue #14)\nupdate cohort definitions from Siir\n\ncopperIUDproc\ncopperIUDdrug\ndisorderOfOvary\n\n\n\n\nEHDEN HMB v0.1.4\n\nFix bug in baseline characteristics; typo in analysis settings (Issue #10)\nCorrections to the study website\n\n\n\nEHDEN HMB v0.1.3\n\nUpdate cohort definitions\n\nadd baseline procedures\nadd baseline drugs\n\nInclude procedure prevalence at baseline [-365,0]\n\n\n\nEHDEN HMB v0.1.2\n\nUpdate cohort definitions\n\nrerun drug exposure with Capr\nrerun procedures with Capr\nadd time restraints to nsaids\nadd hmb cohort without hysterectomy censor\n\nAdd secondary treatment sequence including procedures\n\n\n\nEHDEN HMB v0.1.1\n\nAdd study website\nUpdate cohort definitions for denominator\nAddition of executeStudy.R file to automate execution\nadd age strata [under 30, 30-45, 45-55]\n\n\n\nEHDEN HMB v0.1.0\n\nFirst release of study code for EHDEN HMB\n\nAdd Incidence Analysis\nAdd Baseline Characteristics\nAdd Treatment Patterns\nAdd Procedure Analysis\n\n\n\n\nEHDEN HMB v0.0.6\n\nAdd file StoreResults to upload cohort diagnostics zip to aws s3 bucket\nUpdate KeyringSetup to match Ulysses\nUpdate renv.lock to add aws.s3 and Ulysses v0.0.2\nminor correction to study task files\n\n\n\nEHDEN HMB v0.0.5\n\nAdd in renv\nminor correction to HMB cohort for cohort diagnostics\n\n\n\nEHDEN HMB v0.0.4\n\nFix errors in KeyringSetup.R file\nFix cohort diagnostics to use integer64 with id in cohortDefinitionSet\n\n\n\nEHDEN HMB v0.0.3\n\nUpdate How to run file with installation instructions for usethis and Ulysses\nFix extras/KeyringSetup.R file to correctly set up credentials and check them\nEdit startSnowflakeSession function to handle string split of workDatabaseSchema\nEdit study tasks to order snowflake start correctly and close connection at end of file\n\n\n\nEHDEN HMB v0.0.2\n\nUpdate cohort definition for HMB to fix error\nAdd cohort diagnostics script\nAdd How to Run file and key ring file\n\n\n\nEHDEN HMB v0.0.1\n\nAdd HMB cohort definition to repo\nStart preparing documentation about study\nInitialize OHDSI study\nAdd NEWS.md to"
"text": "EHDEN HMB v0.2.0\n\nAdd shiny app to preview results\n\n\n\nEHDEN HMB v0.1.8\n\nFix pid and std file names in cohort definitions, changes anticipated build order\n\n\n\nEHDEN HMB v0.1.7\n\nCorrect event in time to procedure intervention\n\n\n\nEHDEN HMB v0.1.6\n\nMinor bug fix to treatment patterns analysis\nCorrect typo in functions\n\n\n\nEHDEN HMB v0.1.5\n\nCorrect bug in analysis settings (Issue #12)\nUpdate package website\nAdd yearly incidence to Incidence Analysis (Issue #13)\nAdd R scripts for data exchange and CD preview (Issue #14)\nupdate cohort definitions from Siir\n\ncopperIUDproc\ncopperIUDdrug\ndisorderOfOvary\n\n\n\n\nEHDEN HMB v0.1.4\n\nFix bug in baseline characteristics; typo in analysis settings (Issue #10)\nCorrections to the study website\n\n\n\nEHDEN HMB v0.1.3\n\nUpdate cohort definitions\n\nadd baseline procedures\nadd baseline drugs\n\nInclude procedure prevalence at baseline [-365,0]\n\n\n\nEHDEN HMB v0.1.2\n\nUpdate cohort definitions\n\nrerun drug exposure with Capr\nrerun procedures with Capr\nadd time restraints to nsaids\nadd hmb cohort without hysterectomy censor\n\nAdd secondary treatment sequence including procedures\n\n\n\nEHDEN HMB v0.1.1\n\nAdd study website\nUpdate cohort definitions for denominator\nAddition of executeStudy.R file to automate execution\nadd age strata [under 30, 30-45, 45-55]\n\n\n\nEHDEN HMB v0.1.0\n\nFirst release of study code for EHDEN HMB\n\nAdd Incidence Analysis\nAdd Baseline Characteristics\nAdd Treatment Patterns\nAdd Procedure Analysis\n\n\n\n\nEHDEN HMB v0.0.6\n\nAdd file StoreResults to upload cohort diagnostics zip to aws s3 bucket\nUpdate KeyringSetup to match Ulysses\nUpdate renv.lock to add aws.s3 and Ulysses v0.0.2\nminor correction to study task files\n\n\n\nEHDEN HMB v0.0.5\n\nAdd in renv\nminor correction to HMB cohort for cohort diagnostics\n\n\n\nEHDEN HMB v0.0.4\n\nFix errors in KeyringSetup.R file\nFix cohort diagnostics to use integer64 with id in cohortDefinitionSet\n\n\n\nEHDEN HMB v0.0.3\n\nUpdate How to run file with installation instructions for usethis and Ulysses\nFix extras/KeyringSetup.R file to correctly set up credentials and check them\nEdit startSnowflakeSession function to handle string split of workDatabaseSchema\nEdit study tasks to order snowflake start correctly and close connection at end of file\n\n\n\nEHDEN HMB v0.0.2\n\nUpdate cohort definition for HMB to fix error\nAdd cohort diagnostics script\nAdd How to Run file and key ring file\n\n\n\nEHDEN HMB v0.0.1\n\nAdd HMB cohort definition to repo\nStart preparing documentation about study\nInitialize OHDSI study\nAdd NEWS.md to"
},
{
"objectID": "contribution.html",
Expand Down Expand Up @@ -215,5 +215,12 @@
"title": "How-to-Run Study",
"section": "2.4 Results Folder",
"text": "2.4 Results Folder\nFollowing successful execution of the study, each database will have its own sub-folder within results. There will be a further 14 subfolders containing results from the execution underneath the database. Within each of these folders there will be a combination of csv, rds and parquet (only for treatmentHistory) that contain the results. You may review these files individually if you wish. Instructions on how to share the results are maintained in the contribution tab of the website."
},
{
"objectID": "howToRun.html#review-results",
"href": "howToRun.html#review-results",
"title": "How-to-Run Study",
"section": "2.5 Review Results",
"text": "2.5 Review Results\nIn version 0.2 of the study code, we have added code to launch a shiny app to locally review results prior to distributing them to the study host. In order to run the shiny app the user needs to prep the data for the app. Navigate to extras/PreviewResults.R and run the first step. This will take all databases run in the results section and build a data folder for the shiny app. This data folder is ignored to prevent accidental commits back to github. Next launch the shiny app."
}
]
5 changes: 5 additions & 0 deletions documentation/howToRun.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,8 @@ The shiny app rendered from `CohortDiagnostics` relies on the OHDSI package `Ohd
## Results Folder

Following successful execution of the study, each database will have its own sub-folder within results. There will be a further 14 subfolders containing results from the execution underneath the database. Within each of these folders there will be a combination of `csv`, `rds` and `parquet` (only for treatmentHistory) that contain the results. You may review these files individually if you wish. Instructions on how to share the results are maintained in the contribution tab of the website.


## Review Results

In version 0.2 of the study code, we have added code to launch a shiny app to locally review results prior to distributing them to the study host. In order to run the shiny app the user needs to prep the data for the app. Navigate to `extras/PreviewResults.R` and run the first step. This will take all databases run in the results section and build a data folder for the shiny app. This data folder is ignored to prevent accidental commits back to github. Next launch the shiny app.
4 changes: 4 additions & 0 deletions documentation/news.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: "News"
---

# EHDEN HMB v0.2.0

* Add shiny app to preview results

# EHDEN HMB v0.1.8

* Fix pid and std file names in cohort definitions, changes anticipated build order
Expand Down
15 changes: 15 additions & 0 deletions extras/PreviewResults.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Preview results -------------
# The purpose of this file is to launch a local shiny app to review the results
# of the analysis conducted for ehden_hmb

# Once the study has been executed results will be saved to a folder separated
# by database name.



### Step 1: Run migration script to populate 'shiny/data' folder with files
source(here::here("shiny/migration", "dataMigration.R"))


### Step 2: Once migration script is ran successfully, run the app in a browser
shiny::runApp(appDir = here::here("shiny"))
Loading

0 comments on commit 63d073c

Please sign in to comment.