-
Notifications
You must be signed in to change notification settings - Fork 2
/
README.Rmd
155 lines (120 loc) · 4.54 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%",
eval = FALSE
)
```
# EHDEN Alopecia
<!-- badges: start -->
[![R-CMD-check](https://github.com/ohdsi-studies/EhdenAlopecia/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ohdsi-studies/EhdenAlopecia/actions/workflows/R-CMD-check.yaml)
<img src="https://img.shields.io/badge/Study%20Status-Started-blue.svg" alt="Study Status: Started">
<!-- badges: end -->
Analytic software to perform large-scale distributed analysis of patients with Alopecia as part of the EHDEN study-athon.
- Analytics use case(s): Population-Level Estimation
- Study type: Clinical Application
- Tags: -
- Study lead:
- Study lead forums tag:
- Study start date: 1 November 2023
- Study end date: -
- Protocol: To be added
- Publications: -
- Results explorer: -
# Requirements
A database mapped to the OMOP Common Data Model version 5 in one of these platforms: SQL Server, Oracle, PostgreSQL, IBM Netezza, Apache Impala, Amazon RedShift, Google BigQuery, or Microsoft APS.
R version 4.0.5
On Windows: RTools
Java
100 GB of free disk space
# How to run
1. See the instructions at https://ohdsi.github.io/Hades/rSetup.html for configuring your R environment, including Java and RStudio.
2. Clone the EhdenAlopecia package into your local R environment.
3. Open your study package in RStudio. Use the following code to install all the dependencies:
```R
install.packages(c("TreatmentPatterns",
"DBI",
"dplyr",
"glue",
"zip",
"magrittr",
"checkmate",
"lubridate",
"rlang",
"readr",
"here",
"rmarkdown",
"checkmate",
"SqlRender",
"duckdb",
"ParallelLogger",
"DBI",
"glue",
"zip",
"lubridate",
"rlang",
"jsonlite"))
remotes::install_github(c("ohdsi/CirceR",
"ohdsi/CohortGenerator",
"ohdsi/CohortDiagnostics"))
```
In RStudio, select 'Build' then 'Install and Restart' to install the package.
After succesfully installing the package. Open the [inst/extras/CodeTorun.R](https://raw.githubusercontent.com/ohdsi-studies/EhdenAlopecia/main/inst/extras/CodeToRun.R) and run the following code:
```R
#Load the library
library(EhdenAlopecia)
library(here)
# database metadata and connection details -----
# The name/ acronym for the database
databaseId <- "..."
# Database connection details -----
#connection details
#User specified input
# Details for connecting to the server:
dbms <- Sys.getenv("dbms")
user <- Sys.getenv("user")
password <- Sys.getenv("password")
server <- Sys.getenv("host")
port <- Sys.getenv("port")
connectionString <- Sys.getenv("connectionString")
connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = dbms,
connectionString = connectionString,
user = user,
password = password,
port = port)
cdmDatabaseSchema <- "..."
cohortDatabaseSchema <- "..."
# Name of table prefix to use in the result schema for tables created during the study.
# Notes:
# - if there is an existing table in your results schema with the same names it
# will be overwritten
# - name must be lower case
cohortTable <- "alopecia_ehden"
# minimum counts that can be displayed according to data governance
minCellCount <- 5
#specify where to save the results
outputFolder <- here::here("results")
#choose analysis to run
instantiateCohorts <- FALSE
runDiagnostics <- FALSE
runPatternAnalysis <- FALSE
### Do not edit below here
EhdenAlopecia::runStudy(
connectionDetails = connectionDetails,
cohortTable = cohortTable,
cdmDatabaseSchema = cdmDatabaseSchema,
cohortDatabaseSchema = cohortDatabaseSchema,
instantiateCohorts = instantiateCohorts,
runDiagnostics = runDiagnostics,
runPatternAnalysis = runPatternAnalysis,
outputFolder = outputFolder,
databaseId = databaseId,
minCellCount = minCellCount
)
```