# Path: ariba/sequence_variant.py
# class Error (Exception): pass
# class Variant:
#     def __init__(self, variant_type, variant_string, identifier):
#     def __eq__(self, other):
#     def __lt__(self, other):
#     def __str__(self):
#     def sanity_check_against_seq(self, seq, translate_seq=False):
#     def has_variant(self, seq):
#     def nucleotide_range(self):


from ariba import sequence_variant

class Error (Exception): pass


class SequenceMetadata:
    def __init__(self, line):
        try:
            self.name, seq_type, var_only, variant, variant_id, self.free_text = line.rstrip().split('\t')
        except:
            raise Error('Error parsing line of file:\n' + line)

        if seq_type not in {'0', '1'}:
            raise Error('Error. Second column must be "0" or "1". Cannot continue. Line was:\n' + line)

        self.seq_type = 'n' if seq_type == '0' else 'p'

        if var_only not in {'0', '1'}:
            raise Error('Error. Third column must be "0" or "1". Cannot continue. Line was:\n' + line)


# Path: ariba/sequence_variant.py
# class Error (Exception): pass
# class Variant:
#     def __init__(self, variant_type, variant_string, identifier):
#     def __eq__(self, other):
#     def __lt__(self, other):
#     def __str__(self):
#     def sanity_check_against_seq(self, seq, translate_seq=False):
#     def has_variant(self, seq):
#     def nucleotide_range(self):


# Path: ariba/sequence_metadata.py
from ariba import sequence_variant


class Error (Exception): pass


class SequenceMetadata:
    def __init__(self, line):
        try:
            self.name, seq_type, var_only, variant, variant_id, self.free_text = line.rstrip().split('\t')
        except:
            raise Error('Error parsing line of file:\n' + line)

        if seq_type not in {'0', '1'}:
            raise Error('Error. Second column must be "0" or "1". Cannot continue. Line was:\n' + line)

        self.seq_type = 'n' if seq_type == '0' else 'p'

        if var_only not in {'0', '1'}:
            raise Error('Error. Third column must be "0" or "1". Cannot continue. Line was:\n' + line)


        self.variant_only = var_only == '1'