+1 "REF part is chosen based on the reference sequence"
Hi guys
I recently received a VCF file containing SNP information but it seems to have the allele information solely depending on population. (They basically placed more observed allele in my sample as REF) Therefore, the file has 'Major Allele' on REF and 'Minor Alleles' on ALT. Is there any shared script that can convert this file into correct REF/ALT format using reference genome?
1 answer
Unless I'm mistaken, the REF part is chosen based on the reference sequence used at the alignment stage in the analysis. You might have to go back a couple of steps and re-align to the new reference sequence. This could, of course, change the pool of variants you're looking at right now.
I have not heard of changing references in VCF files. A hacky way of doing that could be picking all positions in the VCF file and finding corresponding bases in the new reference sequence, then maybe using a script to add a column to the VCF.
It's all plain text so a combination of BASH and Perl/Python should help you.
My brain kinda goes bonkers after midnight, I guess. Did I phrase it weird? I do hope the phrasing did not introduce ambiguity to the fact underneath.
Log in to answer this question.