gen2vcf: Convert IMPUTE2 gen to VCFv4.1 format, input for fastqtl

View source: R/gen2vcf.R

gen2vcfR Documentation

Convert IMPUTE2 gen to VCFv4.1 format, input for fastqtl

Description

This function converts IMPUTE2 gen file posterior probabilities to dosage, then outputs to VCF file.

Usage

gen2vcf(
  genFile,
  sampleFile,
  chrName,
  outVCFFile,
  outVCFHeader = "##fileformat=VCFv4.1",
  subsetSNPs = NULL,
  subsetSamples = NULL
)

Arguments

genFile

input gen file

sampleFile

if provided sampleID will be added as header, else X1..Xn as sampleID

chrName

chromosome name c(1:22,X,Y)

outVCFFile

output file name for VCF

outVCFHeader

output VCF header lines

subsetSNPs

index of SNPs to subset - rows

subsetSamples

index of Samples to subset - coloumns

Value

outputs VCF file, nothing returned in the workspace

Author(s)

Tokhir Dadaev


oncogenetics/oncofunco documentation built on March 9, 2024, 5:23 p.m.