# Path: jacquard/utils/vcf.py
# class FileWriter(object):
#     """Trivial wrapper around os file to expedite testing."""
#     def __init__(self, output_filepath):
#         self.output_filepath = output_filepath
#         self._file_writer = None
# 
#     @property
#     def file_name(self):
#         return os.path.basename(self.output_filepath)
# 
#     def open(self):
#         self._file_writer = open(self.output_filepath, "w")
# 
#     def write(self, text):
#         return self._file_writer.write(text)
# 
#     def close(self):
#         self._file_writer.close()
# 
#     def __eq__(self, other):
#         return (isinstance(other, self.__class__)
#                 and self.__dict__ == other.__dict__)
# 
#     def __ne__(self, other):
#         return not self.__eq__(other)
# 
#     def __hash__(self):
#         return hash(self.output_filepath)


from collections import defaultdict, OrderedDict
from jacquard.utils.vcf import FileWriter
import glob
import os
import re
import natsort
import textwrap
import jacquard.utils.logger as logger
import jacquard.utils.utils as utils
import jacquard.utils.vcf as vcf
    parser.add_argument("--force", action='store_true', help="Overwrite contents of output directory")
    parser.add_argument("--log_file", help="Log file destination", metavar="")
    parser.add_argument("-v", "--verbose", action='store_true')

def _predict_output(args):
    desired_output_files = set([os.path.basename(args.output)])

    return desired_output_files

def report_prediction(args):
    return _predict_output(args)

def get_required_input_output_types():
    return ("directory", "file")

#TODO (cgates): Validate should actually validate
def validate_args(dummy):
    pass

def execute(args, execution_context):
    input_path = os.path.abspath(args.input)
    output_path = os.path.abspath(args.output)
    filter_strategy = _Filter(args)
    format_tag_regex = _get_format_tag_regex(args)

    input_files = sorted(glob.glob(os.path.join(input_path, "*.vcf")))
    file_readers = [vcf.FileReader(i) for i in input_files]
    _validate_consistent_samples(file_readers)

    try:

# Path: jacquard/utils/vcf.py
# class FileWriter(object):
#     """Trivial wrapper around os file to expedite testing."""
#     def __init__(self, output_filepath):
#         self.output_filepath = output_filepath
#         self._file_writer = None
# 
#     @property
#     def file_name(self):
#         return os.path.basename(self.output_filepath)
# 
#     def open(self):
#         self._file_writer = open(self.output_filepath, "w")
# 
#     def write(self, text):
#         return self._file_writer.write(text)
# 
#     def close(self):
#         self._file_writer.close()
# 
#     def __eq__(self, other):
#         return (isinstance(other, self.__class__)
#                 and self.__dict__ == other.__dict__)
# 
#     def __ne__(self, other):
#         return not self.__eq__(other)
# 
#     def __hash__(self):
#         return hash(self.output_filepath)


# Path: jacquard/merge.py
from collections import defaultdict, OrderedDict
from jacquard.utils.vcf import FileWriter
import glob
import os
import re
import natsort
import textwrap
import jacquard.utils.logger as logger
import jacquard.utils.utils as utils
import jacquard.utils.vcf as vcf

    parser.add_argument("--force", action='store_true', help="Overwrite contents of output directory")
    parser.add_argument("--log_file", help="Log file destination", metavar="")
    parser.add_argument("-v", "--verbose", action='store_true')

def _predict_output(args):
    desired_output_files = set([os.path.basename(args.output)])

    return desired_output_files

def report_prediction(args):
    return _predict_output(args)

def get_required_input_output_types():
    return ("directory", "file")

#TODO (cgates): Validate should actually validate
def validate_args(dummy):
    pass

def execute(args, execution_context):
    input_path = os.path.abspath(args.input)
    output_path = os.path.abspath(args.output)
    filter_strategy = _Filter(args)
    format_tag_regex = _get_format_tag_regex(args)

    input_files = sorted(glob.glob(os.path.join(input_path, "*.vcf")))
    file_readers = [vcf.FileReader(i) for i in input_files]
    _validate_consistent_samples(file_readers)

    try:

        file_writer = vcf.FileWriter(output_path)