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.
Reference variant information files in PLINK
.pvar or .bim format. The output will use the genome positions in varinfo_files
.
a vector of chromosomes 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, will print log info on screen.
a data frame of region_metatable, with region definitions and filenames of LD matrices and variant information.