Exemplo n.º 1
0
def test_parse_callers_all(cyvcf2_variant, category):
    # GIVEN all callers called a cancer variant
    variant = cyvcf2_variant
    variant.INFO['set'] = 'Intersection'
    # WHEN parsing callers
    parsed_callers = parse_callers(variant, category=category)
    # THEN all callers should be in the dict
    legal_callers = set(caller['id'] for caller in CALLERS[category])
    assert legal_callers == set(parsed_callers.keys())
Exemplo n.º 2
0
def test_parse_callers_all(cyvcf2_variant, category):
    # GIVEN all callers called a cancer variant
    variant = cyvcf2_variant
    variant.INFO["set"] = "Intersection"
    # WHEN parsing callers
    parsed_callers = parse_callers(variant, category=category)
    # THEN all callers should be in the dict
    legal_callers = set(caller["id"] for caller in CALLERS[category])
    assert legal_callers == set(parsed_callers.keys())
Exemplo n.º 3
0
def test_parse_callers(one_vep104_annotated_variant):
    variant = one_vep104_annotated_variant

    assert variant.INFO["FOUND_IN"] == "deepvariant"

    # WHEN parsing the caller info
    callers = parse_callers(variant, category="snv")
    # THEN the deep variant caller should be found, but not GATK
    assert callers["deepvariant"] == "Pass"
    assert callers["gatk"] == None
Exemplo n.º 4
0
def test_parse_callers_intersection(cyvcf2_variant):
    variant = cyvcf2_variant
    # GIVEN information that all callers agree on Pass
    variant.INFO['set'] = 'Intersection'

    # WHEN parsing the information
    callers = parse_callers(variant)

    #THEN all callers should be passed
    assert callers['gatk'] == 'Pass'
    assert callers['freebayes'] == 'Pass'
    assert callers['samtools'] == 'Pass'
Exemplo n.º 5
0
def test_parse_callers_only_one(cyvcf2_variant):
    variant = cyvcf2_variant
    # GIVEN information about the variant callers
    variant.INFO['set'] = 'gatk'

    # WHEN parsing the information
    callers = parse_callers(variant)

    #THEN the correct callers should be passed
    assert callers['gatk'] == 'Pass'
    assert callers['freebayes'] == None
    assert callers['samtools'] == None
Exemplo n.º 6
0
def test_parse_callers(cyvcf2_variant):
    variant = cyvcf2_variant
    # GIVEN information that gatk and freebayes have passed
    variant.INFO['set'] = 'gatk-freebayes'

    # WHEN parsing the information
    callers = parse_callers(variant)

    #THEN the correct callers should be passed
    assert callers['gatk'] == 'Pass'
    assert callers['freebayes'] == 'Pass'
    assert callers['samtools'] == None
Exemplo n.º 7
0
def test_parse_callers_only_one(cyvcf2_variant):
    variant = cyvcf2_variant
    # GIVEN information about the variant callers
    variant.INFO['set'] = 'gatk'

    # WHEN parsing the information
    callers = parse_callers(variant)

    #THEN the correct callers should be passed
    assert callers['gatk'] == 'Pass'
    assert callers['freebayes'] == None
    assert callers['samtools'] == None
Exemplo n.º 8
0
def test_parse_callers_filtered_all(cyvcf2_variant):
    variant = cyvcf2_variant
    # GIVEN information that all callers agree on filtered
    variant.INFO['set'] = 'FilteredInAll'

    # WHEN parsing the information
    callers = parse_callers(variant)

    #THEN all callers should be filtered
    assert callers['gatk'] == 'Filtered'
    assert callers['freebayes'] == 'Filtered'
    assert callers['samtools'] == 'Filtered'
Exemplo n.º 9
0
def test_parse_callers(cyvcf2_variant):
    variant = cyvcf2_variant
    # GIVEN information that gatk and freebayes have passed
    variant.INFO['set'] = 'gatk-freebayes'

    # WHEN parsing the information
    callers = parse_callers(variant)

    #THEN the correct callers should be passed
    assert callers['gatk'] == 'Pass'
    assert callers['freebayes'] == 'Pass'
    assert callers['samtools'] == None
Exemplo n.º 10
0
def test_parse_callers_intersection(cyvcf2_variant):
    variant = cyvcf2_variant
    # GIVEN information that all callers agree on Pass
    variant.INFO['set'] = 'Intersection'

    # WHEN parsing the information
    callers = parse_callers(variant)

    #THEN all callers should be passed
    assert callers['gatk'] == 'Pass'
    assert callers['freebayes'] == 'Pass'
    assert callers['samtools'] == 'Pass'
Exemplo n.º 11
0
def test_parse_callers_complex(cyvcf2_variant):
    variant = cyvcf2_variant
    # GIVEN information about the variant callers
    variant.INFO['set'] = 'gatk-filterInsamtools-freebayes'

    # WHEN parsing the information
    callers = parse_callers(variant)

    #THEN the correct output should be returned
    assert callers['gatk'] == 'Pass'
    assert callers['freebayes'] == 'Pass'
    assert callers['samtools'] == 'Filtered'
Exemplo n.º 12
0
def test_parse_callers_filtered_all(cyvcf2_variant):
    variant = cyvcf2_variant
    # GIVEN information that all callers agree on filtered
    variant.INFO['set'] = 'FilteredInAll'

    # WHEN parsing the information
    callers = parse_callers(variant)

    #THEN all callers should be filtered
    assert callers['gatk'] == 'Filtered'
    assert callers['freebayes'] == 'Filtered'
    assert callers['samtools'] == 'Filtered'
Exemplo n.º 13
0
def test_parse_callers_complex(cyvcf2_variant):
    variant = cyvcf2_variant
    # GIVEN information about the variant callers
    variant.INFO['set'] = 'gatk-filterInsamtools-freebayes'

    # WHEN parsing the information
    callers = parse_callers(variant)

    #THEN the correct output should be returned
    assert callers['gatk'] == 'Pass'
    assert callers['freebayes'] == 'Pass'
    assert callers['samtools'] == 'Filtered'
Exemplo n.º 14
0
def test_parse_callers(cyvcf2_variant):
    variant = cyvcf2_variant
    # GIVEN information that gatk and freebayes have passed
    variant.INFO["set"] = "gatk-freebayes"

    # WHEN parsing the information
    callers = parse_callers(variant)

    # THEN the correct callers should be passed
    assert callers["gatk"] == "Pass"
    assert callers["freebayes"] == "Pass"
    assert callers["samtools"] == None
Exemplo n.º 15
0
def test_parse_callers_filtered_all(cyvcf2_variant):
    variant = cyvcf2_variant
    # GIVEN information that all callers agree on filtered
    variant.INFO["set"] = "FilteredInAll"

    # WHEN parsing the information
    callers = parse_callers(variant)

    # THEN all callers should be filtered
    assert callers["gatk"] == "Filtered"
    assert callers["freebayes"] == "Filtered"
    assert callers["samtools"] == "Filtered"
Exemplo n.º 16
0
def test_parse_callers_intersection(cyvcf2_variant):
    variant = cyvcf2_variant
    # GIVEN information that all callers agree on Pass
    variant.INFO["set"] = "Intersection"

    # WHEN parsing the information
    callers = parse_callers(variant)

    # THEN all callers should be passed
    assert callers["gatk"] == "Pass"
    assert callers["freebayes"] == "Pass"
    assert callers["samtools"] == "Pass"
Exemplo n.º 17
0
def test_parse_callers_complex(cyvcf2_variant):
    variant = cyvcf2_variant
    # GIVEN information about the variant callers
    variant.INFO["set"] = "gatk-filterInsamtools-freebayes"

    # WHEN parsing the information
    callers = parse_callers(variant)

    # THEN the correct output should be returned
    assert callers["gatk"] == "Pass"
    assert callers["freebayes"] == "Pass"
    assert callers["samtools"] == "Filtered"
Exemplo n.º 18
0
def test_parse_callers_only_one(cyvcf2_variant):
    variant = cyvcf2_variant
    # GIVEN information about the variant callers
    variant.INFO["set"] = "gatk"

    # WHEN parsing the information
    callers = parse_callers(variant)

    # THEN the correct callers should be passed
    assert callers["gatk"] == "Pass"
    assert callers["freebayes"] == None
    assert callers["samtools"] == None
Exemplo n.º 19
0
def test_parse_sv_callers_intersection(cyvcf2_variant):
    variant = cyvcf2_variant
    # GIVEN information that all callers agree on filtered
    variant.INFO["set"] = "Intersection"

    # WHEN parsing the information
    callers = parse_callers(variant, category="sv")

    # THEN all callers should be filtered
    assert callers["cnvnator"] == "Pass"
    assert callers["delly"] == "Pass"
    assert callers["tiddit"] == "Pass"
    assert callers["manta"] == "Pass"
Exemplo n.º 20
0
def test_parse_sv_callers_filterin_tiddit(cyvcf2_variant):
    variant = cyvcf2_variant
    # GIVEN information that all callers agree on filtered
    variant.INFO['set'] = 'manta-filterIntiddit'

    # WHEN parsing the information
    callers = parse_callers(variant, category='sv')

    #THEN all callers should be filtered
    assert callers['cnvnator'] == None
    assert callers['delly'] == None
    assert callers['tiddit'] == 'Filtered'
    assert callers['manta'] == 'Pass'
Exemplo n.º 21
0
def test_parse_sv_callers_intersection(cyvcf2_variant):
    variant = cyvcf2_variant
    variant.var_type = 'sv'
    # GIVEN information that all callers agree on filtered
    variant.INFO['set'] = 'Intersection'

    # WHEN parsing the information
    callers = parse_callers(variant)

    #THEN all callers should be filtered
    assert callers['cnvnator'] == 'Pass'
    assert callers['delly'] == 'Pass'
    assert callers['tiddit'] == 'Pass'
    assert callers['manta'] == 'Pass'