Package 'geneticPoS'

Title: Relate Genetic Evidence to a Drug Development Benchmark
Description: Relate user-supplied Mendelian randomization and colocalization results to the reported historical launch proportions of Karim et al. (2026) <doi:10.64898/2026.02.23.26346731>.
Authors: Daiki Kumakura [aut, cre]
Maintainer: Daiki Kumakura <[email protected]>
License: GPL-3
Version: 0.7.0
Built: 2026-12-04 06:38:24 UTC
Source: https://github.com/DaikiKumakura/geneticPoS

Help Index


Relate user-supplied MR and colocalization results to the Karim benchmark

Description

Keep user-selected results and check their correspondence to the published Figure 1a MR+coloc thresholds. The input values are user verified. The reported rates are historical group proportions.

Usage

karim_pos(mr, coloc, mapping = list(), metadata = list(), links = NULL,
          benchmark = c("v3", "v2"))

Arguments

mr

Data frame or local CSV/TSV with mr_id, target_id, indication_id, exposure_id, outcome_id, build, locus_id and numeric mr_p. Optional columns: numeric l2g_share and mesh_similarity, logical measured, coloc_id, and l2g_version (the Open Targets release the L2G share came from, e.g. "v8").

coloc

Data frame or local CSV/TSV with coloc_id, exposure_id, outcome_id, build, locus_id and numeric h4. Supply signal_id in both inputs when matching individual signals.

mapping

Optional named column mappings for mr and coloc.

metadata

Optional list with mr and coloc elements. Each is a named list of file-wide constants or a data frame keyed by one-based source_row. Values fill missing fields; conflicting values are rejected. Supply qtl_type = "eqtl" for known eQTL results to mark them outside the pQTL reference.

links

Optional data frame or CSV/TSV with mr_id, coloc_id and basis. Each link asserts a user-verified correspondence. Conflicting identifiers prevent reference assignment. The MR outcome study and indication are still required.

benchmark

Version of the Karim et al. preprint whose Figure 1a MR+coloc contrast is applied: "v3" (default; corrected, 20/39 launched in the support group) or "v2" (20/36; reproduces geneticPoS 0.5.0).

Details

Missing mapping values are looked up in the bundled snapshot by exact gene symbol, MeSH indication ID and outcome ID. Measured status uses the gene symbol. Conflicting or unrecorded values stay missing. User-supplied values take precedence.

The L2G share threshold (0.5) was set on Open Targets Genetics v8 (October 2022). Later Open Targets Platform releases recompute L2G, so a share from another release may pass or fail the threshold differently. A user-supplied L2G share not recorded as v8 sets l2g_caution to TRUE and raises a warning; the verdict itself is not changed. Values from the bundled snapshot are v8.

Value

A list containing candidates (one row per MR result), benchmark (the applied contrast), references (the full bundled benchmark table), and inputs (source tables).

Examples

keys <- data.frame(exposure_id = "P1", outcome_id = "D1",
                   build = "GRCh38", locus_id = "L1")
mr <- cbind(keys, mr_id = "M1", target_id = "G1", indication_id = "UC",
            mr_p = 4e-10, l2g_share = 0.67, l2g_version = "v8",
            mesh_similarity = 0.91, measured = TRUE)
coloc <- cbind(keys, coloc_id = "K1", h4 = 0.93)
karim_pos(mr, coloc)