~ubuntu-branches/ubuntu/trusty/bioperl/trusty

« back to all changes in this revision

Viewing changes to Bio/PopGen/Statistics.pm

  • Committer: Package Import Robot
  • Author(s): Charles Plessy
  • Date: 2013-09-22 13:39:48 UTC
  • mfrom: (3.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20130922133948-c6z62zegjyp7ztou
Tags: 1.6.922-1
* New upstream release.
* Replaces and Breaks grinder (<< 0.5.3-3~) because of overlaping contents.
  Closes: #722910
* Stop Replacing and Breaking bioperl ( << 1.6.9 ): not needed anymore. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
277
277
sub fu_and_li_D_counts {
278
278
    my ($self,$n,$seg_sites, $external_mut) = @_;
279
279
    my $a_n = 0;
 
280
    if( $n <= 3 ) {
 
281
        $self->warn("n is $n, too small, must be > 3\n");
 
282
        return;
 
283
    }
280
284
    for(my $k= 1; $k < $n; $k++ ) {
281
285
        $a_n += ( 1 / $k );
282
286
    }
1389
1393
            my $outcount = 1;
1390
1394
            for my $ind ( @{$vals{$t}} ) {
1391
1395
                my @alleles = $ind->get_Genotypes($codon)->get_Alleles;
1392
 
                if( @alleles > 1 ) {
 
1396
                if( @alleles > 2 ) {
 
1397
                    warn("Codon $codon saw ", scalar @alleles, " alleles for ind ", $ind->unique_id, "\n");
1393
1398
                    die;
1394
 
#                 warn("$codon $codon saw ", scalar @alleles, " for ind ", $ind->unique_id, "\n");
1395
1399
                } else {
1396
1400
                    my ($allele) = shift @alleles;
1397
1401
                    $all_alleles{$ind->unique_id} = $allele;