def test_to_csv():
    filter_dict = {'freebayes_score': 200, 'frequency': 0.85, 'min_depth': 10,
                   'forward_depth': 3, 'reverse_depth': 3, 'strand_ratio': 0.3}
    v = VCF_freebayes(sequana_data('JB409847.expected.vcf'))
    filter_v = v.filter_vcf(filter_dict)
    with TempFile(suffix='.csv') as ft:
        filter_v.to_csv(ft.name)
def test_vcf_filter():
    vcf_output_expected = sequana_data('JB409847.expected.vcf')
    v = VCF_freebayes(sequana_data('JB409847.vcf'))
    filter_dict = {'freebayes_score': 200, 'frequency': 0.85, 'min_depth': 10,
                   'forward_depth': 3, 'reverse_depth': 3, 'strand_ratio': 0.3}
    filter_v = v.filter_vcf(filter_dict)
    with TempFile(suffix='.vcf') as ft:
        filter_v.to_vcf(ft.name)
        compare_file = filecmp.cmp(ft.name, vcf_output_expected)
        assert compare_file
Beispiel #3
0
def test_to_csv():
    filter_dict = {
        'freebayes_score': 200,
        'frequency': 0.85,
        'min_depth': 10,
        'forward_depth': 3,
        'reverse_depth': 3,
        'strand_ratio': 0.3
    }
    v = VCF_freebayes(sequana_data('JB409847.expected.vcf'))
    filter_v = v.filter_vcf(filter_dict)
    with TempFile(suffix='.csv') as ft:
        filter_v.to_csv(ft.name)
Beispiel #4
0
def test_vcf_filter():
    vcf_output_expected = sequana_data('JB409847.expected.vcf')
    v = VCF_freebayes(sequana_data('JB409847.vcf'))
    filter_dict = {
        'freebayes_score': 200,
        'frequency': 0.85,
        'min_depth': 10,
        'forward_depth': 3,
        'reverse_depth': 3,
        'strand_ratio': 0.3
    }
    filter_v = v.filter_vcf(filter_dict)
    with TempFile(suffix='.vcf') as ft:
        filter_v.to_vcf(ft.name)
        compare_file = filecmp.cmp(ft.name, vcf_output_expected)
        assert compare_file