Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
Bio.PopGen.FDist.Record Class Reference

List of all members.

Public Member Functions

def __init__
def __str__

Public Attributes

 data_org
 num_pops
 num_loci
 loci_data

Detailed Description

Holds information from a FDist record.

Members:
data_org    Data organization (0 pops by rows, 1 alleles by rows).
            The Record will behave as if data was 0 (converting if needed)

num_pops       Number of populations

num_loci       Number of loci

loci_data      Loci data

loci_data is a list, where each element represents a locus. Each element
is a tuple, the first element is the number of alleles, the second
element a list. Each element of the list is the count of each allele
per population.

Definition at line 48 of file __init__.py.


Constructor & Destructor Documentation

Definition at line 67 of file __init__.py.

00067 
00068     def __init__(self):
00069         self.data_org    = 0
00070         self.num_pops    = 0
00071         self.num_loci    = 0
00072         self.loci_data   = []
        

Member Function Documentation

Definition at line 73 of file __init__.py.

00073 
00074     def __str__(self):
00075         rep  = ['0\n'] #We only export in 0 format, even if originally was 1
00076         rep.append(str(self.num_pops) + '\n')
00077         rep.append(str(self.num_loci) + '\n')
00078         rep.append('\n')
00079         for locus_data in self.loci_data:
00080             num_alleles, pops_data = locus_data
00081             rep.append(str(num_alleles) + '\n')
00082             for pop_data in pops_data:
00083                 for allele_count in pop_data:
00084                     rep.append(str(allele_count) + ' ')
00085                 rep.append('\n')
00086             rep.append('\n')
00087         return "".join(rep)
00088     

Member Data Documentation

Definition at line 68 of file __init__.py.

Definition at line 71 of file __init__.py.

Definition at line 70 of file __init__.py.

Definition at line 69 of file __init__.py.


The documentation for this class was generated from the following file: