Bio.PopGen.GenePop package
Submodules
- Bio.PopGen.GenePop.Controller module
GenePopController
GenePopController.__init__()
GenePopController.test_pop_hz_deficiency()
GenePopController.test_pop_hz_excess()
GenePopController.test_pop_hz_prob()
GenePopController.test_global_hz_deficiency()
GenePopController.test_global_hz_excess()
GenePopController.test_ld()
GenePopController.create_contingency_tables()
GenePopController.test_genic_diff_all()
GenePopController.test_genic_diff_pair()
GenePopController.test_genotypic_diff_all()
GenePopController.test_genotypic_diff_pair()
GenePopController.estimate_nm()
GenePopController.calc_allele_genotype_freqs()
GenePopController.calc_diversities_fis_with_identity()
GenePopController.calc_diversities_fis_with_size()
GenePopController.calc_fst_all()
GenePopController.calc_fst_pair()
GenePopController.calc_rho_all()
GenePopController.calc_rho_pair()
GenePopController.calc_ibd_diplo()
GenePopController.calc_ibd_haplo()
- Bio.PopGen.GenePop.EasyController module
EasyController
EasyController.__init__()
EasyController.get_basic_info()
EasyController.test_hw_pop()
EasyController.test_hw_global()
EasyController.test_ld_all_pair()
EasyController.estimate_nm()
EasyController.get_heterozygosity_info()
EasyController.get_genotype_count()
EasyController.get_fis()
EasyController.get_alleles()
EasyController.get_alleles_all_pops()
EasyController.get_allele_frequency()
EasyController.get_multilocus_f_stats()
EasyController.get_f_stats()
EasyController.get_avg_fis()
EasyController.get_avg_fst_pair()
EasyController.get_avg_fst_pair_locus()
EasyController.calc_ibd()
- Bio.PopGen.GenePop.FileParser module
read()
FileRecord
FileRecord.__init__()
FileRecord.__str__()
FileRecord.start_read()
FileRecord.skip_header()
FileRecord.seek_position()
FileRecord.skip_population()
FileRecord.get_individual()
FileRecord.remove_population()
FileRecord.remove_locus_by_position()
FileRecord.remove_loci_by_position()
FileRecord.remove_locus_by_name()
FileRecord.remove_loci_by_name()
- Bio.PopGen.GenePop.LargeFileParser module
Module contents
Code to work with GenePop.
See http://wbiomed.curtin.edu.au/genepop/ , the format is documented here: http://wbiomed.curtin.edu.au/genepop/help_input.html .
Classes: Record Holds GenePop data.
Functions: read Parses a GenePop record (file) into a Record object.
Partially inspired by MedLine Code.
- Bio.PopGen.GenePop.get_indiv(line)
Extract the details of the individual information on the line.
- Bio.PopGen.GenePop.read(handle)
Parse a handle containing a GenePop file.
handle is a file-like object that contains a GenePop record.
- class Bio.PopGen.GenePop.Record
Bases:
object
Hold information from a GenePop record.
Members:
marker_len The marker length (2 or 3 digit code per allele).
comment_line Comment line.
loci_list List of loci names.
pop_list List of population names.
populations List of population data.
In most genepop files, the population name is not trustable. It is strongly recommended that populations are referred by index.
populations has one element per population. Each element is itself a list of individuals, each individual is a pair composed by individual name and a list of alleles (2 per marker or 1 for haploids): Example:
[ [ ('Ind1', [(1,2), (3,3), (200,201)], ('Ind2', [(2,None), (3,3), (None,None)], ], [ ('Other1', [(1,1), (4,3), (200,200)], ] ]
- __init__()
Initialize the class.
- __str__()
Return (reconstruct) a GenePop textual representation.
- split_in_pops(pop_names)
Split a GP record in a dictionary with 1 pop per entry.
Given a record with n pops and m loci returns a dictionary of records (key pop_name) where each item is a record with a single pop and m loci.
Arguments: - pop_names - Population names
- split_in_loci(gp)
Split a GP record in a dictionary with 1 locus per entry.
Given a record with n pops and m loci returns a dictionary of records (key locus name) where each item is a record with a single locus and n pops.
- remove_population(pos)
Remove a population (by position).
- remove_locus_by_position(pos)
Remove a locus by position.
- remove_locus_by_name(name)
Remove a locus by name.