sort_coords: Sort sum stats

View source: R/sort_coords.R

sort_coordsR Documentation

Sort sum stats

Description

Sort summary statistics table by genomic coordinates.

Usage

sort_coords(
  sumstats_dt,
  sort_coordinates = TRUE,
  sort_method = c("data.table", "GenomicRanges")
)

Arguments

sumstats_dt

data.table obj of the summary statistics file for the GWAS.

sort_method

Method to sort coordinates by:

  • "data.table" (default)Uses setorderv, which is must faster than "GenomicRanges" but less robust to variations in some sum stats files.

  • "GenomicRanges"Uses sort.GenomicRanges, which is more robust to variations in sum stats files but much slower than the "data.table" method.

sort_coords

Whether to sort by coordinates.

Value

Sorted sumstats_dt


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