# Path: bipy/toolbox/fastqc.py
# _FASTQ_RANGES = {"sanger": [33, 73],
#                  "solexa": [59, 104],
#                  "illumina_1.3+": [64, 104],
#                  "illumina_1.5+": [66, 104],
#                  "illumina_1.8+": [33, 74]}
# MODULE_NAMES = ["Basic Statistics", "Per base sequence quality",
#                 "Per sequence quality scores",
#                 "Per base sequence content",
#                 "Per base GC content",
#                 "Per sequence GC content",
#                 "Per base N content",
#                 "Sequence Length Distribution",
#                 "Overrepresented sequences"]
#     GRAPHS = (("per_base_quality.png", "", 1.0),
#               ("per_base_sequence_content.png", "", 0.85),
#               ("per_sequence_gc_content.png", "", 0.85),
#               ("kmer_profiles.png", "", 0.85),
#               ("duplication_levels.png", "", 0.85),
#               ("per_bases_n_content.png", "", 0.85),
#               ("per_sequence_quality.png", "", 1.0),
#               ("sequence_length_distribution.png", "", 1.0))
#     REPORT_LOOKUP = {"rnaseq": RNASeqFastQCReport}
#     CAPTIONS = {"per_base_quality.png": "",
#                 "per_base_sequence_content.png": "",
#                 "per_sequence_gc_content.png": "",
#                 "kmer_profiles.png": "",
#                 "duplication_levels.png": "",
#                 "per_bases_n_content.png": "",
#                 "per_sequence_quality.png": "",
#                 "sequence_length_distribution.png": ""}
#     CAPTIONS = {"per_base_quality.png": "",
#                 "per_base_sequence_content.png": "",
#                 "per_sequence_gc_content.png": "",
#                 "kmer_profiles.png": "",
#                 "duplication_levels.png": "",
#                 "per_bases_n_content.png": "",
#                 "per_sequence_quality.png": "",
#                 "sequence_length_distribution.png": ""}
# def detect_fastq_format(in_file, MAX_RECORDS=1000000):
# def _make_outdir(config):
# def _make_outfile(input_file, config):
# def _build_command(input_file, fastqc_config, config):
# def run(input_file, fastqc_config, config):
#     def __init__(self, base_dir):
#     def get_fastqc_graphs(self):
#     def get_fastqc_summary(self):
#     def _fastqc_data_section(self, section_name):
# def report(base_dir, report_type=None):
#     def template(self):
#     def _add_captions(self, figures):
#     def generate_report(self, name=None, summary=None, figures=None,
#                         overrep=None):
#     def __init__(self, config):
#     def _start_message(self, in_file):
#     def _end_message(self, in_file, out_file):
#     def _memoized_message(self, in_file, out_file):
#     def _check_run(self, in_file):
#     def __call__(self, in_file):
# class FastQCParser(object):
# class FastQCReport(LatexReport):
# class RNASeqFastQCReport(FastQCReport):
# class FastQC(AbstractStage):


import yaml
import unittest
import os
import filecmp
import shutil
from bipy.toolbox import fastqc
from bcbio.utils import file_exists

cur_dir = os.path.dirname(os.path.realpath(__file__))
CONFIG_FILE = os.path.join(cur_dir, "test_fastqc.yaml")


class TestFastqc(unittest.TestCase):

    def setUp(self):
        with open(CONFIG_FILE) as in_handle:
            self.config = yaml.load(in_handle)

# Path: bipy/toolbox/fastqc.py
# _FASTQ_RANGES = {"sanger": [33, 73],
#                  "solexa": [59, 104],
#                  "illumina_1.3+": [64, 104],
#                  "illumina_1.5+": [66, 104],
#                  "illumina_1.8+": [33, 74]}
# MODULE_NAMES = ["Basic Statistics", "Per base sequence quality",
#                 "Per sequence quality scores",
#                 "Per base sequence content",
#                 "Per base GC content",
#                 "Per sequence GC content",
#                 "Per base N content",
#                 "Sequence Length Distribution",
#                 "Overrepresented sequences"]
#     GRAPHS = (("per_base_quality.png", "", 1.0),
#               ("per_base_sequence_content.png", "", 0.85),
#               ("per_sequence_gc_content.png", "", 0.85),
#               ("kmer_profiles.png", "", 0.85),
#               ("duplication_levels.png", "", 0.85),
#               ("per_bases_n_content.png", "", 0.85),
#               ("per_sequence_quality.png", "", 1.0),
#               ("sequence_length_distribution.png", "", 1.0))
#     REPORT_LOOKUP = {"rnaseq": RNASeqFastQCReport}
#     CAPTIONS = {"per_base_quality.png": "",
#                 "per_base_sequence_content.png": "",
#                 "per_sequence_gc_content.png": "",
#                 "kmer_profiles.png": "",
#                 "duplication_levels.png": "",
#                 "per_bases_n_content.png": "",
#                 "per_sequence_quality.png": "",
#                 "sequence_length_distribution.png": ""}
#     CAPTIONS = {"per_base_quality.png": "",
#                 "per_base_sequence_content.png": "",
#                 "per_sequence_gc_content.png": "",
#                 "kmer_profiles.png": "",
#                 "duplication_levels.png": "",
#                 "per_bases_n_content.png": "",
#                 "per_sequence_quality.png": "",
#                 "sequence_length_distribution.png": ""}
# def detect_fastq_format(in_file, MAX_RECORDS=1000000):
# def _make_outdir(config):
# def _make_outfile(input_file, config):
# def _build_command(input_file, fastqc_config, config):
# def run(input_file, fastqc_config, config):
#     def __init__(self, base_dir):
#     def get_fastqc_graphs(self):
#     def get_fastqc_summary(self):
#     def _fastqc_data_section(self, section_name):
# def report(base_dir, report_type=None):
#     def template(self):
#     def _add_captions(self, figures):
#     def generate_report(self, name=None, summary=None, figures=None,
#                         overrep=None):
#     def __init__(self, config):
#     def _start_message(self, in_file):
#     def _end_message(self, in_file, out_file):
#     def _memoized_message(self, in_file, out_file):
#     def _check_run(self, in_file):
#     def __call__(self, in_file):
# class FastQCParser(object):
# class FastQCReport(LatexReport):
# class RNASeqFastQCReport(FastQCReport):
# class FastQC(AbstractStage):


# Path: test/fastqc/test_fastqc.py
import yaml
import unittest
import os
import filecmp
import shutil
from bipy.toolbox import fastqc
from bcbio.utils import file_exists


cur_dir = os.path.dirname(os.path.realpath(__file__))
CONFIG_FILE = os.path.join(cur_dir, "test_fastqc.yaml")


class TestFastqc(unittest.TestCase):

    def setUp(self):
        with open(CONFIG_FILE) as in_handle:
            self.config = yaml.load(in_handle)

        self.stage = fastqc.FastQC(self.config)