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

Class FDistController

source code

object --+
         |
        FDistController
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='.', version=1, crit_freq=0.99, p=0.5, beta=(0.25, 0.25))
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=50000, data_dir='.', is_dominant=False, theta=0.06, beta=(0.25, 0.25), max_freq=0.99)
Executes (d)fdist.
source code
 
run_fdist_force_fst(self, npops, nsamples, fst, sample_size, mut=0, num_sims=50000, data_dir='.', try_runs=5000, limit=0.001, is_dominant=False, theta=0.06, beta=(0.25, 0.25), max_freq=0.99)
Executes fdist trying to force Fst.
source code
 
run_cplot(self, ci=0.95, data_dir='.', version=1, smooth=0.04)
Executes cplot.
source code
 
run_pv(self, out_file='probs.dat', data_dir='.', version=1, smooth=0.04)
Executes pv.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

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)

Overrides: object.__init__

_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='.', version=1, crit_freq=0.99, p=0.5, beta=(0.25, 0.25))

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=50000, data_dir='.', is_dominant=False, theta=0.06, beta=(0.25, 0.25), max_freq=0.99)

source code 
Executes (d)fdist.

Parameters:
npops - Number of populations
nsamples - Number of populations sampled
fst - expected Fst
sample_size - Sample size per population
        For dfdist: if zero a sample size file has to be provided
mut - 1=Stepwise, 0=Infinite allele
num_sims - number of simulations
data_dir - Where the data is found
is_dominant - If true executes dfdist
theta - Theta (=2Nmu)
beta - Parameters for the beta prior
max_freq - Maximum allowed frequency of the commonest allele

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=50000, data_dir='.', try_runs=5000, limit=0.001, is_dominant=False, theta=0.06, beta=(0.25, 0.25), max_freq=0.99)

source code 
Executes 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='.', version=1, smooth=0.04)

source code 
Executes cplot.

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

run_pv(self, out_file='probs.dat', data_dir='.', version=1, smooth=0.04)

source code 
Executes pv.

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