NAME

Bio::PopGen::Utilities - Utilities for working with PopGen data and objects

SYNOPSIS

use Bio::PopGen::Utilities;
use Bio::AlignIO;

my $in = new Bio::AlignIO(-file   => 't/data/t7.aln',
                          -format => 'clustalw');
my $aln = $in->next_aln;
# get a population, each sequence is an individual and 
# for the default case, every site which is not monomorphic
# is a 'marker'.  Each individual will have a 'genotype' for the
# site which will be the specific base in the alignment at that
# site
my $pop = Bio::PopGen::Utilities->aln_to_population(-alignment => $aln);

# get the synonymous sites from the alignemt only as the 'genotypes'
# for the population
my $synpop = Bio::PopGen::Utilities->aln_to_population(-site_model => 'syn',
                                                       -alignment  => $aln);

DESCRIPTION

This object provides some convience function to turn sequence alignments into usable objects for the Population genetics modules (Bio::PopGen).

FEEDBACK

Mailing Lists

User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing list. Your participation is much appreciated.

bioperl-l@bioperl.org                  - General discussion
http://bioperl.org/wiki/Mailing_lists  - About the mailing lists

Reporting Bugs

Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via the web:

http://bugzilla.open-bio.org/

AUTHOR - Jason Stajich

Email jason-at-open-bio-dot-org

APPENDIX

The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _

aln_to_population

 Title   : aln_to_population
 Usage   : my $pop = Bio::PopGen::Utilities->aln_to_population($aln);
 Function: Turn and alignment into a set of L<Bio::PopGen::Individual>
           objects grouped in a L<Bio::PopGen::Population> object

           Sites are treated as 'Markers' in the Bioperl PopGen object
           model in the sense that a site is a unique location for which
           an individual will have a genotype (a set of alleles). 
           In this implementation we are assuming that each individual 
           has a single entry in the alignment file.

           Specify a site model as one of those listed
           'all' -- every base in the alignment is considered a site
           'syn' -- Synonomous sites. Those where a seen substition do 
                    not change the amino acid [Assumes this is only 
                    coding sequence and the frame starts with first base 
                    in the alignment]
           'non' -- Non-Synonomous sites.  Those where a substitution changes
                    the encoded amino acid.

           The option -site_model
                for Non-synonymous: 'non' or 'non-synonomous' or 'NS' or 'Ka'
		    Synonymous	  : 'synonomous' or 'syn' or 'S' or 'Ks'
                    All           : 'all' 
          To see all sites, including those which are fixed in the population
          add -include_monomorphic => 1
          to the arguments
 Returns : 
 Args    : -include_monomorphic => 1   to specify all sites, 
                                       even those which are monomorphic
                                       in the population 
                                  (useful for HKA test mostly) 
                            [default is false]
           -site_model     => one-of 'all', 'syn', or 'non' 
                             to specify a site model you want to see data
                             for
                            [default is all]
           -alignment      => provide a L<Bio::SimpleAlign> object [required]