gravatar for curious

3 hours ago by

I want every row to be an id and every column a genotype for a different sample:

id1 0 2 1
id2 0 2 1

I know I can do this in python, but trying to get better with unix because the tools are usually faster

bcftools query -f '%ID[t%GT]n' my_vcf.vcf | awk -F "|" '{for(i=1; i<=NF; i++) { print $i+$i }}'

I think this is almost there by I almost there but obviously I'm off. Any hints are greatly appreciated thank you.

link

modified 3 hours ago

written
3 hours ago
by

curious490



Source link