public class DistanceMatrixUtils
Utility functions for distance matrices
public static java.lang.String[] getGRMFilenames(java.lang.String base)
Get Genetic Relationship Matrix (grm) file names.
base - filename basepublic static java.lang.String[] getDARwinFilenames(java.lang.String base)
Get DARwin file names.
base - filename basepublic static double squaredDistance(DistanceMatrix mat1, DistanceMatrix mat2, boolean weighted)
compute squared distance to second distance matrix. If both matrices have the same size it is assumed that the order of the taxa is identical.
public static DistanceMatrix minus(DistanceMatrix parent, int taxaToRemove)
Returns a distance matrix with the specified taxa removed.
public static DistanceMatrix keepTaxa(DistanceMatrix parent, kotlin.Array[] taxaToKeep)
parent - the DistanceMatrix from which to extract a subsettaxaToKeep - an index of the taxa to keeppublic static DistanceMatrix keepTaxa(DistanceMatrix parent, TaxaList taxaToKeep)
parent - the DistanceMatrix from which to extract a subsettaxaToKeep - a TaxaList of taxa to be keptpublic static DistanceMatrix clusterBySmallestDistance(DistanceMatrix orig)
public static double getIBSDistance(kotlin.Array[] iMajor,
kotlin.Array[] iMinor,
kotlin.Array[] jMajor,
kotlin.Array[] jMinor)
Calculates the IBS distance between two taxa with bitsets for for major and minor allele
iMajor - iMinor - jMajor - jMinor -