| write_sumstats {MungeSumstats} | R Documentation |
Write sum stats file to disk
write_sumstats( sumstats_dt, save_path, sep = "\t", write_vcf = FALSE, tabix_index = FALSE, nThread = 1, return_path = FALSE )
sumstats_dt |
data table obj of the summary statistics file for the GWAS. |
save_path |
File path to save formatted data. Defaults to
|
sep |
The separator between columns. Defaults to the character in the set |
write_vcf |
Whether to write as VCF (TRUE) or tabular file (FALSE). |
tabix_index |
Index the formatted summary statistics with tabix for fast querying. |
nThread |
The number of threads to use. Experiment to see what works best for your data on your hardware. |
return_path |
Return |
If return_path=TRUE, returns save_path.
Else returns NULL.
path <- system.file("extdata", "eduAttainOkbay.txt",
package = "MungeSumstats"
)
eduAttainOkbay <- read_sumstats(path = path)
write_sumstats(
sumstats_dt = eduAttainOkbay,
save_path = tempfile(fileext = ".tsv.gz")
)