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.
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.
fetch_gwas(efo_id, p_cut = 5e-8, verbose = interactive())run_gwas2crispr(efo_id, p_cut = 5e-8, flank_bp = 200, out_prefix = NULL, verbose = interactive())DESCRIPTIONFASTA 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.
if (!requireNamespace("devtools", quietly = TRUE))
install.packages("devtools")
devtools::install_github("leopard0ly/gwas2crispr")library(gwas2crispr)
res <- run_gwas2crispr(
efo_id = "EFO_0000707",
p_cut = 1e-6,
flank_bp = 300,
out_prefix = "lung",
verbose = TRUE
)
res$summary
res$writtenExpected output files:
lung_snps_full.csvlung_snps_hg38.bedlung_snps_flank300.faThe FASTA file is written only when the hg38 BSgenome and Biostrings packages are installed.
library(gwas2crispr)
res <- run_gwas2crispr(
efo_id = "EFO_0001663",
p_cut = 5e-8,
flank_bp = 200,
out_prefix = "prostate",
verbose = TRUE
)
res$summary
res$writtenNo 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$bedWhen out_prefix is supplied, the package writes:
<prefix>_snps_full.csv<prefix>_snps_hg38.bed<prefix>_snps_flank<bp>.faA 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 -vOptions:
-e, --efo — EFO trait ID, for example
EFO_0001663-p, --pthresh — p-value threshold-f, --flank — number of flanking bases for FASTA
extraction-o, --out — output file prefix-v, --verbose — print progress messagesdevtools::test()Network-dependent tests are skipped on CRAN.
If you use gwas2crispr, cite the Zenodo release:
https://doi.org/10.5281/zenodo.16878244
citation("gwas2crispr")Report issues at:
https://github.com/leopard0ly/gwas2crispr/issues
MIT © Othman S. I. Mohammed — see the LICENSE file.