libsequence  1.9.5
testClassicSummstatsEmptyVariantMatrix.cc File Reference

unit tests for pop gen summary statistics More...

#include <cmath>
#include <algorithm>
#include <vector>
#include <iostream>
#include <Sequence/VariantMatrix.hpp>
#include <Sequence/VariantMatrixViews.hpp>
#include <Sequence/summstats/classics.hpp>
#include "VariantMatrixFixture.hpp"
#include <boost/test/unit_test.hpp>

Go to the source code of this file.

Functions

 BOOST_FIXTURE_TEST_SUITE (test_classic_stats_with_empty_variant_matrix, invariantdataset) BOOST_AUTO_TEST_CASE(test_thetapi)
 
 BOOST_AUTO_TEST_CASE (test_thetaw)
 
 BOOST_AUTO_TEST_CASE (test_thetah)
 
 BOOST_AUTO_TEST_CASE (test_thetal)
 
 BOOST_AUTO_TEST_CASE (test_tajd)
 
 BOOST_AUTO_TEST_CASE (test_faywuh)
 
 BOOST_AUTO_TEST_CASE (test_hprime)
 
 BOOST_AUTO_TEST_CASE (test_num_haplotypes)
 
 BOOST_AUTO_TEST_CASE (test_haplotype_diversity)
 
 BOOST_AUTO_TEST_CASE (test_rmin)
 

Detailed Description

unit tests for pop gen summary statistics

When a VariantMatrix is empty, there are two possibilities:

  1. There are no variable sites. Equivalently, all variant sites may have been filtered out for some reason, resulting in an empty matrix
  2. There are sites in the matrix, but they are all invariant (modulo missing data).
  1. The sample size is zero.

It is not possible to distinguish the three cases from looking at the contents of a VariantMatrix. Thus, libsequence assumes that case 1 or 2 applies.

Definition in file testClassicSummstatsEmptyVariantMatrix.cc.