Entering edit mode
2.1 years ago
FRANCESCA
▴
10
How can I "translate" the genotype of my vcf file in alleles? For example: 0|1 vs A|T
How can I "translate" the genotype of my vcf file in alleles? For example: 0|1 vs A|T
bcftools query -f'%REF|%ALT\n' in.vcf > output.txt
G|A
T|A
C|T
G|A
C|T
C|T
A|G
T|C
T|C
T|C
G|A
If you want to reconstruct the haplotypes having a VCF with phased genotypes in place, I can recommend haplosaurus, developed by Ensembl.
bcftools query -f '%CHROM %POS %ID[ %TGT]\n' in.vcf
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.