View source: R/polarise_ancestral_vcf.R
polarise_ancestral_vcf | R Documentation |
This function reads a VCF file, reorders the REF and ALT alleles based on the ancestral allele specified in the INFO field (ID=AA) (the AA INFO field must be present in the vcf), adjusts the REF, ALT and genotype (GT) fields accordingly, and writes the modified VCF to a new file.
polarise_ancestral_vcf(
input_vcf,
output_vcf = "output.vcf.gz",
compress = NULL
)
input_vcf |
Path to the input VCF file. |
output_vcf |
Path to the output VCF file. If not provided, defaults to "output.vcf.gz". |
compress |
Optional boolean indicating whether to compress the output file. If not provided, it will automatically detect based on the input file. |
The function writes the modified VCF file to the specified output path and returns a modified vcfR object to the environment
polarise_ancestral_vcf("input.vcf")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.