# Path: bipy/toolbox/tophat.py
# FASTQ_FORMAT_TO_BCBIO = {"sanger": None,
#                          "illumina_1.3+": "illumina",
#                          "illumina_1.5+": "illumina",
#                          "illumina_1.8+": None,
#                          "solexa": "solexa"}
# def run_with_config(fastq_file, pair_file, ref_file,
#                     stage_name, config):
# def _bcbio_tophat_wrapper(fastq_file, pair_file, ref_file,
#                           stage_name, config):
#     def __init__(self, config):
#     def __call__(self, in_file):
#     def __init__(self, config):
#     def _bowtie_se(self, in_file, out_file):
#     def _bowtie_pe(self, in_file, out_file):
#     def _get_out_file(self, in_file):
#     def out_file(self, in_file):
#     def __call__(self, in_file):
# def any_bowtie_reference_exists(prefix):
# def bowtie_1_reference_exists(prefix):
# def bowtie_2_reference_exists(prefix):
# def bowtie_reference_not_found_error():
# class Tophat(AbstractStage):
# class Bowtie(AbstractStage):


import yaml
import unittest
import os
import tempfile
import shutil
from bipy.toolbox import tophat
from bcbio.utils import file_exists

STAGENAME = "tophat"

TOPHAT_1_CONFIG = "test/tophat/test_tophat.yaml"
TOPHAT_2_CONFIG = "test/tophat/test_tophat2_bowtie2.yaml"

def _load_config(config_file):
    with open(config_file) as in_handle:
        config = yaml.load(in_handle)
    return config

def _run_fixture(input_files, config):
    if len(input_files) == 2:

# Path: bipy/toolbox/tophat.py
# FASTQ_FORMAT_TO_BCBIO = {"sanger": None,
#                          "illumina_1.3+": "illumina",
#                          "illumina_1.5+": "illumina",
#                          "illumina_1.8+": None,
#                          "solexa": "solexa"}
# def run_with_config(fastq_file, pair_file, ref_file,
#                     stage_name, config):
# def _bcbio_tophat_wrapper(fastq_file, pair_file, ref_file,
#                           stage_name, config):
#     def __init__(self, config):
#     def __call__(self, in_file):
#     def __init__(self, config):
#     def _bowtie_se(self, in_file, out_file):
#     def _bowtie_pe(self, in_file, out_file):
#     def _get_out_file(self, in_file):
#     def out_file(self, in_file):
#     def __call__(self, in_file):
# def any_bowtie_reference_exists(prefix):
# def bowtie_1_reference_exists(prefix):
# def bowtie_2_reference_exists(prefix):
# def bowtie_reference_not_found_error():
# class Tophat(AbstractStage):
# class Bowtie(AbstractStage):


# Path: test/tophat/test_tophat.py
import yaml
import unittest
import os
import tempfile
import shutil
from bipy.toolbox import tophat
from bcbio.utils import file_exists


STAGENAME = "tophat"

TOPHAT_1_CONFIG = "test/tophat/test_tophat.yaml"
TOPHAT_2_CONFIG = "test/tophat/test_tophat2_bowtie2.yaml"

def _load_config(config_file):
    with open(config_file) as in_handle:
        config = yaml.load(in_handle)
    return config

def _run_fixture(input_files, config):
    if len(input_files) == 2:

        out_file = tophat.run_with_config(input_files[0], input_files[1],