add all cross progeny from folder page
[sgn.git] / lib / Bio / GeneticRelationships / Descendants.pm
blobaa33de1f91375494d7cfecc86cf33b6eacfc5260
1 package Bio::GeneticRelationships::Descendants;
2 use strict;
3 use warnings;
5 use Moose;
6 use MooseX::FollowPBP;
7 use Moose::Util::TypeConstraints;
8 use Bio::GeneticRelationships::Individual;
10 =head1 NAME
12 Bio::GeneticRelationships::Descendants - Descendants of an individual
14 =head1 SYNOPSIS
16 my $variable = Bio::GeneticRelationships::Descendants->new();
18 =head1 DESCRIPTION
20 This class stores an individual's descendants and their relationships.
22 =head2 Methods
24 =over
26 =cut
31 has 'name' => (isa => 'Str',is => 'rw', predicate => 'has_name', required => 1,);
32 has 'offspring' => (isa => 'ArrayRef[Bio::GeneticRelationships::Individual]', is => 'rw', predicate => 'has_offspring');
34 #change to hash????
35 sub add_offspring {
36 my $self = shift;
37 my $offspring_to_add = shift;
38 my @offspring_array;
39 if ($self->has_offspring()){
40 @offspring_array = @{$self->get_offspring()};
42 push (@offspring_array, $offspring_to_add);
43 $self->set_offspring([@offspring_array]);
47 ###
48 1;#do not remove
49 ###
51 =pod
53 =back
55 =head1 LICENSE
57 Same as Perl.
59 =head1 AUTHORS
61 Jeremy D. Edwards <jde22@cornell.edu>
63 =cut