Entering edit mode
6.6 years ago
nour.hadjz
▴
20
Hello !
I have 2 vcf files that each contain individuals and their genotypes. how do i compare the genotypes of the individuals contained in my first file and the genotypes of the individuals contained in my second file using dictionaries in python ?? please!
thank you for your help
Why python? Python's not a great choice for native code to parse large files. You're better off using bcftools to extract just the GT information for each sample in a 2D matrix/table (where each record is
chr pos ref alt sample1_gt sample2_gt ... sampleN_gt
) and using python to work on this intermediate file.Try:
vcf-compare -g, --cmp-genotypes
from VCFtools It compares genotypes