Edit vcf file 0|0 to 0
I have a vcf file with GT format as 0|0 0|1 1|1 etc. I would like to convert those to a single number to create a dosage file.
Ex: Editing the vcf so that 0|0 become 0, 0|1 becomes 1 1|1 becomes 2 etc.
I’ve tried using sed and gsub but can’t seem to figure it out. Any advice would be greatly appreciated
• 33 views
Read more here: Source link