R/ctwas_convert_geno_to_LD_matrix.R
convert_geno_to_LD_matrix.Rd
Converts PLINK genotype data to LD matrices and SNP info files, saves LD matrices as .RDS files and SNP info as .Rvar files
convert_geno_to_LD_matrix(
region_info,
genotype_files,
varinfo_files,
chrom = 1:22,
outputdir = getwd(),
outname = "",
include_variance = TRUE,
include_allele_freq = TRUE,
show_progress_bar = TRUE,
verbose = FALSE,
logfile = NULL
)
a data frame of region definitions, with columns: chrom, start, stop, and region_id.
Reference genotype files in PLINK binary genotype data in .pgen or .bed format. It should contain files for all chromosomes (from 1 to 22), one file per chromosome.
Reference variant information files in PLINK
.pvar or .bim format. It could have one file per chromosome or
have one big file for all chromosomes.
The output will use the genome positions in varinfo_files
.
a vector of chromosome numbers to process genotype data.
Output directory.
Output filestem.
If TRUE, include variance in .Rvar output.
If TRUE, include allele frequency in .Rvar output.
If TRUE, print progress bar.
If TRUE, print detail messages.
The log filename. If NULL, print log info on screen.
a data frame of region_metatable, with region definitions and filenames of LD matrices and variant information.