/GenotypeTools

Python code for reading, writing, and analyzing genotypes in various file formats

Primary LanguagePython

GenotypeTools

genotype_matrix.py

Contains the class GenotypeMatrix, which constructs a matrix of strains by positions, with entries being SNP information at each position. Can be read from CSV file or calculated from list of strains, list of positions, and provided genotype data extracted from VCF files. Calculates allele frequencies and major/minor alleles at each site. Can be used to write fasta alignments, csv files, and GEMMA input files