gwas2crispr

DOI

GWAS-to-CRISPR: direct GWAS Catalog REST API v2 retrieval and GRCh38/hg38 CSV, BED, and optional FASTA preparation for downstream CRISPR guide-design workflows.

Overview

gwas2crispr retrieves significant genome-wide association study (GWAS) associations for an Experimental Factor Ontology (EFO) trait directly from the EMBL-EBI GWAS Catalog REST API v2.

The package prepares:

All genomic outputs are prepared for GRCh38/hg38.

The package is a computational preparation workflow. It does not perform wet-lab validation, therapeutic interpretation, or biological efficacy testing.

Core functions

Installation

Requirements

Optional FASTA requirements

FASTA extraction requires:

if (!requireNamespace("BiocManager", quietly = TRUE))
  install.packages("BiocManager")

BiocManager::install(c(
  "Biostrings",
  "GenomeInfoDb",
  "BSgenome.Hsapiens.UCSC.hg38"
))

CSV and BED outputs can still be produced without the optional FASTA packages.

Install from GitHub

if (!requireNamespace("devtools", quietly = TRUE))
  install.packages("devtools")

devtools::install_github("leopard0ly/gwas2crispr")

Quick start

library(gwas2crispr)

res <- run_gwas2crispr(
  efo_id     = "EFO_0000707",
  p_cut      = 1e-6,
  flank_bp   = 300,
  out_prefix = "lung",
  verbose    = TRUE
)

res$summary
res$written

Expected output files:

The FASTA file is written only when the hg38 BSgenome and Biostrings packages are installed.

Thesis case-study example

library(gwas2crispr)

res <- run_gwas2crispr(
  efo_id     = "EFO_0001663",
  p_cut      = 5e-8,
  flank_bp   = 200,
  out_prefix = "prostate",
  verbose    = TRUE
)

res$summary
res$written

Object-only mode

No files are written when out_prefix = NULL.

res <- run_gwas2crispr(
  efo_id     = "EFO_0001663",
  p_cut      = 5e-8,
  flank_bp   = 200,
  out_prefix = NULL,
  verbose    = FALSE
)

res$summary
res$bed

Output files

When out_prefix is supplied, the package writes:

Notes

Command-line interface

A portable script is available under:

inst/scripts/gwas2crispr.R

Example:

Rscript inst/scripts/gwas2crispr.R -e EFO_0001663 -p 5e-8 -f 200 -o prostate -v

Options:

Testing

devtools::test()

Network-dependent tests are skipped on CRAN.

Citation

If you use gwas2crispr, cite the Zenodo release:

https://doi.org/10.5281/zenodo.16878244

citation("gwas2crispr")

Getting help

Report issues at:

https://github.com/leopard0ly/gwas2crispr/issues

License

MIT © Othman S. I. Mohammed — see the LICENSE file.