# Path: ariba/samtools_variants.py
# class Error (Exception): pass
# class SamtoolsVariants:
#     def __init__(self,
#       ref_fa,
#       bam,
#       outprefix,
#       log_fh=sys.stdout,
#       min_var_read_depth=4,
#       min_second_var_read_depth=2,
#       max_allele_freq=0.90
#     ):
#     def _make_vcf_and_read_depths_files(self):
#     def _get_read_depths(cls, read_depths_file, sequence_name, position):
#     def _get_variant_positions_from_vcf(cls, vcf_file):
#     def _get_variants(vcf_file, read_depths_file, positions=None):
#     def total_depth_per_contig(read_depths_file):
#     def variants_in_coords(nucmer_matches, vcf_file):
#     def get_depths_at_position(self, seq_name, position):
#     def run(self):


import unittest
import os
import filecmp
import pyfastaq
from ariba import samtools_variants

modules_dir = os.path.dirname(os.path.abspath(samtools_variants.__file__))
data_dir = os.path.join(modules_dir, 'tests', 'data')


def file2lines(filename):
    f = pyfastaq.utils.open_file_read(filename)
    lines = f.readlines()
    pyfastaq.utils.close(f)
    return lines


class TestSamtoolsVariants(unittest.TestCase):

# Path: ariba/samtools_variants.py
# class Error (Exception): pass
# class SamtoolsVariants:
#     def __init__(self,
#       ref_fa,
#       bam,
#       outprefix,
#       log_fh=sys.stdout,
#       min_var_read_depth=4,
#       min_second_var_read_depth=2,
#       max_allele_freq=0.90
#     ):
#     def _make_vcf_and_read_depths_files(self):
#     def _get_read_depths(cls, read_depths_file, sequence_name, position):
#     def _get_variant_positions_from_vcf(cls, vcf_file):
#     def _get_variants(vcf_file, read_depths_file, positions=None):
#     def total_depth_per_contig(read_depths_file):
#     def variants_in_coords(nucmer_matches, vcf_file):
#     def get_depths_at_position(self, seq_name, position):
#     def run(self):


# Path: ariba/tests/samtools_variants_test.py
import unittest
import os
import filecmp
import pyfastaq
from ariba import samtools_variants


modules_dir = os.path.dirname(os.path.abspath(samtools_variants.__file__))
data_dir = os.path.join(modules_dir, 'tests', 'data')


def file2lines(filename):
    f = pyfastaq.utils.open_file_read(filename)
    lines = f.readlines()
    pyfastaq.utils.close(f)
    return lines


class TestSamtoolsVariants(unittest.TestCase):

    def test_make_vcf_and_depths_files(self):