OHDSI Home | Forums | Wiki | Github

How to prepare a network analysis for those who have no prior experience?

Hi! I have questions about preparing to disseminate a study protocol to researchers who are interested in collaborating. I found some good examples from published literature:

My questions are:

  1. Is it necessary to prepare both SQL and R code to be uploaded on Github? I am planning to export ONLY JSON from Atlas to be shared - would that be enough?
  2. For researchers who have no experience in collaborating within the OHDSI community, are there any resources we can reference to to help us prepare for this process?

Thanks, any advice will be greatly appreciated.

And should we develop a R package for the implementation?

At the risk of some self promotion, I can give you an overview of how HowOften was handled when we did the network study at the OHDSI 2023 Symposium.

In summary, the HowOften works as an R project, not a package that is built and distributed. Instead, people clone the repo and open it as an R project. At the core, the project contains a designer script and an execution script. There are additional files in this repo, but they are supporting the design script (via a series of XLS files and other scripts) but you can just focus on the 2 files above.

Just for execution (just to see how a network study might be executed) you can follow the instructions at the root of the repo to see the steps, but basically, to run an individual study it would be called like this:

executeAnalysis <- function(analysisFile, executionSettings, analysisName, outputLocation, resultsLocation, keyringName) {

  analysisSpecifications <- ParallelLogger::loadSettingsFromJson(
    fileName = analysisFile

    analysisSpecifications = analysisSpecifications,
    executionSettings = executionSettings,
    executionScriptFolder = file.path(outputLocation, connectionDetailsReference, "strategusExecution"),
    keyringName = keyringName

  # copy Results to final location
  resultsDir <- file.path(resultsLocation, analysisName, connectionDetailsReference)

  if (dir.exists(resultsDir)) {
    unlink(resultsDir, recursive = TRUE)
  dir.create(file.path(resultsDir), recursive = TRUE)
  file.copy(file.path(outputLocation, connectionDetailsReference, "strategusOutput"),
            file.path(resultsDir), recursive = TRUE)



executeAnalysis("howoften_azza.json", executionSettings, "azza", outputLocation, resultsLocation, keyringName)

In this script, I just defined a generic execute function that makes the call to Strategus, and then called the function with the parameters to run the ‘azza’ study.

The study designer script is a bit move involved, but you can check out the Strategus vignette to see how to build your own Strategus analysis (which can be saved as the JSON file and used as input to the above executeAnalysis call).

Since you have Atlas (and cohorts) you can actually use ROhdsiWebAPI to download cohort definitions from your WebAPI instance into a CohortDefinitionSet that is used when building your analysis specification. HowOften got the cohorts from the PhenotypeLibrary, so won’t see this approach done in the HowOften repo.