This is a test version of Biostars. For the public version, visit https://www.biostars.org.
data comparison contained in two separate vcf files

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

python dictionnay code

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

0 answers

No answers yet.

Log in to answer this question.