run_torus: Run enrichment analysis and compute SNP-level priors using...

View source: R/torus.R

run_torusR Documentation

Run enrichment analysis and compute SNP-level priors using TORUS

Description

Perform enrichment analysis using TORUS and then compute SNP-level priors using the enrichment estimates.

Usage

run_torus(
  torus_annot_file,
  torus_zscore_file,
  option = c("est", "est-prior", "fdr"),
  torus_path = "torus"
)

Arguments

torus_annot_file

SNP annotation file prepared by the prepare_torus_input_files function. The SNP annotation file contains SNP-level genomic annotations used by TORUS analysis. The annotation file uses a header to specify the number and the nature (categorical or continuous) of the annotations. The first column with the header "SNP" represents the SNP name. The following columns represent specific annotations. For categorical/discrete annotations, the header should have a suffix "_d"; whereas for continuous annotations, the header should ends with "_c".

torus_zscore_file

Summary statistics from single SNP association analysis, prepared by the prepare_torus_input_files function. Should be compressed in gzip format.

option

TORUS options: “est”, obtain estimates of enrichment parameters and their confidence intervals; “est-prior”, perform enrichment analysis and compute SNP-level priors using the estimated enrichment estimates for each locus; or “fdr”, perform Bayesian FDR control, and output the result.

torus_path

Path to torus executable.

Value

A list of enrichment results, SNP-level prior probabilities, and/or FDR result. Enrichment result contains the point estimate (MLE) of the log odds ratio, as well as 95% confidence interval for the corresponding point estimate.

Examples

## Not run: 
# Get enrichment estimates and confidence intervals
torus.result <- run_torus("torus_annotations.txt.gz",
                          "torus_zscore.txt.gz",
                          option = "est")

# Get enrichment estimates and compute SNP-level priors
torus.result <- run_torus("torus_annotations.txt.gz",
                          "torus_zscore.txt.gz",
                          option = "est-prior")
# Bayesian FDR control
torus.result <- run_torus("torus_annotations.txt.gz",
                          "torus_zscore.txt.gz",
                          option = "fdr")

## End(Not run)

kevinlkx/mapgen documentation built on March 31, 2024, 11:03 p.m.