calculate_geneset_enrichment: Use MAGMA to test enrichment in a geneset

View source: R/calculate_geneset_enrichment.r

calculate_geneset_enrichmentR Documentation

Use MAGMA to test enrichment in a geneset

Description

Assumes that you have already run map_snps_to_genes.

Usage

calculate_geneset_enrichment(
  geneset,
  gwas_sumstats_path = NULL,
  magma_dir = NULL,
  analysis_name,
  upstream_kb = 35,
  downstream_kb = 10,
  geneset_species = "mouse",
  version = NULL,
  verbose = TRUE
)

Arguments

geneset

Genes which are to be tested. Can be gene symbols (or other gene IDs) from any species listed in list_species.

gwas_sumstats_path

File path of the summary statistics file.

magma_dir

Path to folder containing the pre-computed MAGMA GWAS files (.gsa.rawand .gsa.out).

analysis_name

Used in file names which area created.

upstream_kb

How many kb upstream of the gene should SNPs be included?

downstream_kb

How many kb downstream of the gene should SNPs be included?

geneset_species

Species that the geneset came from. Can be any species listed in list_species. If geneset_species!="human", the geneset will be converted to 1:1 human orthologs using convert_orthologs.

version

MAGMA version to use.

verbose

Print messages.

Value

Filepath for the genes.out file.


NathanSkene/MAGMA_Celltyping documentation built on Aug. 21, 2023, 8:55 a.m.