TASSELpy.net.maizegenetics.taxa.distance package

Submodules

TASSELpy.net.maizegenetics.taxa.distance.DistanceMatrix module

class TASSELpy.net.maizegenetics.taxa.distance.DistanceMatrix.DistanceMatrix(*args, **kwargs)[source]

Bases: TASSELpy.net.maizegenetics.taxa.distance.TaxaListMatrix.TaxaListMatrix, TASSELpy.net.maizegenetics.util.TableReport.TableReport

Storage for pairwise distance matrices

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
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
__init__(*args, **kwargs)[source]

Constructs DistanceMatrix

Signature:

DistanceMatrix ()

Signature:

DistanceMatrix (double[][] distance, TaxaList taxaList)

Signature:

DistanceMatrix (DistanceMatrix dm)

Signature:

DistanceMatrix (DistanceMatrix dm, TaxaList subset)

Parameters:
  • distance (double[][]) – distances between taxa
  • taxaList (TaxaList) – The taxa in the matrix
  • dm (DistanceMatrix) – DistanceMatrix to clone
  • subset (TaxaList) – The taxa that you want in the resulting matrix
absoluteDistance(*args)[source]

Compute absolute distance to second distance matrix

Signature:absoluteDistance (DistanceMatrix mat)
Parameters:mat (DistanceMatrix) – Second DistanceMatrix
Returns:Absolute distance to second distance matrix
Return type:double
getClosestIndex(*args)[source]

Gets the index of the taxon closest to a given taxon

Signature:

getClosestIndex (int fromIndex, int[] exclusion)

Parameters:
  • fromIndex (int) – the index of the thing (taxa, sequence) from which we want to find the closest (excluding self)
  • exclusion (int[]) – Indexes of things that should not be considered, may be null
Returns:

The index of the member closest to the specified

Return type:

int

getColumnName(*args)[source]

Gets a column name

Signature:getColumnName (int col)
Parameters:col (int) – Index of the column
Returns:Name of the column
Return type:String
getDistances(*args)[source]

Returns the distances as a 2-dimensional array of doubles (in the actual array used to store the distances)

Signatures:

final double[][] getDistances()

Returns:

A clone of the array used to store distances

getTaxon(*args)[source]

Gets a Taxon

Signature:getTaxon (int i)
Parameters:i (int) – The index of the taxon
Returns:The taxon at index i
Return type:Taxon
numberOfTaxa(*args)[source]

Gets the number of taxa

Signature:numberOfTaxa ()
Returns:The number of taxa
Return type:int
squaredDistance(*args)[source]

Compute squared distance to second distance matrix

Signature:

squaredDistance (DistanceMatrix mat, boolean weighted)

Parameters:
  • mat (DistanceMatrix) – Second DistanceMatrix
  • weighted (boolean) – Whether to weight with Fitch margoliash weights
Returns:

Squared distance to second distance matrix

Return type:

double

whichIdNumber(*args)[source]

Gets the id number of a taxon

Signature:

whichIdNumber (String name)

Signature:

whichIdNumber (Taxon id)

Parameters:
  • name (String) – The name of the taxon as a string
  • id (Taxon) – The taxon as a Taxon
Returns:

The id number of the taxon

Return type:

int

class TASSELpy.net.maizegenetics.taxa.distance.DistanceMatrix.metaDistanceMatrix[source]

Bases: object

TASSELpy.net.maizegenetics.taxa.distance.TaxaListMatrix module

class TASSELpy.net.maizegenetics.taxa.distance.TaxaListMatrix.TaxaListMatrix(*args, **kwargs)[source]

Bases: TASSELpy.net.maizegenetics.util.TableReport.TableReport

Methods

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.
getColumnCount(*args) Gets the number of columns
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
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
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
toDict() Outputs the table as a dictionary
toString(*args) Get string representation of alignment as a string
wrap_existing_array(arr_instance) Wraps a java array of this class’s type
__init__(*args, **kwargs)[source]
getClonedDistances(*args)[source]

Returns the distances as a 2-dimensional array of doubles. Matrix is cloned first so it can be altered freely

Signature:getClonedDistances ()
Returns:matrix as 2-d array of doubles
Return type:double[][]
getDistance(*args)[source]

Returns the distance calculated for two taxa with the indices row and col

Signature:

getDistance (int row, int col)

Parameters:
  • row (int) – row
  • col (int) – col
Returns:

Distance for the two taxa at the specified indices

Return type:

double

getSize(*args)[source]

Returns the number of rows and columns that the distance matrix has

Signature:getSize ()
Returns:Number of rows and columns in the distance matrix
Return type:int
getTaxaList(*args)[source]

Return TaxaList of this matrix

Signature:getTaxaList ()
Returns:TaxaList of this matrix
Return type:TaxaList
isSymmetric(*args)[source]

Test whether this matrix is a symmetrix distance matrix

Signature:isSymmetric ()
Returns:Whether this matrix is a symmetric distance matrix
Return type:boolean
meanDistance(*args)[source]

Returns the mean pairwise distnace of this matrix

Signature:meanDistance ()
Returns:Mean pairwise distance of this matrix
Return type:double
toString(*args)[source]

Get string representation of alignment as a string

Signature:toString ()
Returns:Representation of alignment as a string
Return type:String

Module contents