Make sure you have your data in a supported OMOP CDM format. Achilles currently supports version 5.3 and 5.4 of the OMOP CDM. (https://github.com/OHDSI/CommonDataModel).
This package makes use of rJava. Make sure that you have Java installed. If you don't have Java already installed on your computer (on most computers it already is installed), go to java.com to get the latest version. If you are having trouble with rJava, this Stack Overflow post may assist you when you begin troubleshooting.
In R, use the following commands to install Achilles.
```r if (!require("remotes")) install.packages("remotes")
remotes::install_github("OHDSI/Achilles")
```
To run the Achilles analysis, first determine if you'd like to run the function in multi-threaded mode or in single-threaded mode. Use runCostAnalysis = FALSE
to save on execution time, as cost analyses tend to run long.
In multi-threaded mode
The analyses are run in multiple SQL sessions, which can be set using the numThreads
setting and setting scratchDatabaseSchema to something other than #
. For example, 10 threads means 10 independent SQL sessions. Intermediate results are written to scratch tables before finally being combined into the final results tables. Scratch tables are permanent tables; you can either choose to have Achilles drop these tables (dropScratchTables = TRUE
) or you can drop them at a later time (dropScratchTables = FALSE
). Dropping the scratch tables can add time to the full execution. If desired, you can set your own custom prefix for all Achilles analysis scratch tables (tempAchillesPrefix).
In single-threaded mode
The analyses are run in one SQL session and all intermediate results are written to temp tables before finally being combined into the final results tables. Temp tables are dropped once the package is finished running. Single-threaded mode can be invoked by either setting numThreads = 1
or scratchDatabaseSchema = "#"
.
Use the following commands in R:
r
library(Achilles)
connectionDetails <- createConnectionDetails(
dbms="redshift",
server="server.com",
user="secret",
password='secret',
port="5439")
Single-threaded mode
r
achilles(connectionDetails,
cdmDatabaseSchema = "cdm5_inst",
resultsDatabaseSchema="results",
outputFolder = "output")
Multi-threaded mode
r
achilles(connectionDetails,
cdmDatabaseSchema = "cdm5_inst",
resultsDatabaseSchema = "results",
scratchDatabaseSchema = "scratch",
numThreads = 10,
outputFolder = "output")
The "cdm5_inst"
cdmDatabaseSchema parameter, "results"
resultsDatabaseSchema parameter, and "scratch"
scratchDatabaseSchema parameter are the fully qualified names of the schemas holding the CDM data, targeted for result writing, and holding the intermediate scratch tables, respectively. See the DatabaseConnector package for details on settings the connection details for your database, for example by typing
r
?createConnectionDetails
Execution of all Achilles pre-computations may take a long time, particularly in single-threaded mode and with COST analyses enabled. See
The SQL platforms supported by DatabaseConnector and SqlRender are the only ones supported here in Achilles as dbms
. cdmVersion
can be ONLY 5.x (please look at prior commit history for v4 support).
Please refer to the README-developers.md file.
(Please review the Achilles Wiki for specific details for Linux)
Achilles is licensed under Apache License 2.0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.