Hi there,

I'd be grateful for some help please.

I've got several joint-called trio VCFs (unaffected parents and proband) which I'm analysing. The multi-sample vcf nicely shows 0/0, 0/1, 1/1 for each individual per variant. However, I'd like to convert the notation to three columns of simply het, hom and ref to make it much easier to analyse.

I've checked out the annovar script convert2annovar.pl --withzyg, however this only works for individual sample vcfs which isn't what I need. I'd like all the samples together in the same multi-sample vcf but with zygosity stated for each variant.

Any help or suggestions would be greatly appreciated.
E
Here is a solution using bioalcidaejdk. http://lindenb.github.io/jvarkit/BioAlcidaeJdk.html


    $ java -jar src/jvarkit-git/dist/bioalcidaejdk.jar -e 'stream().forEach(V->println(V.getContig()+":"+V.getStart()+" "+V.getGenotypes().stream().map(G->G.getType().name()).collect(Collectors.joining(" "))));' input.vcf
    
    RF01:970 HOM_REF HOM_REF HOM_REF HOM_REF HOM_VAR
    RF02:251 HOM_REF HET HET HOM_REF HOM_REF
    RF02:578 HOM_REF HOM_REF HOM_REF HOM_VAR HOM_REF
    RF02:877 HET HOM_REF HOM_REF HOM_REF HOM_REF
    RF02:1726 HOM_REF HET HET HOM_REF HOM_REF
    RF02:1962 HET HOM_REF HOM_REF HOM_REF HOM_REF
    RF03:1221 HOM_REF HOM_VAR HOM_VAR HOM_REF HOM_REF
    RF03:1242 HOM_REF HOM_REF HOM_REF HOM_VAR HOM_REF
    RF03:1688 HOM_REF HOM_REF HOM_REF HOM_REF HOM_VAR
    RF03:1708 HOM_REF HOM_REF HOM_REF HOM_REF HOM_VAR

