get_genome_ref: Download genome ref

View source: R/get_genome_ref.R

get_genome_refR Documentation

Download genome ref

Description

Download and decompress the genome reference needed to run map_snps_to_genes, If the file already exists, it will simply return the path.

Usage

get_genome_ref(
  genome_ref_path = NULL,
  storage_dir = tools::R_user_dir("MAGMA.Celltyping", which = "cache"),
  method = c("magma", "piggback"),
  population = c("eur", "afr", "amr", "eas", "sas"),
  timeout = 60 * 5,
  verbose = TRUE
)

Arguments

genome_ref_path

If not NULL and file exists, this file path will be returned.

storage_dir

Where to store genome ref.

method

Get reference genome data from the MAGMA server (slow).

population

Which population subset of the genome reference to include.

  • "eur" : European descent (Default simply because this is currently the most common GWAS subpopulation).

  • "afr" : African descent.

  • "amr" : Ad Mixed American descent.

  • "eas" : East Asian descent.

  • "sas" : South Asian descent.

timeout

Number seconds to wait before ending the download (Default: 5 minutes).

verbose

Print messages.

Value

Directory where the genome reference data is stored.

Examples

## Not run: 
genome_ref_path <- MAGMA.Celltyping::get_genome_ref()

## End(Not run)

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