def test_add_genotypes(self, variant): adapter = GeminiPlugin() gemini_variant = { 'gts': ['G/A', 'G/A', './.', './.', './.'], 'gt_depths': [17, 19, -1, -1, -1], 'gt_ref_depths': [10, 13, -1, -1, -1], 'gt_alt_depths': [7, 6, -1, -1, -1], 'gt_quals': [99, 99, -1, -1, -1], } ind = DotDict() ind.ind_index = 0 ind.ind_id = '1' ind.case_id = 'Case_1' ind.phenotype = 2 ind_objs = [ind] adapter._add_genotypes(variant, gemini_variant, ind_objs) genotype = variant.individuals[0] assert genotype.sample_id == ind.ind_id assert genotype.sample_id == ind.ind_id assert genotype.genotype == 'G/A' assert genotype.case_id == ind.case_id assert genotype.phenotype == ind.phenotype assert genotype.ref_depth == 10 assert genotype.alt_depth == 7 assert genotype.depth == 17 assert genotype.genotype_quality == 99
def test_add_genotypes(self, variant): adapter = GeminiPlugin() gemini_variant = { 'gts': ['G/A', 'G/A', './.', './.', './.'], 'gt_depths': [17, 19, -1, -1, -1], 'gt_ref_depths': [10, 13, -1, -1, -1], 'gt_alt_depths': [7, 6, -1, -1, -1], 'gt_quals': [99, 99, -1, -1, -1], } ind = DotDict() ind.ind_index = 0 ind.ind_id = '1' ind.phenotype = 2 ind_objs = [ind] adapter._add_genotypes(variant, gemini_variant, 'dummy', ind_objs) genotype = variant.individuals[0] assert genotype.sample_id == ind.ind_id assert genotype.sample_id == ind.ind_id assert genotype.genotype == 'G/A' assert genotype.case_id == 'dummy' assert genotype.phenotype == ind.phenotype assert genotype.ref_depth == 10 assert genotype.alt_depth == 7 assert genotype.depth == 17 assert genotype.genotype_quality == 99
def test_get_genotypes(gemini_variant): adapter = GeminiPlugin() ind = DotDict() ind.ind_index = 0 ind.ind_id = '1' ind.case_id = 'Case_1' ind.phenotype = 2 ind_objs = [ind] individual = adapter._get_genotypes(gemini_variant, ind_objs)[0] assert individual.sample_id == ind.ind_id assert individual.sample_id == ind.ind_id assert individual.genotype == 'G/A' assert individual.case_id == ind.case_id assert individual.phenotype == ind.phenotype assert individual.ref_depth == 10 assert individual.alt_depth == 7 assert individual.depth == 17 assert individual.genotype_quality == 99