Entering edit mode
8.8 years ago
David.shaw
▴
10
I have a VCF per individual.
I'd like to take it, and convert it to the following format so that I have the alleles of the individual in the last two columns:
rsid chr pos ref alt
rs102 chr1 34 A G
Any package that does this already?
This doesn't quite work in regards to the actual alleles if some are phased and some aren't (because they are rare).
This worked:
bcftools query -f '%ID %CHROM %POS[ %TGT]\n' ../131.vcf | tr "|" " " | tr "/" " " | less -S
Then replace the tr command at the end with