Package Bio :: Package PopGen :: Package GenePop :: Module EasyController :: Class EasyController
[hide private]
[frames] | no frames]

Class EasyController

source code

object --+
         |
        EasyController

Instance Methods [hide private]
 
__init__(self, fname, genepop_dir=None)
Initializes the controller.
source code
 
get_basic_info(self) source code
 
test_hw_pop(self, pop_pos, test_type='probability') source code
 
test_hw_global(self, test_type='deficiency', enum_test=True, dememorization=10000, batches=20, iterations=5000) source code
 
test_ld_all_pair(self, locus1, locus2, dememorization=10000, batches=20, iterations=5000) source code
 
estimate_nm(self)
Estimate Nm.
source code
 
get_heterozygosity_info(self, pop_pos, locus_name)
Returns the heterozygosity info for a certain locus on a population.
source code
 
get_genotype_count(self, pop_pos, locus_name)
Returns the genotype counts for a certain population and locus
source code
 
get_fis(self, pop_pos, locus_name)
Returns the Fis for a certain population and locus
source code
 
get_alleles(self, pop_pos, locus_name)
Returns the alleles for a certain population and locus.
source code
 
get_alleles_all_pops(self, locus_name)
Returns the alleles for a certain population and locus.
source code
 
get_allele_frequency(self, pop_pos, locus_name) source code
 
get_multilocus_f_stats(self)
Returns the multilocus F stats
source code
 
get_f_stats(self, locus_name)
Returns F stats for a locus
source code
 
get_avg_fis(self) source code
 
get_avg_fst_pair(self) source code
 
get_avg_fst_pair_locus(self, locus) source code
 
calc_ibd(self, is_diplo=True, stat='a', scale='Log', min_dist=1e-05) 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, fname, genepop_dir=None)
(Constructor)

source code 

Initializes the controller.

genepop_dir is the directory where GenePop is.

The binary should be called Genepop (capital G)

Overrides: object.__init__

estimate_nm(self)

source code 
Estimate Nm. Just a simple bridge.

get_heterozygosity_info(self, pop_pos, locus_name)

source code 

Returns the heterozygosity info for a certain locus on a population.

Returns (Expected homozygotes, observed homozygotes,
Expected heterozygotes, observed heterozygotes)

get_fis(self, pop_pos, locus_name)

source code 

Returns the Fis for a certain population and locus

Below CW means Cockerham and Weir and RH means Robertson and Hill.

Returns a pair:

  • dictionary [allele] = (repetition count, frequency, Fis CW ) with information for each allele
  • a triple with total number of alleles, Fis CW, Fis RH

get_multilocus_f_stats(self)

source code 

Returns the multilocus F stats

Explain averaging. Returns Fis(CW), Fst, Fit

get_f_stats(self, locus_name)

source code 

Returns F stats for a locus

Returns Fis(CW), Fst, Fit, Qintra, Qinter