def setup_class(self): """Setup a simple family with family id 1, sick son id 1, healthy father id 2, healthy mother id 3""" # Setup family with sick kid, sick father and healthy mother: self.recessive_family = family.Family(family_id = '1') sick_son = individual.Individual(ind='1', family='1',mother='3', father='2', sex=1, phenotype=2) healthy_father = individual.Individual(ind='2', family='1',mother='0', father='0', sex=1, phenotype=1) healthy_mother = individual.Individual(ind='3', family='1',mother='0', father='0', sex=2, phenotype=1) #Setup variant with only autosomal dominant de novo pattern self.recessive_dn_variant = genetic_variant.Variant(chrom = '1', start = 5, stop=5, alternative = 'A', reference = 'C', identity = 'rs2230749') sick_son.add_genotype(self.recessive_dn_variant.variant_id, genotype.Genotype(GT='1/1')) healthy_father.add_genotype(self.recessive_dn_variant.variant_id, genotype.Genotype(GT='0/1')) healthy_mother.add_genotype(self.recessive_dn_variant.variant_id, genotype.Genotype(GT='0/0')) #Setup variant with only autosomal recessive pattern self.recessive_variant = genetic_variant.Variant(chrom = '1', start = 10, stop=10, alternative = 'C', reference = 'T') sick_son.add_genotype(self.recessive_variant.variant_id, genotype.Genotype(GT='1/1')) healthy_father.add_genotype(self.recessive_variant.variant_id, genotype.Genotype(GT='0/1')) healthy_mother.add_genotype(self.recessive_variant.variant_id, genotype.Genotype(GT='0/1')) #Setup potential recessive but does not follow any patterns self.almost_recessive_variant = genetic_variant.Variant(chrom = '1', start = 20, stop=20, alternative = 'C', reference = 'T') sick_son.add_genotype(self.almost_recessive_variant.variant_id, genotype.Genotype(GT='./.')) healthy_father.add_genotype(self.almost_recessive_variant.variant_id, genotype.Genotype(GT='0/1')) healthy_mother.add_genotype(self.almost_recessive_variant.variant_id, genotype.Genotype(GT='0/1')) self.recessive_family.add_individual(healthy_father) self.recessive_family.add_individual(sick_son) self.recessive_family.add_individual(healthy_mother) self.recessive_family.add_variant(self.recessive_dn_variant) self.recessive_family.add_variant(self.recessive_variant) self.recessive_family.add_variant(self.almost_recessive_variant) self.my_healthy_father_model = genetic_models.genetic_models(self.recessive_family)
def setup_class(self): """Setup a simple family with family id 1, sick son id 1, healthy father id 2, healthy mother id 3""" # Setup family with sick kid, sick father and healthy mother: self.recessive_family = family.Family(family_id = '1') sick_son = individual.Individual(ind='1', family='1',mother='3', father='2', sex=1, phenotype=2) healthy_father = individual.Individual(ind='2', family='1',mother='0', father='0', sex=1, phenotype=1) healthy_mother = individual.Individual(ind='3', family='1',mother='0', father='0', sex=2, phenotype=1) #Setup two variants with only autosomal recessive pattern self.recessive_comp_variant_1 = genetic_variant.Variant(chrom = '1', start = 5, stop=5, alternative = 'A', reference = 'C', identity = 'rs2230749', all_info={'Ensemble_GeneID':'ENSG00000187634;'}) self.recessive_comp_variant_2 = genetic_variant.Variant(chrom = '1', start = 10, stop=10, alternative = 'C', reference = 'T', identity = '.', all_info={'Ensemble_GeneID':'ENSG00000187634;'}) sick_son.add_genotype(self.recessive_comp_variant_1.variant_id, genotype.Genotype(GT='0/1')) healthy_father.add_genotype(self.recessive_comp_variant_1.variant_id, genotype.Genotype(GT='0/1')) healthy_mother.add_genotype(self.recessive_comp_variant_1.variant_id, genotype.Genotype(GT='0/0')) sick_son.add_genotype(self.recessive_comp_variant_2.variant_id, genotype.Genotype(GT='0/1')) healthy_father.add_genotype(self.recessive_comp_variant_2.variant_id, genotype.Genotype(GT='0/0')) healthy_mother.add_genotype(self.recessive_comp_variant_2.variant_id, genotype.Genotype(GT='0/1')) self.recessive_family.add_individual(healthy_father) self.recessive_family.add_individual(sick_son) self.recessive_family.add_individual(healthy_mother) self.recessive_family.add_variant(self.recessive_comp_variant_1) self.recessive_family.add_variant(self.recessive_comp_variant_2) self.my_healthy_father_model = genetic_models.genetic_models(self.recessive_family) for variant in self.recessive_family.variants: self.recessive_family.variants[variant].check_models()
def setup_class(self): """Setup a simple family with family id 1, sick daughter id 1, healthy father id 2, healthy mother id 3""" # Setup family with sick kid, sick father and healthy mother: self.sick_father_family = family.Family(family_id='2') sick_daugther = individual.Individual(ind='1', family='2', mother='3', father='2', sex=2, phenotype=2) sick_father = individual.Individual(ind='2', family='2', mother='0', father='0', sex=1, phenotype=2) healthy_mother = individual.Individual(ind='3', family='2', mother='0', father='0', sex=2, phenotype=1) #Setup variant with only autosomal dominant pattern self.dominant_variant = genetic_variant.Variant(chrom='1', start=5, stop=5, alternative='A', reference='C', identity='rs2230749') sick_daugther.add_genotype(self.dominant_variant.variant_id, genotype.Genotype(GT='0/1')) sick_father.add_genotype(self.dominant_variant.variant_id, genotype.Genotype(GT='0/1')) healthy_mother.add_genotype(self.dominant_variant.variant_id, genotype.Genotype(GT='0/0')) #Setup variant with only autosomal recessive pattern(Should not work here) self.recessive_variant = genetic_variant.Variant(chrom='1', start=10, stop=10, alternative='C', reference='T') sick_daugther.add_genotype(self.recessive_variant.variant_id, genotype.Genotype(GT='1/1')) sick_father.add_genotype(self.recessive_variant.variant_id, genotype.Genotype(GT='0/1')) healthy_mother.add_genotype(self.recessive_variant.variant_id, genotype.Genotype(GT='0/1')) self.sick_father_family.add_individual(sick_father) self.sick_father_family.add_individual(sick_daugther) self.sick_father_family.add_individual(healthy_mother) self.sick_father_family.add_variant(self.dominant_variant) self.sick_father_family.add_variant(self.recessive_variant) self.my_sick_father_model = genetic_models.genetic_models( self.sick_father_family)
def setup_class(self): """Setup a simple family with family id 1, sick son id 1, healthy father id 2, healthy mother id 3""" # Setup family with sick kid, sick father and healthy mother: self.recessive_family = family.Family(family_id='1') sick_son = individual.Individual(ind='1', family='1', mother='3', father='2', sex=1, phenotype=2) healthy_father = individual.Individual(ind='2', family='1', mother='0', father='0', sex=1, phenotype=1) healthy_mother = individual.Individual(ind='3', family='1', mother='0', father='0', sex=2, phenotype=1) #Setup a variant where all are homozygote alternative self.homozygote_alternative = genetic_variant.Variant( chrom='1', start=5, stop=5, alternative='A', reference='C', identity='rs2230749', all_info={'Ensemble_GeneID': 'ENSG00000187634;'}) sick_son.add_genotype(self.homozygote_alternative.variant_id, genotype.Genotype(GT='1/1')) healthy_father.add_genotype(self.homozygote_alternative.variant_id, genotype.Genotype(GT='1/1')) healthy_mother.add_genotype(self.homozygote_alternative.variant_id, genotype.Genotype(GT='1/0')) #Setup a variant that is recessive de novo self.recessive_dn = genetic_variant.Variant( chrom='1', start=6, stop=6, alternative='C', reference='T', identity='.', all_info={'Ensemble_GeneID': 'ENSG00000187634;'}) sick_son.add_genotype(self.recessive_dn.variant_id, genotype.Genotype(GT='1/1')) healthy_father.add_genotype(self.recessive_dn.variant_id, genotype.Genotype(GT='./.')) healthy_mother.add_genotype(self.recessive_dn.variant_id, genotype.Genotype(GT='0/1')) self.recessive_family.add_individual(healthy_father) self.recessive_family.add_individual(sick_son) self.recessive_family.add_individual(healthy_mother) self.recessive_family.add_variant(self.homozygote_alternative) self.recessive_family.add_variant(self.recessive_dn) self.my_healthy_father_model = genetic_models.genetic_models( self.recessive_family) for variant in self.recessive_family.variants: self.recessive_family.variants[variant].check_models()