Package Bio :: Package PopGen :: Package FDist :: Module Controller :: Class FDistController
[hide private]
[frames] | no frames]

Class FDistController

source code

Known Subclasses:

Instance Methods [hide private]
 
__init__(self, fdist_dir='', ext=None)
Initializes the controller.
source code
 
_get_path(self, app)
Returns the path to an fdist application.
source code
 
_get_temp_file(self)
Gets a temporary file name.
source code
 
run_datacal(self, data_dir='.')
Executes datacal.
source code
 
_generate_intfile(self, data_dir)
Generates an INTFILE.
source code
 
run_fdist(self, npops, nsamples, fst, sample_size, mut=0, num_sims=20000, data_dir='.')
Executes fdist.
source code
 
run_fdist_force_fst(self, npops, nsamples, fst, sample_size, mut=0, num_sims=20000, data_dir='.', try_runs=5000, limit=0.001)
Exectues fdist trying to force Fst.
source code
 
run_cplot(self, ci=0.95, data_dir='.')
Executes cplot.
source code
 
run_pv(self, out_file='probs.dat', data_dir='.')
Executes pv.
source code
Method Details [hide private]

__init__(self, fdist_dir='', ext=None)
(Constructor)

source code 
Initializes the controller.

fdist_dir is the directory where fdist2 is.
ext is the extension of binaries (.exe on windows, 
  none on Unix)

_get_path(self, app)

source code 

Returns the path to an fdist application.

Includes Path where fdist can be found plus executable extension.

_get_temp_file(self)

source code 

Gets a temporary file name.

Returns a temporary file name, if executing inside jython tries to replace unexisting tempfile.mkstemp().

run_datacal(self, data_dir='.')

source code 

Executes datacal.

data_dir - Where the data is found.

_generate_intfile(self, data_dir)

source code 

Generates an INTFILE.

Parameter: data_dir - data directory

run_fdist(self, npops, nsamples, fst, sample_size, mut=0, num_sims=20000, data_dir='.')

source code 

Executes fdist.

Parameters: npops - Number of populations nsamples - Number of populations sampled fst - expected Fst sample_size - Sample size per population mut - 1=Stepwise, 0=Infinite allele num_sims - number of simulations data_dir - Where the data is found

Returns: fst - Average Fst

Important Note: This can take quite a while to run!

run_fdist_force_fst(self, npops, nsamples, fst, sample_size, mut=0, num_sims=20000, data_dir='.', try_runs=5000, limit=0.001)

source code 
Exectues fdist trying to force Fst.

Parameters:
try_runs - Number of simulations on the part trying to get
           Fst correct
limit - Interval limit
Other parameters can be seen on run_fdist.

run_cplot(self, ci=0.95, data_dir='.')

source code 

Executes cplot.

ci - Confidence interval. data_dir - Where the data is found.

run_pv(self, out_file='probs.dat', data_dir='.')

source code 

Executes pv.

out_file - Name of output file. data_dir - Where the data is found.