Package Bio :: Package PopGen :: Package SimCoal :: Module Template
[hide private]
[frames] | no frames]

Module Template

source code

Functions [hide private]
 
exec_template(template) source code
 
process_para(in_string, out_file_prefix, para_list, curr_values) source code
 
dupe(motif, times) source code
 
get_xy_from_matrix(x_max, y_max, pos) source code
 
get_step_2d(x_max, y_max, x, y, mig) source code
 
generate_ssm2d_mat(x_max, y_max, mig) source code
 
generate_island_mat(total_size, mig) source code
 
generate_null_mat(total_size) source code
 
generate_join_events(t, total_size, join_size, orig_size) source code
 
no_processor(in_string) source code
 
process_text(in_string, out_file_prefix, para_list, curr_values, specific_processor) source code
 
generate_model(par_stream, out_prefix, params, specific_processor=<function no_processor at 0x68fbd70>, out_dir='.') source code
 
get_demography_template(stream, model, tp_dir=None)
Gets a demograpy template.
source code
 
_gen_loci(stream, loci) source code
 
get_chr_template(stream, chrs)
Writes a Simcoal2 loci template part.
source code
 
generate_simcoal_from_template(model, chrs, params, out_dir='.', tp_dir=None)
Writes a complete SimCoal2 template file.
source code
Variables [hide private]
  __package__ = 'Bio.PopGen.SimCoal'
Function Details [hide private]

get_demography_template(stream, model, tp_dir=None)

source code 

Gets a demograpy template.

Most probably this model needs to be sent to GenCases.

stream - Writable stream.
param  - Template file.
tp_dir - Directory where to find the template, if None
         use an internal template

get_chr_template(stream, chrs)

source code 

Writes a Simcoal2 loci template part.

stream - Writable stream.
chr    - Chromosome list.

Current loci list:
  [(chr_repeats,[(marker, (params))])]
  chr_repeats --> Number of chromosome repeats
  marker  --> 'SNP', 'DNA', 'RFLP', 'MICROSAT'
  params  --> Simcoal2 parameters for markers (list of floats
    or ints - if to be processed by generate_model)

generate_simcoal_from_template(model, chrs, params, out_dir='.', tp_dir=None)

source code 

Writes a complete SimCoal2 template file.

This joins together get_demography_template and get_chr_template,
which are feed into generate_model
Please check the three functions for parameters (model from
  get_demography_template, chrs from get_chr_template and
  params from generate_model).