Hello @finswimmer,
Thank you for your suggestion! I just found another post which says ./.:. means a missing observation and 0/0 means the same as the reference base. So I think I need the output something like this by replacing ./.:. with - and a 0/0 replaced by reference base :
#CHROM ID REF ALT file1.sorted.bam file2.sorted.bam file3.sorted.bam
1 687 G A - A -
1 689 G A - A -
1 701 T A - A -
1 704 T G - G -
1 708 C T,A T - A
Thank you for pointing out heterozygous positions. I have pasted an example from the vcf file here:
1 6440 . G T 21.279 . VDB=0.0264014;SGB=-0.511536;RPB=1;MQB=1;MQSB=1;BQB=1;MQ0F=0.25;MQ=15;ICB=1;HOB=0.5;DP=7;DP4=0,2,5,0;AN=4;AC=3 GT:PL 1/1:48,5,0 0/1:35,0,19 ./.:.
Here, for file2, the call is 0/1 and I was thinking to replace heterozygous calls with an N. I did not add this in my question earlier. But is there a way to address this along with homozygous positions?
Thank you for your help!
That's not a VCF anymore, and I would strongly recommend to stick to commonly used file formats. That said, if I would have to solve your issue I would use python and the cyvcf2 module.
That was my mistake to say I want a
vcffile. You are right it won't be avcfanymore. I have edited my question. Thank you for the suggestion. I have never usedpythonor thecyvcf2module. I will try them. Thank you!