Achilles (Automated Characterization of Health Information at Large-Scale Longitudinal Evidence Systems)

repository·main·Indexed 40 days ago

https://github.com/ohdsi/achilles

An R package for providing automated, large-scale descriptive statistics and characterization for databases following the OMOP Common Data Model (CDM) versions 5.3 and 5.4. It includes tools to execute standard or specific analysis suites via the `achilles()` function and explore analysis metadata using `getAnalysisDetails()`.

Tokens
2.2K
Snippets
8
Records
10
Agent score
50%

What's inside Achilles

  1. Overview of Achilles

    main

    Achilles (Automated Characterization of Health Information at Large-Scale Longitudinal Evidence Systems) is an R package used to provide descriptive statistics on an OMOP CDM database.

    Key details:

    • CDM Support: Currently supports OMOP CDM versions 5.3 and 5.4.
    • Core Functionality: Performs broad database characterization.
    • Integrations: Includes export features for ARES and (deprecated) AchillesWeb.
  2. Identify and run missing analyses

    main

    If you have updated the Achilles package and want to find analyses that are missing from your existing results database, use listMissingAnalyses() and runMissingAnalyses().

    Note: runMissingAnalyses() does not delete prior data; it only adds the missing pieces.

    # List what is missing
    Achilles::listMissingAnalyses(connectionDetails, resultsDatabaseSchema)
    
    # Run only the missing analyses
    Achilles::runMissingAnalyses(
      connectionDetails     = connectionDetails,
      cdmDatabaseSchema     = cdmDatabaseSchema,
      resultsDatabaseSchema = resultsDatabaseSchema,
      outputFolder          = "your output folder"
    )
  3. Run specific analyses by ID

    main

    You can target specific analyses using the analysisIds parameter. This is useful for running a subset of tests or specific non-default analyses. If you provide analysisIds, Achilles will execute only those specific analyses and remove old/other analyses if they exist in the results schema.

    # Run specific IDs
    onlyThese <- c(402, 702)
    Achilles::achilles(
      connectionDetails     = connectionDetails,
      cdmDatabaseSchema     = cdmDatabaseSchema,
      resultsDatabaseSchema = resultsDatabaseSchema,
      analysisIds           = onlyThese,
      outputFolder          = "your output folder"
    )
    
    # Run all non-default analyses
    details     <- Achilles::getAnalysisDetails()
    analysisIds <- details[which(details$IS_DEFAULT == 0), ]$ANALYSIS_ID
    
    Achilles::achilles(
      connectionDetails     = connectionDetails,
      cdmDatabaseSchema     = cdmDatabaseSchema,
      resultsDatabaseSchema = resultsDatabaseSchema,
      analysisIds           = analysisIds,
      outputFolder          = "your output folder"
    )
  4. Run all available analyses (including non-defaults)

    main

    By default, achilles() only runs the standard suite. To run every available analysis in the package, set the defaultAnalysesOnly parameter to FALSE.

    Achilles::achilles(
      connectionDetails     = connectionDetails,
      cdmDatabaseSchema     = cdmDatabaseSchema,
      resultsDatabaseSchema = resultsDatabaseSchema,
      defaultAnalysesOnly   = FALSE,
      outputFolder          = "your output folder"
    )
  5. Re-run specific analyses without deleting existing results

    main

    To update or re-run specific analyses without wiping out the results of other analyses already present in your database, use the following combination of parameters:

    • analysisIds: The IDs of the analyses to run.
    • updateGivenAnalysesOnly = TRUE: Ensures only the specified analyses are touched.
    • createTable = FALSE: Prevents the recreation of existing result tables.
    reRunThese <- c(402, 702)
    
    Achilles::achilles(
      connectionDetails       = connectionDetails,
      cdmDatabaseSchema       = cdmDatabaseSchema,
      resultsDatabaseSchema   = resultsDatabaseSchema,
      analysisIds             = reRunThese,
      updateGivenAnalysesOnly = TRUE,
      createTable             = FALSE,
      outputFolder            = "your output folder"
    )
  6. Exclude specific analyses or categories

    main

    Use the excludeAnalysisIds parameter to skip certain analyses. You can pass a vector of specific IDs or programmatically generate a list based on a category (e.g., skipping all 'Drug Exposure' analyses).

    # Skip specific IDs
    skipThese <- c(402, 702)
    Achilles::achilles(
      connectionDetails     = connectionDetails,
      cdmDatabaseSchema     = cdmDatabaseSchema,
      resultsDatabaseSchema = resultsDatabaseSchema,
      excludeAnalysisIds    = skipThese,
      outputFolder          = "your output folder"
    )
    
    # Skip an entire category
    details   <- Achilles::getAnalysisDetails()
    skipThese <- details[details$CATEGORY == "Drug Exposure", ]$ANALYSIS_ID
    
    Achilles::achilles(
      connectionDetails     = connectionDetails,
      cdmDatabaseSchema     = cdmDatabaseSchema,
      resultsDatabaseSchema = resultsDatabaseSchema,
      excludeAnalysisIds    = skipThese,
      outputFolder          = "your output folder"
    )
  7. Run all default Achilles analyses

    main

    To execute the standard suite of Achilles analyses against your CDM, use Achilles::achilles(). You must provide connectionDetails, cdmDatabaseSchema, and resultsDatabaseSchema. The outputFolder defaults to the current working directory's /output folder if not specified.

    Achilles::achilles(
      connectionDetails     = connectionDetails,
      cdmDatabaseSchema     = cdmDatabaseSchema,
      resultsDatabaseSchema = resultsDatabaseSchema,
      outputFolder          = "your output folder"
    )
  8. Use getAnalysisDetails() to explore Achilles analyses

    main

    The Achilles::getAnalysisDetails() function returns a data frame containing metadata for all available Achilles analyses. This is useful for discovering analysis IDs, categories, and whether an analysis is part of the default suite.

    Key columns in the returned data frame include:

    • ANALYSIS_ID: The unique identifier for the analysis.
    • ANALYSIS_NAME: The descriptive name of the analysis.
    • CATEGORY: The functional group (e.g., 'Person', 'Drug Exposure', 'Condition Occurrence').
    • IS_DEFAULT: A flag (1 for default, 0 for non-default) indicating if the analysis runs in a standard execution.
    details <- Achilles::getAnalysisDetails()
    # Example: View all columns
    colnames(details)
    # Example: Filter for non-default analyses
    details[details$IS_DEFAULT == 0, c(1, 5)]