file_to_gwasvcf: Convert file(s) to gwasvcf format.

View source: R/data_loading.r

file_to_gwasvcfR Documentation

Convert file(s) to gwasvcf format.

Description

Function to convert a file (or files) to gwasvcf format.

Usage

file_to_gwasvcf(
  file,
  chr_col,
  pos_col,
  nea_col,
  ea_col,
  snp_col = NULL,
  eaf_col = NULL,
  beta_col = NULL,
  se_col = NULL,
  pval_col = NULL,
  n = NULL,
  n_case = NULL,
  name = NULL,
  header = TRUE,
  sep = "\t",
  cores = 1,
  bcf_tools = NULL,
  verbose = TRUE
)

Arguments

file

Path to file

chr_col

Column name for chromosome

pos_col

Column name for position

nea_col

Column name for non-effect allele

ea_col

Column name for effect allele

snp_col

Column name for SNP (Optional)

eaf_col

Column name for effect allele frequency (Optional)

beta_col

Column name for beta (Optional)

se_col

Column name for standard error (Optional)

pval_col

Column name for P value (Optional) NB: P values will be saved as 10^-P

n

Sample size (Optional), can be int or column name

n_case

Number of cases (Optional), can be int or column name

name

Trait name (Optional), can be string or column name

header

Whether file has a header or not (Optional, boolean)

sep

File separater (Optional)

cores

Number of cores for multi-threaded tasks (Optional) NB: Unavailable on Windows machines

bcf_tools

Path to bcf_tools (Optional)

verbose

Display verbose information (Optional, boolean)

Value

gwasvcf object(s)

See Also

[dat_to_gwasvcf()] for converting data.frames


jwr-git/mrpipeline documentation built on Oct. 2, 2022, 3:41 p.m.