index_vcf: Tabix-index file: VCF

View source: R/index_vcf.R

index_vcfR Documentation

Tabix-index file: VCF

Description

Convert summary stats file to tabix format

Usage

index_vcf(path, verbose = TRUE)

Arguments

path

Path to VCF.

verbose

Print messages.

Value

Path to tabix-indexed tabular file

Source

Borrowed function from echotabix.

See Also

Other tabix: index_tabular()

Examples

eduAttainOkbayPth <- system.file("extdata", "eduAttainOkbay.txt",
                                 package = "MungeSumstats")
sumstats_dt <- data.table::fread(eduAttainOkbayPth, nThread = 1)
sumstats_dt <- 
MungeSumstats:::standardise_sumstats_column_headers_crossplatform(
    sumstats_dt = sumstats_dt)$sumstats_dt
sumstats_dt <- MungeSumstats:::sort_coords(sumstats_dt = sumstats_dt)
path <- tempfile(fileext = ".tsv")
MungeSumstats::write_sumstats(sumstats_dt = sumstats_dt, save_path = path)
    
indexed_file <- MungeSumstats::index_tabular(path = path)

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