コード例 #1
0
ファイル: test_x_dominant.py プロジェクト: szilvajuhos/genmod
def test_x_affected_male_ref_call():
    """Test an affected ref call male"""

    family_lines = [
        "#FamilyID\tSampleID\tFather\tMother\tSex\tPhenotype\n",
        "1\tproband\t0\t0\t1\t2\n"
    ]

    family = get_family(family_lines=family_lines)

    homozygote_variant = {'genotypes': {}}
    homozygote_variant['genotypes']['proband'] = Genotype(**{'GT': '0/0'})

    assert check_X_dominant(variant=homozygote_variant, family=family) == False
コード例 #2
0
ファイル: test_x_dominant.py プロジェクト: szilvajuhos/genmod
def test_x_affected_recessive_male():
    """Test a sick male
    """
    family_lines = [
        "#FamilyID\tSampleID\tFather\tMother\tSex\tPhenotype\n",
        "1\tproband\t0\t0\t1\t2\n"
    ]

    family = get_family(family_lines=family_lines)

    recessive_variant = {'genotypes': {}}
    recessive_variant['genotypes']['proband'] = Genotype(**{'GT': '0/1'})

    assert check_X_dominant(variant=recessive_variant, family=family) == True
コード例 #3
0
ファイル: test_x_dominant.py プロジェクト: szilvajuhos/genmod
def test_x_healthy_homozygote_female():
    """Test an healthy homozygote female"""

    family_lines = [
        "#FamilyID\tSampleID\tFather\tMother\tSex\tPhenotype\n",
        "1\tproband\t0\t0\t2\t1\n"
    ]

    family = get_family(family_lines=family_lines)

    homozygote_variant = {'genotypes': {}}
    homozygote_variant['genotypes']['proband'] = Genotype(**{'GT': '1/1'})

    assert check_X_dominant(variant=homozygote_variant, family=family) == False
コード例 #4
0
ファイル: test_x_dominant.py プロジェクト: szilvajuhos/genmod
def test_x_affected_recessive_female():
    """Test a sick heterozygote female
    
    Females needs to bo hom alt to follow pattern
    """
    family_lines = [
        "#FamilyID\tSampleID\tFather\tMother\tSex\tPhenotype\n",
        "1\tproband\t0\t0\t2\t2\n"
    ]

    family = get_family(family_lines=family_lines)

    recessive_variant = {'genotypes': {}}
    recessive_variant['genotypes']['proband'] = Genotype(**{'GT': '0/1'})

    assert check_X_dominant(variant=recessive_variant, family=family) == True
コード例 #5
0
ファイル: test_x_dominant.py プロジェクト: szilvajuhos/genmod
def test_x_affected_no_call_male():
    """Test a sick male with no gt call
    
    This should be true since there is no information that contradicts the model
    """
    family_lines = [
        "#FamilyID\tSampleID\tFather\tMother\tSex\tPhenotype\n",
        "1\tproband\t0\t0\t1\t2\n"
    ]

    family = get_family(family_lines=family_lines)

    no_call_variant = {'genotypes': {}}
    no_call_variant['genotypes']['proband'] = Genotype(**{'GT': './.'})

    assert check_X_dominant(variant=no_call_variant, family=family) == True
コード例 #6
0
ファイル: test_x_dominant.py プロジェクト: lierhan/genmod
def test_x_affected_male_ref_call():
    """Test an affected ref call male"""
    
    family_lines = [
        "#FamilyID\tSampleID\tFather\tMother\tSex\tPhenotype\n",
        "1\tproband\t0\t0\t1\t2\n"
    ]
    
    family = get_family(family_lines=family_lines)
    
    homozygote_variant = {'genotypes': {}}
    homozygote_variant['genotypes']['proband'] = Genotype(**{'GT':'0/0'})
    
    assert check_X_dominant(
        variant = homozygote_variant,
        family = family
    ) == False
コード例 #7
0
ファイル: test_x_dominant.py プロジェクト: lierhan/genmod
def test_x_healthy_homozygote_female():
    """Test an healthy homozygote female"""
    
    family_lines = [
        "#FamilyID\tSampleID\tFather\tMother\tSex\tPhenotype\n",
        "1\tproband\t0\t0\t2\t1\n"
    ]
    
    family = get_family(family_lines=family_lines)
    
    homozygote_variant = {'genotypes': {}}
    homozygote_variant['genotypes']['proband'] = Genotype(**{'GT':'1/1'})
    
    assert check_X_dominant(
        variant = homozygote_variant,
        family = family
    ) == False
コード例 #8
0
ファイル: test_x_dominant.py プロジェクト: lierhan/genmod
def test_x_affected_recessive_male():
    """Test a sick male
    """
    family_lines = [
        "#FamilyID\tSampleID\tFather\tMother\tSex\tPhenotype\n",
        "1\tproband\t0\t0\t1\t2\n"
    ]
    
    family = get_family(family_lines=family_lines)
    
    recessive_variant = {'genotypes': {}}
    recessive_variant['genotypes']['proband'] = Genotype(**{'GT':'0/1'})
    
    assert check_X_dominant(
        variant = recessive_variant,
        family = family
    ) == True
コード例 #9
0
ファイル: test_x_dominant.py プロジェクト: lierhan/genmod
def test_x_affected_recessive_female():
    """Test a sick heterozygote female
    
    Females needs to bo hom alt to follow pattern
    """
    family_lines = [
        "#FamilyID\tSampleID\tFather\tMother\tSex\tPhenotype\n",
        "1\tproband\t0\t0\t2\t2\n"
    ]
    
    family = get_family(family_lines=family_lines)
    
    recessive_variant = {'genotypes': {}}
    recessive_variant['genotypes']['proband'] = Genotype(**{'GT':'0/1'})
    
    assert check_X_dominant(
        variant = recessive_variant,
        family = family
    ) == True
コード例 #10
0
ファイル: test_x_dominant.py プロジェクト: lierhan/genmod
def test_x_affected_no_call_male():
    """Test a sick male with no gt call
    
    This should be true since there is no information that contradicts the model
    """
    family_lines = [
        "#FamilyID\tSampleID\tFather\tMother\tSex\tPhenotype\n",
        "1\tproband\t0\t0\t1\t2\n"
    ]
    
    family = get_family(family_lines=family_lines)
    
    no_call_variant = {'genotypes': {}}
    no_call_variant['genotypes']['proband'] = Genotype(**{'GT':'./.'})
    
    assert check_X_dominant(
        variant = no_call_variant,
        family = family
    ) == True
コード例 #11
0
ファイル: test_x_dominant.py プロジェクト: szilvajuhos/genmod
def test_x_affected_no_call_male_strict():
    """Test a sick male with no gt call
    
    This should not be true since we allways need 'proof'
    for an inheritance pattern if strict mode.
    """
    family_lines = [
        "#FamilyID\tSampleID\tFather\tMother\tSex\tPhenotype\n",
        "1\tproband\t0\t0\t1\t2\n"
    ]

    family = get_family(family_lines=family_lines)

    no_call_variant = {'genotypes': {}}
    no_call_variant['genotypes']['proband'] = Genotype(**{'GT': './.'})

    assert check_X_dominant(variant=no_call_variant,
                            family=family,
                            strict=True) == False
コード例 #12
0
ファイル: test_x_dominant.py プロジェクト: lierhan/genmod
def test_x_affected_no_call_male_strict():
    """Test a sick male with no gt call
    
    This should not be true since we allways need 'proof'
    for an inheritance pattern if strict mode.
    """
    family_lines = [
        "#FamilyID\tSampleID\tFather\tMother\tSex\tPhenotype\n",
        "1\tproband\t0\t0\t1\t2\n"
    ]
    
    family = get_family(family_lines=family_lines)
    
    no_call_variant = {'genotypes': {}}
    no_call_variant['genotypes']['proband'] = Genotype(**{'GT':'./.'})
    
    assert check_X_dominant(
        variant = no_call_variant,
        family = family,
        strict = True
    ) == False