# Path: lib/gsample.py
# def log(msg):
# def index(reference, fastindex_path = "tools/fastindex"):
# def index_legacy(reference):
# def downsample(index, contig_filename, downsampled_filename, region_count, target_len, single_contig=False,
# 			   region_list=False, spacer_len=200):
# def csample(infile, region_size, sample_fraction, spacer_len=200, fastindex_path=""):
# def ctranslate(reference_file, sampled_index_file, sam_file, target_file, fastindex_path=""):
# 
# Path: tools/fastq2sam.py
# def encode_qname(qname, retain_petag=True):
# 	def __init__(self):
# 	def __init__(self, filename, pe):
# 	def readline(self):
# 	def next_read(self):
# 	def __init__(self):
# 	def align(read):
# 	def align(self, read, paired=False, is_read1=True):
# 	def align_pair(self, read1, read2):
# 	def align(self, read, paired=False, is_read1=True):
# 	def align_pair(self, read1, read2):
# 	def __init__(self, aligner, outfile):
# 	def write(self, what):
# 	def write_sam_header(self, reads):
# 	def write_single(self, read, to):
# 	def align_se(self, infile):
# 	def align_pe(self, infile_1, infile_2):
# class Object:
# class FASTQ:
# class Aligner:
# class DummyAligner(Aligner):
# class dwgsim(Aligner):
# class Converter:
# 
# Path: lib/sam.py
# class SAMRow:
# class SAMFile:
# class Object:
# class FASTQ:
# 	def __init__(self):
# 	def getTag(self,tag_name):
# 	def __init__(self, filename):
# 	def close(self):
# 	def hasLast(self):
# 	def getLast(self):
# 	def getCurr(self):
# 	def getHeader(self):
# 	def isSorted(self):
# 	def next(self):
# 	def __init__(self):
# 	def __init__(self, filename, write=False):
# 	def readline(self):
# 	def next_read(self):
# 	def write_read(self,read):
# 	def close(self):


import os
import shutil
import time
import yaml
import util
import simulator
	import main
from lib import gsample
from tools import fastq2sam
from lib import sam

		self.default_test["sampling"] = {}
		self.default_test["sampling"]["enable"] = True
		self.default_test["sampling"]["ratio"] = None
		self.default_test["sampling"]["region_len_multiplier"] = 10
		self.default_test["sampling"]["region_len"] = None
		self.default_test["sampling"]["region_pad"] = None

		self.default_test["simulator"] = None
		self.default_test["reference"] = None
		self.default_test["platform"] = "illumina"

		self.default_test["read_length"] = 100
		self.default_test["read_count"] = None
		self.default_test["paired"] = False
		self.default_test["insert_size"] = 500
		self.default_test["insert_size_error"] = 50
		self.default_test["coverage"] = 1
		self.default_test["mutation_rate"] = 0.001
		self.default_test["mutation_indel_frac"] = 0.3
		self.default_test["mutation_indel_avg_len"] = 1
		self.default_test["error_rate_mult"] = 1
		self.default_test["extra_params"] = ""
		self.default_test["simulator_cmd"] = ""

		self.default_test["import_read_files"] = None
		self.default_test["import_gold_standard_file"] = None

		self.created_count = 0


# Path: lib/gsample.py
# def log(msg):
# def index(reference, fastindex_path = "tools/fastindex"):
# def index_legacy(reference):
# def downsample(index, contig_filename, downsampled_filename, region_count, target_len, single_contig=False,
# 			   region_list=False, spacer_len=200):
# def csample(infile, region_size, sample_fraction, spacer_len=200, fastindex_path=""):
# def ctranslate(reference_file, sampled_index_file, sam_file, target_file, fastindex_path=""):
# 
# Path: tools/fastq2sam.py
# def encode_qname(qname, retain_petag=True):
# 	def __init__(self):
# 	def __init__(self, filename, pe):
# 	def readline(self):
# 	def next_read(self):
# 	def __init__(self):
# 	def align(read):
# 	def align(self, read, paired=False, is_read1=True):
# 	def align_pair(self, read1, read2):
# 	def align(self, read, paired=False, is_read1=True):
# 	def align_pair(self, read1, read2):
# 	def __init__(self, aligner, outfile):
# 	def write(self, what):
# 	def write_sam_header(self, reads):
# 	def write_single(self, read, to):
# 	def align_se(self, infile):
# 	def align_pe(self, infile_1, infile_2):
# class Object:
# class FASTQ:
# class Aligner:
# class DummyAligner(Aligner):
# class dwgsim(Aligner):
# class Converter:
# 
# Path: lib/sam.py
# class SAMRow:
# class SAMFile:
# class Object:
# class FASTQ:
# 	def __init__(self):
# 	def getTag(self,tag_name):
# 	def __init__(self, filename):
# 	def close(self):
# 	def hasLast(self):
# 	def getLast(self):
# 	def getCurr(self):
# 	def getHeader(self):
# 	def isSorted(self):
# 	def next(self):
# 	def __init__(self):
# 	def __init__(self, filename, write=False):
# 	def readline(self):
# 	def next_read(self):
# 	def write_read(self,read):
# 	def close(self):


# Path: lib/teaser.py
import os
import shutil
import time
import yaml
import util
import simulator
	import main
from lib import gsample
from tools import fastq2sam
from lib import sam


		self.default_test["sampling"] = {}
		self.default_test["sampling"]["enable"] = True
		self.default_test["sampling"]["ratio"] = None
		self.default_test["sampling"]["region_len_multiplier"] = 10
		self.default_test["sampling"]["region_len"] = None
		self.default_test["sampling"]["region_pad"] = None

		self.default_test["simulator"] = None
		self.default_test["reference"] = None
		self.default_test["platform"] = "illumina"

		self.default_test["read_length"] = 100
		self.default_test["read_count"] = None
		self.default_test["paired"] = False
		self.default_test["insert_size"] = 500
		self.default_test["insert_size_error"] = 50
		self.default_test["coverage"] = 1
		self.default_test["mutation_rate"] = 0.001
		self.default_test["mutation_indel_frac"] = 0.3
		self.default_test["mutation_indel_avg_len"] = 1
		self.default_test["error_rate_mult"] = 1
		self.default_test["extra_params"] = ""
		self.default_test["simulator_cmd"] = ""

		self.default_test["import_read_files"] = None
		self.default_test["import_gold_standard_file"] = None

		self.created_count = 0


		gsample.log = lambda msg: self.log(msg)