def __init__(self, args): self.args = args self.path = check_path(args.get('--prefix', None)) self.prefix = check_prefix(args.get('--prefix', None)) self.dataset = "%s.modified" % self.prefix if self.path is None else "%s.modified" % ( self.path / self.prefix) self.threads = int(args.get('--threads')) self.variants_file = check_file(args.get('--variants_h5', None)) self.max_missing = int(args.get('--max_missing')) self.max_multiallelic = int(args.get('--max_multiallelic'))
def __init__(self, args): # initial user parameters self.mode = None self.model_file = check_file(args.get('--model', None)) self.model_name = pathlib.Path(args['--model']).name self.time = float( args['--time']) if not args['--time'] is None else None self.time_low = float( args['--time_low']) if not args['--time_low'] is None else None self.time_high = float( args['--time_high']) if not args['--time_high'] is None else None self.theta = float( args['--theta']) if not args['--theta'] is None else None self.theta_low = float( args['--theta_low']) if not args['--theta_low'] is None else None self.theta_high = float( args['--theta_high']) if not args['--theta_high'] is None else None self.migration = float( args['--migration']) if not args['--migration'] is None else None self.migration_low = float( args['--migration_low'] ) if not args['--migration_low'] is None else None self.migration_high = float( args['--migration_high'] ) if not args['--migration_high'] is None else None self.derived_coalescence = float( args['--derived_Ne']) if not args['--derived_Ne'] is None else None self.derived_coalescence_low = float( args['--derived_low'] ) if not args['--derived_low'] is None else None self.derived_coalescence_high = float( args['--derived_high'] ) if not args['--derived_high'] is None else None self.ancestor_population_id = args['--ancestor_population'] self.kmax = int(args['--kmax']) self.seed = int(args['--seed']) self.sample_file = check_file(args.get('--sample_file', None)) self.genome_file = check_file(args.get('--genome_file', None)) #self.windows_file = check_file(args['--windows_hd5']) if not args['--windows_hd5'] is None else None self.windows_file = None self.variants_file = check_file( args['--variants_hd5'] ) if not args['--variants_hd5'] is None else None self.threads = int(args['--threads']) self.path = check_path(args.get('--prefix', None)) self.prefix = check_prefix(args.get('--prefix', None)) self.dataset = self.prefix if self.path is None else (self.path / self.prefix) self.parameters_numeric = {} self.parameters_symbolic = {} self.boundaries = {} self.check_parameters() ########################################################## self.max_by_mutype = {mutype: self.kmax for mutype in MUTYPES} self.mutuple_space = []
def __init__(self, args): self.args = args self.blocks_file = check_file(args.get('--blocks', None)) self.coordinates_file = check_file(args.get('--coordinates', None)) self.path = check_path(args.get('--prefix', None)) self.prefix = check_prefix(args.get('--prefix', None)) self.dataset = "%s.modified" % self.prefix if self.path is None else "%s.modified" % ( self.path / self.prefix) self.threads = int(args.get('--threads')) self.sample_file = check_file(args.get('--sample_file', None)) self.genome_file = check_file(args.get('--genome_file', None)) self.max_block_length = None
def __init__(self, args): # initial user parameters self.mode = None self.model_file = check_file(args.get('--model', None)) self.model_name = pathlib.Path(args['--model']).name self.time_MLE = float( args['--time_MLE']) if not args['--time_MLE'] is None else None #self.migration_MLE = float(args['--migration_MLE']) if not args['--migration_MLE'] is None else None self.mutation_rate = float( args['--mu']) if not args['--mu'] is None else None self.derived_coalescence_MLE = float( args['--derived_MLE'] ) if not args['--derived_MLE'] is None else None self.block_size = float( args['--block_size']) if not args['--block_size'] is None else None self.theta_low = float( args['--theta_low']) if not args['--theta_low'] is None else None self.theta_high = float( args['--theta_high']) if not args['--theta_high'] is None else None self.migration_high = float( args['--migration_high'] ) if not args['--migration_high'] is None else None self.migration_low = float( args['--migration_low'] ) if not args['--migration_low'] is None else None self.grid_raw_file = check_file(args.get('--grid', None)) self.ancestor_population_id = args['--ancestor_population'] self.kmax = int(args['--kmax']) self.sample_file = check_file(args.get('--sample_file', None)) self.genome_file = check_file(args.get('--genome_file', None)) self.windows_file = check_file( args['--windows_hd5'] ) if not args['--windows_hd5'] is None else None self.threads = int(args['--threads']) self.path = check_path(args.get('--prefix', None)) self.prefix = check_prefix(args.get('--prefix', None)) self.dataset = self.prefix if self.path is None else (self.path / self.prefix) self.parameters_numeric = {} self.parameters_symbolic = {} self.check_parameters() self.grid_raw = None self.grid_gimble = None ########################################################## self.max_by_mutype = {mutype: self.kmax for mutype in MUTYPES} self.mutuple_space = [] self.probability_matrix_by_parameter_tuple = {} self.window_pos_by_window_id = {} self.x_boundaries = []
def __init__(self, args): self.args = args self.sample_file = check_file(args.get('--sample_file', None)) self.genome_file = check_file(args.get('--genome_file', None)) self.blocks_file = check_file(args.get('--blocks', None)) self.vcf_file = check_file(args.get('--vcf', None)) self.path = check_path(args.get('--prefix', None)) self.prefix = check_prefix(args.get('--prefix', None)) self.dataset = self.prefix if self.path is None else (self.path / self.prefix) self.threads = int(args.get('--threads')) self.block_length = None self.max_block_length = None self.variant_count = 0
def __init__(self, args): self.args = args self.sample_file = check_file(args.get('--sample_file', None)) self.genome_file = check_file(args.get('--genome_file', None)) self.blocks_file = check_file(args.get('--blocks_h5', None)) self.variants_file = check_file(args.get('--variants_h5', None)) self.path = check_path(args.get('--prefix', None)) self.prefix = check_prefix(args.get('--prefix', None)) self.dataset = self.prefix if self.path is None else (self.path / self.prefix) self.window_size = int(args.get('--window_size')) self.overlap = int(args.get('--overlap')) self.max_block_distance = int(args.get('--max_block_distance')) self.threads = int(args.get('--threads')) self.block_length = None self.max_block_length = None
def __init__(self, args): self.model_file = check_file(args.get('--model', None)) self.zarr_store = None self.time = float( args['--time']) if not args['--time'] is None else None self.theta = float( args['--theta']) if not args['--theta'] is None else None self.migration = float( args['--migration']) if not args['--migration'] is None else None ''' self.pop_ids = 'A,B,A&B' self.pop_Ns = '1.2,1.2,1.4' slef ''' self.derived_coalescence = float( args['--derived_Ne']) if not args['--derived_Ne'] is None else None self.kmax = int(args['--kmax']) self.seed = int(args['--seed']) self.sample_file = check_file(args.get('--sample_file', None)) self.genome_file = check_file(args.get('--genome_file', None)) #self.windows_file = check_file(args['--windows_hd5']) if not args['--windows_hd5'] is None else None self.windows_file = None self.variants_file = check_file( args['--variants_hd5'] ) if not args['--variants_hd5'] is None else None self.threads = int(args['--threads']) self.path = check_path(args.get('--prefix', None)) self.prefix = check_prefix(args.get('--prefix', None)) self.dataset = self.prefix if self.path is None else (self.path / self.prefix) self.parameters_numeric = {} self.parameters_symbolic = {} self.boundaries = {} self.check_parameters() ########################################################## self.max_by_mutype = {mutype: self.kmax for mutype in MUTYPES} self.mutuple_space = []
def __init__(self, args): self.args = args self.sample_file = check_file(args.get('--sample_file', None)) self.genome_file = check_file(args.get('--genome_file', None)) self.bed_file = check_file(args.get('--bed_file', None)) self.path = check_path(args.get('--prefix', None)) self.prefix = check_prefix(args.get('--prefix', None)) self.dataset = self.prefix if self.path is None else (self.path / self.prefix) self.min_samples = int(args['--min_samples']) self.block_length = int(args['--block_length']) self.min_interval_length = int(args['--min_interval_length']) self.max_block_length = int(args['--max_block_span']) if self.max_block_length < self.block_length: sys.exit( "[X] '--max_block_length' must be greater or equal to '--block_length'" ) self.max_interval_distance = (self.max_block_length - self.block_length) + 1 self.threads = int(args.get('--threads')) self.bed_length_total = 0