NAME
Bio::PopGen::Genotype - An implementation of GenotypeI which is just an allele container
SYNOPSIS
use Bio::PopGen::Genotype;my $genotype = Bio::PopGen::Genotype->new(-marker_name => $name,-individual_id => $indid,-alleles => \@alleles);
DESCRIPTION
This object will contain alleles for a given marker for a given individual.
The class variable BlankAlleles (accessible through $Bio::PopGen::Genotype::BlankAlleles = 'somepattern') can be set to a regexp pattern for identifying blank alleles which should no be counted (they are effectively missing data). By default it set to match white space, '-', 'N' or 'n', and '?' as blank alleles which are skipped.
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.
[email protected] - General discussionhttp://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list:
rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.
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:
https://github.com/bioperl/bioperl-live/issues
AUTHOR - Jason Stajich
Email jason-at-bioperl.org
CONTRIBUTORS
Matthew Hahn, matthew.hahn-at-duke.edu
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
new
Title : newUsage : my $obj = Bio::PopGen::Genotype->new();Function: Builds a new Bio::PopGen::Genotype objectReturns : an instance of Bio::PopGen::GenotypeArgs : -marker_name => string representing name of the marker-individual_id => string representing individual id (optional)-alleles => arrayref with each item in the array being an allele
marker_name
Title : marker_nameUsage : my $name = $genotype->marker_name();Function: Get the marker name for a genotype resultReturns : stringArgs : [optional] marker name value to store
marker_type
Title : marker_typeUsage : my $name = $genotype->marker_type();Function: Get the marker type for a genotype resultReturns : M (microsatellite, or other multi-alleliclocus) or S (biallelic/SNP locus)Args : [optional] marker type value to store
individual_id
Title : individual_idUsage : my $indid = $genotype->individual_id();Function: Gets the individual id associated with a genotypeThis is effectively a back reference since we will typicallyassociate a genotype with an individual with anindividual HAS-A genotype relationship.Returns : unique id string for an individualArgs : none
get_Alleles
Title : get_AllelesUsage : my @alleles = $genotype->get_Alleles();Function: Get the alleles for a given marker and individualReturns : array of alleles (strings in this implementation)Args : $showblank - boolean flag to indicate return ALL alleles notskipping the coded EMPTY allelesNote : Uses the class variable $BlankAlleles to test if allelesshould be skipped or not.
add_Allele
Title : add_AlleleUsage : $genotype->add_Allele(@alleles);Function: Add alleles to the genotype, at this point there is noverification to insure that haploid individuals only have 1allele or that diploids only have 2 - we assume that isdone by the user creating these objectsReturns : count of the number of alleles in genotypeArgs : Array of alleles to store
reset_Alleles
Title : reset_AllelesUsage : $genotype->reset_Alleles;Function: Resets the stored alleles so the list is emptyReturns : NoneArgs : None