def test_sv_frequencies_gnomad_exac(): ## GIVEN a variant object with gnomad annotation var = {"exac_frequency": 0.01, "category": "sv"} ## WHEN parsing the sv frequencies freq = frequencies(var) ## THEN assert the correct tuple is returned assert len(freq) == 1 assert freq[0] == ("GnomAD", var.get("exac_frequency"), None)
def test_sv_frequencies_all(): ## GIVEN a variant object with gnomad annotation var = { "gnomad_frequency": 0.02, "clingen_cgh_benign": 0.02, "clingen_cgh_pathogenic": 0.02, "clingen_ngi": 0.02, "clingen_mip": 0.02, "swegen": 0.02, "decipher": 0.02, "thousand_genomes_frequency": 0.02, "category": "sv", } ## WHEN parsing the sv frequencies freq = frequencies(var) ## THEN assert the correct tuple is returned assert len(freq) == 8 for annotation in freq: assert annotation[1] == 0.02