Bases: TASSELpy.net.maizegenetics.taxa.distance.DistanceMatrix.DistanceMatrix
This class calculates an identity by state matrix. It is scaled so only non-missing comparison are used. It conducts bit level calculations of IBS for genotypes. Only the two most common alleles are used in the distance calculations.
Please note that when heterozygous genotypes are used, Het to Het distance is 0.5 NOT 0.0. The default along the identity diagonal is 0 (isTrueIBS = false), but changing isTrueIBS = true will calculate the identity.
The distance estimates become wildly inaccurate when too few sites are used to calculate distance. The minSiteComp parameter can be used to control the minimum number of sites used for a calculation. If there are insufficient sites in the estimate, then Double.NaN is returned.
Methods
absoluteDistance(*args) | Compute absolute distance to second distance matrix |
castTo(pyType) | Casts this object to another java/python type |
clone(*args) | Creates and returns a copy of this object |
computeHetBitDistances(*args) | Compute distance for a pair of taxa |
equals(*args) | Indicates whether some other object is “equal to” this one |
getArray(size) | Gets an empty wrapped java array that can accept the type of the wrapped |
getAverageTotalSites(*args) | Gets average number of sites used in calculating the distance matrix |
getClass(*args) | Returns the runtime class of this Object. |
getClonedDistances(*args) | Returns the distances as a 2-dimensional array of doubles. |
getClosestIndex(*args) | Gets the index of the taxon closest to a given taxon |
getColumnCount(*args) | Gets the number of columns |
getColumnName(*args) | Gets a column name |
getDblArray(rows[, cols]) | Gets an empty wrapped java array that can accept the type of other wrapped java arrays: i.e. |
getDistance(*args) | Returns the distance calculated for two taxa with the indices |
getDistances(*args) | Returns the distances as a 2-dimensional array of doubles (in the actual array used |
getElementCount(*args) | Gets the total number of elements in the dataset |
getRow(*args) | Returns specified row |
getRowCount(*args) | Gets the number of rows |
getSize(*args) | Returns the number of rows and columns that the distance matrix has |
getTableColumnNames(*args) | Gets the names of the columns |
getTableTitle(*args) | Gets the title of the table |
getTaxaList(*args) | Return TaxaList of this matrix |
getTaxon(*args) | Gets a Taxon |
getValueAt(*args) | Returns value at given row and column |
hashCode(*args) | Returns a hash code vlaue for the object |
isSymmetric(*args) | Test whether this matrix is a symmetrix distance matrix |
isTrueIBS(*args) | Returns whether true IBS is calculated for the diagonal |
meanDistance(*args) | Returns the mean pairwise distnace of this matrix |
numberOfTaxa(*args) | Gets the number of taxa |
squaredDistance(*args) | Compute squared distance to second distance matrix |
toDict() | Outputs the table as a dictionary |
toString(*args) | Gets string representation of this matrix with ‘d’ displayed digits |
whichIdNumber(*args) | Gets the id number of a taxon |
wrap_existing_array(arr_instance) | Wraps a java array of this class’s type |
Compute observed distances for all taxa. Missing sites are ignored
Signature: | IBSDistanceMatrix (GenotypeTable theAlignment) |
---|---|
Signature: | IBSDistanceMatrix (GenotypeTable theAlignment, ProgressListener listener) |
Signature: | IBSDistanceMatrix (GenotypeTable theAlignment, int minSiteComp, ProgressListener listener) |
Signature: | IBSDistanceMatrix (GenotypeTable theAlignment, int minSiteComp, boolean trueIBS, ProgressListener listener) |
Parameters: |
|
Compute distance for a pair of taxa
Signature: | computeHetBitDistances (GenotypeTable theTBA, int taxon1, int taxon2) |
---|---|
Signature: | computeHetBitDistances (GenotypeTable theTBA, int taxon1, int taxon2, int minSitesCompared, boolean isTrueIBS) |
Signature: | computeHetBitDistances (GenotypeTable theTBA, int taxon1, int taxon2, int minSitesCompared, int firstWord, int lastWord, BitSet maskBadSet) |
Signature: | computeHetBitDistances (long[] iMj, long[] iMn, long[] jMj, long[] jMn, int minSitesCompared) |
Signature: | computeHetBitDistances (long[] iMj, long[] iMn, long[] jMj, long[] jMn, int minSitesCompared, int firstWord, int lastWord) |
Parameters: |
|
Returns: | Array of {distance, number of sites used in comparison} |
Return type: | double[] |
Gets average number of sites used in calculating the distance matrix
Signature: | getAverageTotalSits () |
---|---|
Returns: | Average number of sites used in calculating the distance matrix |
Return type: | double |
Bases: TASSELpy.net.maizegenetics.taxa.distance.DistanceMatrix.DistanceMatrix
Kinship tools by Zhiwu Zhang
Methods
absoluteDistance(*args) | Compute absolute distance to second distance matrix |
castTo(pyType) | Casts this object to another java/python type |
clone(*args) | Creates and returns a copy of this object |
equals(*args) | Indicates whether some other object is “equal to” this one |
getArray(size) | Gets an empty wrapped java array that can accept the type of the wrapped |
getClass(*args) | Returns the runtime class of this Object. |
getClonedDistances(*args) | Returns the distances as a 2-dimensional array of doubles. |
getClosestIndex(*args) | Gets the index of the taxon closest to a given taxon |
getColumnCount(*args) | Gets the number of columns |
getColumnName(*args) | Gets a column name |
getDblArray(rows[, cols]) | Gets an empty wrapped java array that can accept the type of other wrapped java arrays: i.e. |
getDistance(*args) | Returns the distance calculated for two taxa with the indices |
getDistances(*args) | Returns the distances as a 2-dimensional array of doubles (in the actual array used |
getDm(*args) | Gets the DistanceMatrix containing the Kinship values |
getElementCount(*args) | Gets the total number of elements in the dataset |
getRow(*args) | Returns specified row |
getRowCount(*args) | Gets the number of rows |
getSize(*args) | Returns the number of rows and columns that the distance matrix has |
getTableColumnNames(*args) | Gets the names of the columns |
getTableTitle(*args) | Gets the title of the table |
getTaxaList(*args) | Return TaxaList of this matrix |
getTaxon(*args) | Gets a Taxon |
getValueAt(*args) | Returns value at given row and column |
hashCode(*args) | Returns a hash code vlaue for the object |
isSymmetric(*args) | Test whether this matrix is a symmetrix distance matrix |
meanDistance(*args) | Returns the mean pairwise distnace of this matrix |
numberOfTaxa(*args) | Gets the number of taxa |
squaredDistance(*args) | Compute squared distance to second distance matrix |
toDict() | Outputs the table as a dictionary |
toString(*args) | Get string representation of alignment as a string |
whichIdNumber(*args) | Gets the id number of a taxon |
wrap_existing_array(arr_instance) | Wraps a java array of this class’s type |
Creates a kinship matrix
Signature: | Kinship (GenotypeTable mar) |
---|---|
Signature: | Kinship (SimplePhenotype ped) |
Signature: | Kinship (DistanceMatrix dm) |
Parameters: |
|