check_bi_allelic: Remove non-biallelic SNPs

View source: R/check_bi_allelic.R

check_bi_allelicR Documentation

Remove non-biallelic SNPs

Description

Remove non-biallelic SNPs

Usage

check_bi_allelic(
  sumstats_dt,
  path,
  ref_genome,
  bi_allelic_filter,
  rsids,
  log_folder_ind,
  check_save_out,
  tabix_index,
  nThread,
  log_files,
  dbSNP
)

Arguments

path

Filepath for the summary statistics file to be formatted. A dataframe or datatable of the summary statistics file can also be passed directly to MungeSumstats using the path parameter.

ref_genome

name of the reference genome used for the GWAS ("GRCh37" or "GRCh38"). Argument is case-insensitive. Default is NULL which infers the reference genome from the data.

bi_allelic_filter

Binary Should non-biallelic SNPs be removed. Default is TRUE.

log_folder_ind

Binary Should log files be stored containing all filtered out SNPs (separate file per filter). The data is outputted in the same format specified for the resulting sumstats file. The only exception to this rule is if output is vcf, then log file saved as .tsv.gz. Default is FALSE.

tabix_index

Index the formatted summary statistics with tabix for fast querying.

nThread

Number of threads to use for parallel processes.

log_files

list of log file locations

dbSNP

version of dbSNP to be used for imputation (144 or 155).

Value

A list containing two data tables:

  • sumstats_dt: the modified summary statistics data table object

  • rsids: snpsById, filtered to SNPs of interest if loaded already. Or else NULL.

  • log_files: log file list


neurogenomics/MungeSumstats documentation built on Aug. 10, 2024, 5:59 a.m.