public class DiversityAnalyses extends AbstractTableReport implements TableReport
This method calculated estimates of nucleotide diversity (pi, theta, etc). In order to provide high performance, it establishes one nucleotide SitePattern, and then manipulates the weighting patterns for sliding windows and different types of sites. Total segregating sites needs to be adjusted for missing and gap data, as this will modify Theta and Tajima estimates
public DiversityAnalyses(GenotypeTable aa, boolean slidingWindow, int start, int end, int window, int step, PolymorphismDistribution thePolymorphismDistribution)
Constructor that uses a sliding window
aa - an annotated alignmentslidingWindow - if true a sliding window will be runpublic DiversityAnalyses(GenotypeTable aa, boolean slidingWindow, int start, int end, int window, int step)
public static double estimateTheta(int segSites,
int totalSites,
double averageSiteCoverage,
int taxa)
public static double estimateThetaPerbp(int segSites,
int totalSites,
double averageSiteCoverage,
int taxa)
public static double estimatePi(int totalSites,
double avgPairwiseDivergence,
double averageSiteCoverage)
public static double estimatePiPerbp(int totalSites,
double avgPairwiseDivergence,
double averageSiteCoverage)
public static double estimateTajimaD(int segSites,
double totalSites,
double averageSiteCoverage,
double taxa,
double pipbp,
double thetapbp)
public java.lang.Object[] getTableColumnNames()
public java.lang.Object[] getRow(long row)
Returns specified row.
row - row numberpublic java.lang.String getTableTitle()
public java.lang.String toString()
public long getRowCount()
public long getElementCount()
public int getColumnCount()