View source: R/run_gwas2crispr.R
run_gwas2crispr | R Documentation |
End-to-end pipeline: fetch significant associations, annotate,
and optionally write CSV/BED/FASTA outputs. By default no files are written;
set out_prefix
to write results.
run_gwas2crispr(
efo_id,
p_cut = 5e-08,
flank_bp = 200,
out_prefix = NULL,
genome_pkg = "BSgenome.Hsapiens.UCSC.hg38",
verbose = interactive()
)
efo_id |
character. Experimental Factor Ontology (EFO) identifier, e.g., "EFO_0001663". |
p_cut |
numeric. P-value threshold for significance (default 5e-8). |
flank_bp |
integer. Flanking bases for FASTA sequences (default 200). |
out_prefix |
character or NULL. File prefix (including path) for outputs.
If |
genome_pkg |
character. BSgenome package to use for FASTA (default "BSgenome.Hsapiens.UCSC.hg38"); FASTA step is skipped if not installed. |
verbose |
logical. If TRUE, emit progress via |
Network I/O may occur when fetching data. Only GRCh38/hg38 is supported.
(Invisibly) a list with elements:
summary
: tibble with basic counts.
snps_full
: tibble of SNP metadata.
bed
: tibble of BED intervals (if computed).
fasta
: Biostrings::DNAStringSet
(if computed).
written
: character vector of file paths written (possibly empty).
fetch_gwas
# Write into a temporary directory so we don't touch the user's filespace:
tmp <- tempdir()
res <- run_gwas2crispr(
efo_id = "EFO_0001663",
p_cut = 5e-8,
flank_bp = 200,
out_prefix = file.path(tmp, "prostate"),
verbose = FALSE
)
# If you omit 'out_prefix', nothing is written; an object is returned:
res2 <- run_gwas2crispr(
efo_id = "EFO_0001663",
p_cut = 5e-8,
flank_bp = 200,
out_prefix = NULL,
verbose = FALSE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.