Would it be possible in the next release to allow for concordance checks between two vcfs at sites where the ALT allele in one vcf is not the same as in the other? Currently vcftools ignores such sites.
As an example of the utiliy of such a feature, if file1 has ALT="." and GT="0/0", we don't need to know the file1 ALT allele to conclude that the genotype is discordant with the genotype in file2 where ALT="A" and GT="0/1". The two ALT alleles are consistent with each other--it's just that no "A" was observed in file1. This type of false negative error occurs often, and it would be useful to have a tool to detect it.
What version of VCFtools are you using? If I understand your question correctly, I think this is exactly what the latest version does.
Adam
I have what I believe to be the latest version (v0.1.9.0), and this is not what it does. I have provided some files here to reproduce the problem. Just run:
vcftools --vcf test1.vcf --diff test2.vcf --diff-discordance-matrix --out test
Each file has 10 sites and they are identical and have ALT="." except for the first site, where I changed ALT to "C" and changed the genotype of the first sample from "0/0" to "0/1". The discordance matrix has 0 in all positions. If it were comparing at all sites it should have 8 samples * 9 sites + 7 samples * 1 sites = 79 in the 0/0-0/0 box. And 1 sample * 1 site in the 0/0-0/1 box. It's not an error because the output of vcftools states that this is how it will behave:
"Outputting Discordance Matrix
For bi-allelic loci, called in both files, with matching alleles only..."
My question is in the next version, can you please make it also output a discordance matrix for sites with consistent alleles and not just matching alleles? Thanks!
Here is the second file
I see. I thought you were referring to --diff-site-discordance, which provides more information regarding the mismatches between alleles. Perhaps this is what you need for the time being?
As for --diff-discordance-matrix, you're right - it only considers sites for which the alleles match. This is probably unnecessary, and I'll add it to the list of things to look at.
Adam