TASSELpy.net.maizegenetics.trait package

Submodules

TASSELpy.net.maizegenetics.trait.AbstractPhenotype module

class TASSELpy.net.maizegenetics.trait.AbstractPhenotype.AbstractPhenotype(*args, **kwargs)[source]

Bases: TASSELpy.net.maizegenetics.trait.Phenotype.Phenotype

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.
getColumnCount(*args) Gets the number of columns
getData(*args) Gets data from the phenotype
getDblArray(rows[, cols]) Gets an empty wrapped java array that can accept the type of other wrapped java arrays: i.e.
getElementCount(*args) Gets the total number of elements in the dataset
getNumberOfTaxa(*args) Gets the number of taxa or rows in this data set
getNumberOfTraits(*args) Gets the number of traits or columns in this data set
getRow(*args) Returns specified row
getRowCount(*args) Gets the number of rows
getTableColumnNames(*args) Gets the names of the columns
getTableTitle(*args) Gets the title of the table
getTaxa(*args) Get the taxa in this data set in order by row number
getTaxon(*args) Gets a taxon
getTrait(*args) Gets a trait
getTraits(*args) Gets the traits or columns of this dataset, in order by column number
getValueAt(*args) Returns value at given row and column
hashCode(*args) Returns a hash code vlaue for the object
setData(*args) Sets the double value for this trait and taxon
toDict() Outputs the table as a dictionary
toString(*args) Returns a string representation of the object
whichTaxon(*args) Gets the index of a taxon
whichTrait(*args) Gets the index of a trait
wrap_existing_array(arr_instance) Wraps a java array of this class’s type
__init__(*args, **kwargs)[source]

TASSELpy.net.maizegenetics.trait.CombinePhenotype module

class TASSELpy.net.maizegenetics.trait.CombinePhenotype.CombinePhenotype(*args, **kwargs)[source]

Bases: TASSELpy.net.maizegenetics.trait.AbstractPhenotype.AbstractPhenotype

Class used for combining multiple phenotypes that may have different taxa among them

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.
getColumnCount(*args) Gets the number of columns
getData(*args) Gets data from the phenotype
getDblArray(rows[, cols]) Gets an empty wrapped java array that can accept the type of other wrapped java arrays: i.e.
getElementCount(*args) Gets the total number of elements in the dataset
getInstance(*args) Gets an instance of CombinePhenotype, allowing combining of more than
getNumberOfTaxa(*args) Gets the number of taxa or rows in this data set
getNumberOfTraits(*args) Gets the number of traits or columns in this data set
getRow(*args) Returns specified row
getRowCount(*args) Gets the number of rows
getTableColumnNames(*args) Gets the names of the columns
getTableTitle(*args) Gets the title of the table
getTaxa(*args) Get the taxa in this data set in order by row number
getTaxon(*args) Gets a taxon
getTrait(*args) Gets a trait
getTraits(*args) Gets the traits or columns of this dataset, in order by column number
getValueAt(*args) Returns value at given row and column
hashCode(*args) Returns a hash code vlaue for the object
setData(*args) Sets a particular data value
simpleCopy(*args) Makes a copy of the CombinePhenotype as a SimplePhenotype
toDict() Outputs the table as a dictionary
toString(*args) Returns a string representation of the object
whichTaxon(*args) Gets the index of a taxon
whichTrait(*args) Gets the index of a trait
wrap_existing_array(arr_instance) Wraps a java array of this class’s type
__init__(*args, **kwargs)[source]
static getInstance(*args)[source]

Gets an instance of CombinePhenotype, allowing combining of more than one phenotype

Signature:

getInstance (Phenotype phenotype1, Phenotype phenotype2, boolean isUnion)

Signature:

getInstance (Phenotype[] phenotypes, boolean isUnion)

Parameters:
  • phenotype1 (Phenotype) – The first phenotype
  • phenotype2 (Phenotype) – The second phenotype
  • isUnion (boolean) – Whether to take the union of the taxa. If false, takes the intersection
  • phenotypes (Phenotype[]) – List of Phenotype objects to combine
setData(*args)[source]

Sets a particular data value

Signature:

setData (Taxon taxon, Trait trait, double value)

Signature:

setData (int taxon, int trait, double value)

Parameters:
  • taxon (int) – A Taxon instance
  • trait (int) – A Trait instance
  • value (double) – The value to set
simpleCopy(*args)[source]

Makes a copy of the CombinePhenotype as a SimplePhenotype

Signature:simpleCopy ()
Returns:A SimplePhenotype copy of the object
Return type:SimplePhenotype

TASSELpy.net.maizegenetics.trait.FilterPhenotype module

class TASSELpy.net.maizegenetics.trait.FilterPhenotype.FilterPhenotype(*args, **kwargs)[source]

Bases: TASSELpy.net.maizegenetics.trait.AbstractPhenotype.AbstractPhenotype

Class used to filter through phenotypes

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.
getColumnCount(*args) Gets the number of columns
getData(*args) Gets data from the phenotype
getDblArray(rows[, cols]) Gets an empty wrapped java array that can accept the type of other wrapped java arrays: i.e.
getElementCount(*args) Gets the total number of elements in the dataset
getInstance(*args) Gets an instance of the filtered phenotype
getInstanceRemoveIDs(*args) Gets a FilterPhenotype after removing certain taxa
getNumberOfTaxa(*args) Gets the number of taxa or rows in this data set
getNumberOfTraits(*args) Gets the number of traits or columns in this data set
getRow(*args) Returns specified row
getRowCount(*args) Gets the number of rows
getTableColumnNames(*args) Gets the names of the columns
getTableTitle(*args) Gets the title of the table
getTaxa(*args) Get the taxa in this data set in order by row number
getTaxon(*args) Gets a taxon
getTrait(*args) Gets a trait
getTraits(*args) Gets the traits or columns of this dataset, in order by column number
getValueAt(*args) Returns value at given row and column
hashCode(*args) Returns a hash code vlaue for the object
setData(*args) Sets a particular datum
simpleCopy(*args) Makes a copy of the FilterPhenotype object, returning a SimplePhenotype
toDict() Outputs the table as a dictionary
toString(*args) Returns a string representation of the object
whichTaxon(*args) Gets the index of a taxon
whichTrait(*args) Gets the index of a trait
wrap_existing_array(arr_instance) Wraps a java array of this class’s type
__init__(*args, **kwargs)[source]
static getInstance(*args)[source]

Gets an instance of the filtered phenotype

The indices for taxa and traits must be valid indexes in the original phenotype. That is, only taxa and traits in the original phenotype can be used. This function is not appropriate for union joins

Signatures:

static FilterPhenotype getInstance(Phenotype phenotype, int[] taxa, int[] traits) static FilterPhenotype getInstance(Phenotype phenotype, TaxaList taxa,

List<Trait> traits)

Arguments:

static FilterPhenotype getInstance(Phenotype phenotype, int[] taxa, int[] traits)

phenotype – the input Phenotype taxa – an index of taxa to include in the filtered subset. If null,

all taxa will be included
traits – an index of traits to include in the filtered subset. If null,
all traits will be included
static FilterPhenotype getInstance(Phenotype phenotype, TaxaList taxa,
List<Trait> traits)

phenotype – the input Phenotype taxa – the taxa to be included in the output FIlterPhenotype traits – the traits to be included in the output FilterPhenotype

Returns:

A new FilterPhenotype

static getInstanceRemoveIDs(*args)[source]

Gets a FilterPhenotype after removing certain taxa

Signature:

getInstanceRemoveIDs (Phenotype phenotype, TaxaList taxa)

Parameters:
  • phenotype (Phenotype) – the input Phenotype
  • taxa (TaxaList) – the taxa to be excluded in the output FilterPhenotype
Returns:

A FilterPhenotype without excluded IDs

Return type:

FilterPhenotype

setData(*args)[source]

Sets a particular datum

Signature:

setData (int taxon, int trait, double value)

Signature:

setData (Taxon taxon, Trait trait, double value)

Parameters:
  • taxon (Taxon) – taxon
  • trait (Trait) – trait
  • value (double) – value
simpleCopy(*args)[source]

Makes a copy of the FilterPhenotype object, returning a SimplePhenotype

Signature:simpleCopy ()
Returns:A SimplePhenotype
Return type:SimplePhenotype

TASSELpy.net.maizegenetics.trait.MarkerPhenotype module

class TASSELpy.net.maizegenetics.trait.MarkerPhenotype.MarkerPhenotype(*args, **kwargs)[source]

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

Class combining a GenotypeTable and a Phenotype. Enters into quantitative genetics models

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
getAlignment(*args) Gets the alignment
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.
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.
getElementCount(*args) Gets the total number of elements in the dataset
getInstance(*args) Gets an instance of a MarkerPhenotype class
getPhenotype(*args) Gets the phenotype
getRow(*args) Returns specified row
getRowCount(*args) Gets the number of rows
getTableColumnNames(*args) Gets the names of the columns
getTableTitle(*args) Gets the title of the table
getValueAt(*args) Returns value at given row and column
hashCode(*args) Returns a hash code vlaue for the object
toDict() Outputs the table as a dictionary
toString(*args) Returns a string representation of the object
wrap_existing_array(arr_instance) Wraps a java array of this class’s type
__init__(*args, **kwargs)[source]
getAlignment(*args)[source]

Gets the alignment

Signature:getAlignment ()
Returns:The alignment
Return type:GenotypeTable
static getInstance(*args)[source]

Gets an instance of a MarkerPhenotype class

Signature:

getInstance (GenotypeTable aa, Phenotype ca, boolean union)

Signature:

getInstance (MarkerPhenotype aac, TaxaList group)

Parameters:
  • aa (GenotypeTable) – the GenotypeTable containing the markers
  • ca (Phenotype) – The phenotype object containing 1 or more phenotype
  • aac (MarkerPhenotype) – An existing MarkerPhenotype object to use
  • group (TaxaList) – TaxaList containing the taxa to keep
getPhenotype(*args)[source]

Gets the phenotype

Signature:getPhenotype ()
Returns:The Phenotype
Return type:Phenotype
class TASSELpy.net.maizegenetics.trait.MarkerPhenotype.metaMarkerPhenotype[source]

Bases: object

TASSELpy.net.maizegenetics.trait.MarkerPhenotypeAdapter module

class TASSELpy.net.maizegenetics.trait.MarkerPhenotypeAdapter.MarkerPhenotypeAdapter(*args, **kwargs)[source]

Bases: TASSELpy.java.lang.Object.Object

Class used to easily access information on MarkerPhenotype objects

Methods

areTraitFactorsConsistent(*args) Returns true if traits all have the same factors or no factors
castTo(pyType) Casts this object to another java/python type
checkFactorCovariateEnvironments(*args) Factor columns should either have no phenotype factors, or the ones they have should match at least one data column.
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.
getCovariateName(*args) Gets the name of a covariate
getCovariateValues(*args) Gets the values of a covariate
getDblArray(rows[, cols]) Gets an empty wrapped java array that can accept the type of other wrapped java arrays: i.e.
getFactorName(*args) Gets a factor name
getFactorValues(*args) Gets the factor values for a factor
getLocusName(*args) Gets the name of a locus
getLocusPosition(*args) Gets the position of a locus
getMarkerChromosome(*args) Gets the chromosome of a marker
getMarkerChromosomePosition(*args) Gets the position of a marker on the chromosome
getMarkerName(*args) Gets a marker name
getMarkerValue(*args) Gets the value of a marker over the taxa
getMissingCovariates(*args) Gets a boolean array indicating whether covariate values are missing
getMissingFactors(*args) Gets the missing factors for a phenotype
getMissingMarkers(*args) Gets a boolean array indicating which taxa have a marker missing
getMissingPhenotypes(*args) Gets array of booleans indicating which taxa have missing phenotypes
getNumberOfBlocks(*args) Gets the number of blocks for a phenotype
getNumberOfCovariates(*args) Gets the number of covariates
getNumberOfFactors(*args) Gets the number of factors
getNumberOfMarkers(*args) Gets the number of markers
getNumberOfPhenotypes(*args) Gets the number of Phenotypes
getNumberOfRows(*args) Gets the number of rows for a phenotype
getPhenotypeName(*args) Gets the name of a phenotype
getPhenotypeValues(*args) Gets the values for a Phenotype
getTaxa(*args) Gets the taxa that are present for a phenotype
hasMarkerNames(*args) Gets whether there are marker names present
hashCode(*args) Returns a hash code vlaue for the object
isMarkerDiscrete(*args) Returns whether a given marker is discrete
toString(*args) Returns a string representation of the object
wrap_existing_array(arr_instance) Wraps a java array of this class’s type
__init__(*args, **kwargs)[source]

Instantiates a MarkerPhenotypeAdapter object

Signature:

MarkerPhenotypeAdapter (Phenotype aPhenotype)

Signature:

MarkerPhenotypeAdapter (MarkerPhenotype aMarkerPhenotype)

Parameters:
  • aPhenotype (Phenotype) – A Phenotype object, if there is no set of markers
  • aMarkerPhenotype (MarkerPhenotype) – A MarkerPhenotype object
areTraitFactorsConsistent(*args)[source]

Returns true if traits all have the same factors or no factors

Signature:areTraitFactorsConsistent ()
Returns:true if all traits have the same factors or no factors
Return type:boolean
checkFactorCovariateEnvironments(*args)[source]

Factor columns should either have no phenotype factors, or the ones they have should match at least one data column.

Signature:checkFactorCovariateEnvironments ()
Returns:A message giving consistency information
Return type:String
getCovariateName(*args)[source]

Gets the name of a covariate

Signature:getCovariateName (int i)
Parameters:i (int) – The index of a covariate
Returns:The name of the covariate
Return type:String
getCovariateValues(*args)[source]

Gets the values of a covariate

Signature:

getCovariateValues (int phenotype, int covariate)

Parameters:
  • phenotype (int) – The index of a phenotype
  • covariate (int) – The index of a covariate
Returns:

The values of the covariate

Return type:

double[]

getFactorName(*args)[source]

Gets a factor name

Signature:getFactorName (int i)
Parameters:i (int) – The index of a factor
Returns:The name of the factor
Return type:String
getFactorValues(*args)[source]

Gets the factor values for a factor

Signature:

getFactorValues (int phenotype, int factor)

Parameters:
  • phenotype (int) – The index of a phenotype
  • factor (int) – The index of a factor
Returns:

The names of the values for the factor

Return type:

String[]

getLocusName(*args)[source]

Gets the name of a locus

Signature:getLocusName (int marker)
Parameters:marker (int) – The index of a marker
Returns:The name of the locus
Return type:String
getLocusPosition(*args)[source]

Gets the position of a locus

Signature:getLocusPosition (int marker)
Parameters:marker (int) – The index of a marker
Returns:The position of the locus
Return type:int
getMarkerChromosome(*args)[source]

Gets the chromosome of a marker

Signature:getMarkerChromosome (int marker)
Parameters:marker (int) – The index of a marker
Returns:The chromosome of the marker
Return type:String
getMarkerChromosomePosition(*args)[source]

Gets the position of a marker on the chromosome

Signature:getMarkerChromosomePosition (int marker)
Parameters:marker (int) – The index of a marker
Returns:The position of the marker on a chromosome
Return type:double
getMarkerName(*args)[source]

Gets a marker name

Signature:getMarkerName (int i)
Parameters:i (int) – The index of a marker
Returns:The name of the marker
Return type:String
getMarkerValue(*args)[source]

Gets the value of a marker over the taxa

Signature:

getMarkerValue (int phenotype, int marker)

Parameters:
  • phenotype (int) – The index of a phenotype
  • marker (int) – The index of a marker
Returns:

The value of a marker over the taxa

Return type:

Object[]

getMissingCovariates(*args)[source]

Gets a boolean array indicating whether covariate values are missing

Signature:

getMissingCovariates (int phenotype, int covariate)

Parameters:
  • phenotype (int) – The index of a phenotype
  • covariate (int) – The index of a covariate
Returns:

Boolean array indicating whether covariate values are missing

Return type:

boolean[]

getMissingFactors(*args)[source]

Gets the missing factors for a phenotype

Signature:

getMissingFactors (int phenotype, int factor)

Parameters:
  • phenotype (int) – The index of a phenotype
  • factor (int) – The index of a factor
Returns:

Boolean array indicating factor values are missing for a taxon

Return type:

boolean[]

getMissingMarkers(*args)[source]

Gets a boolean array indicating which taxa have a marker missing

Signature:

getMissingMarkers (int phenotype, int marker)

Parameters:
  • phenotype (int) – The index of a phenotype
  • marker (int) – The index of a marker
Returns:

Boolean array indicating which taxa have a marker missing

Return type:

boolean[]

getMissingPhenotypes(*args)[source]

Gets array of booleans indicating which taxa have missing phenotypes

Signature:getMissingPhenotypes (int phenotype)
Parameters:phenotype (int) – The index of a phenotype
Returns:Array of booleans indicating which taxa have missing phenotypes
Return type:boolean[]
getNumberOfBlocks(*args)[source]

Gets the number of blocks for a phenotype

Signatures:

int getNumberOfBlocks(int phenotype)

Argument:

phenotype – The index of a phenotype

Returns:

The number of blocks

getNumberOfCovariates(*args)[source]

Gets the number of covariates

Signature:getNumberOfCovariates ()
Returns:The number of covariates
Return type:int
getNumberOfFactors(*args)[source]

Gets the number of factors

Signature:getNumberOfFactors ()
Returns:The number of factors
Return type:int
getNumberOfMarkers(*args)[source]

Gets the number of markers

Signature:getNumberOfMarkers ()
Returns:The number of markers
Return type:int
getNumberOfPhenotypes(*args)[source]

Gets the number of Phenotypes

Signature:getNumberOfPhenotypes ()
Returns:The number of Phenotypes
Return type:int
getNumberOfRows(*args)[source]

Gets the number of rows for a phenotype

Signatures:

int getNumberOfRows(int phenotype)

Argument:

phenotype – The index of a phenotype

Returns:

The number of rows

getPhenotypeName(*args)[source]

Gets the name of a phenotype

Signature:getPhenotypeName (int i)
Parameters:i (int) – The index of a phenotype
Returns:The name of the phenotype
Return type:String
getPhenotypeValues(*args)[source]

Gets the values for a Phenotype

Signature:getPhenotypeValues (int i)
Parameters:i (int) – The index of a Phenotype
Returns:The values for a Phenotype
Return type:double[]
getTaxa(*args)[source]

Gets the taxa that are present for a phenotype

Signature:getTaxa (int phenotype)
Parameters:phenotype (int) – The index of a Phenotype
Returns:The taxa that are present for a Phenotype
Return type:Taxon[]
hasMarkerNames(*args)[source]

Gets whether there are marker names present

Signature:hasMarkerNames ()
Returns:Whether marker names are present
Return type:boolean
isMarkerDiscrete(*args)[source]

Returns whether a given marker is discrete

Signature:isMarkerDiscrete (int i)
Parameters:i (int) – The index of a marker
Returns:Whether the given marker is discrete
Return type:boolean

TASSELpy.net.maizegenetics.trait.Phenotype module

class TASSELpy.net.maizegenetics.trait.Phenotype.Phenotype(*args, **kwargs)[source]

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

A collection of data for a set of Taxa. Each taxon is expected to appear only once in the data. Data is represented as a two dimensional table of doubles, with taxa as rows and traits as columns.

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.
getColumnCount(*args) Gets the number of columns
getData(*args) Gets data from the phenotype
getDblArray(rows[, cols]) Gets an empty wrapped java array that can accept the type of other wrapped java arrays: i.e.
getElementCount(*args) Gets the total number of elements in the dataset
getNumberOfTaxa(*args) Gets the number of taxa or rows in this data set
getNumberOfTraits(*args) Gets the number of traits or columns in this data set
getRow(*args) Returns specified row
getRowCount(*args) Gets the number of rows
getTableColumnNames(*args) Gets the names of the columns
getTableTitle(*args) Gets the title of the table
getTaxa(*args) Get the taxa in this data set in order by row number
getTaxon(*args) Gets a taxon
getTrait(*args) Gets a trait
getTraits(*args) Gets the traits or columns of this dataset, in order by column number
getValueAt(*args) Returns value at given row and column
hashCode(*args) Returns a hash code vlaue for the object
setData(*args) Sets the double value for this trait and taxon
toDict() Outputs the table as a dictionary
toString(*args) Returns a string representation of the object
whichTaxon(*args) Gets the index of a taxon
whichTrait(*args) Gets the index of a trait
wrap_existing_array(arr_instance) Wraps a java array of this class’s type
__init__(*args, **kwargs)[source]
getData(*args)[source]

Gets data from the phenotype

Signature:

getData (int taxon, int trait)

Signature:

getData (Taxon taxon, Trait trait)

Signature:

getData ()

Parameters:
  • taxon (Taxon) – an integer i, representing the ith row in the data set
  • trait (Trait) – an integer j, representing the jth column in the data set
Returns:

The data stored for the given trait and taxon

Return type:

double

getNumberOfTaxa(*args)[source]

Gets the number of taxa or rows in this data set

Signature:getNumberOfTaxa ()
Returns:The number of taxa or rows in this data set
Return type:int
getNumberOfTraits(*args)[source]

Gets the number of traits or columns in this data set

Signature:getNumberOfTraits ()
Returns:The number of traits or columns in this data set
Return type:int
getTaxa(*args)[source]

Get the taxa in this data set in order by row number

Signature:getTaxa ()
Returns:The taxa in this data set in order by row number
Return type:TaxaList
getTaxon(*args)[source]

Gets a taxon

Signature:getTaxon (int taxon)
Parameters:taxon (int) – An integer j, representing the jth row in the data set
Returns:The Taxon for this row
Return type:Taxon
getTrait(*args)[source]

Gets a trait

Signature:getTrait (int trait)
Parameters:trait (int) – An integer j, representing the jth column in the data set
Returns:The Trait for this column
Return type:Trait
getTraits(*args)[source]

Gets the traits or columns of this dataset, in order by column number

Signatures:

List<Trait> getTraits()

Returns:

The traits or columns of this dataset, in order by column number

setData(*args)[source]

Sets the double value for this trait and taxon

Signature:

setData (int taxon, int trait, double value)

Parameters:
  • taxon (int) – An integer i, representing the ith row in the data set
  • trait (int) – An ineger j, representing the jth column in the data set
  • value (double) – The data to be stored for the ith taxon, jth trait
whichTaxon(*args)[source]

Gets the index of a taxon

Signature:whichTaxon (Taxon taxon)
Parameters:taxon (Taxon) – taxon
Returns:The index of the taxon, representing the row in which the data for this taxon is stored
Return type:int
whichTrait(*args)[source]

Gets the index of a trait

Signature:whichTrait (Trait trait)
Parameters:trait (Trait) – trait
Returns:The index of the trait, representing the column in which the data for this trait is stored
Return type:int

TASSELpy.net.maizegenetics.trait.ReadPhenotypeUtils module

class TASSELpy.net.maizegenetics.trait.ReadPhenotypeUtils.ReadPhenotypeUtils(*args, **kwargs)[source]

Bases: TASSELpy.java.lang.Object.Object

Methods

castTo(pyType) Casts this object to another java/python type
clone(*args) Creates and returns a copy of this object
doubleFromCharacterTrait(*args) Converts a character trait to doubles
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.
getDblArray(rows[, cols]) Gets an empty wrapped java array that can accept the type of other wrapped java arrays: i.e.
hashCode(*args) Returns a hash code vlaue for the object
makeCharacterTrait(*args) Makes a character trait
readGenericFile(*args) Reads input file with TASSEL v3 annotations or with no input directive
readNumericalAlignment(*args) Reads Phenotype from a file in TASSEL v2 numerical format
readPolymorphismAlignment(*args) Reads the polymorphism data from a TASSEL v2 polymorphism format file
toString(*args) Returns a string representation of the object
wrap_existing_array(arr_instance) Wraps a java array of this class’s type
__init__(*args, **kwargs)[source]
static doubleFromCharacterTrait(*args)[source]

Converts a character trait to doubles

Signature:

doubleFromCharacterTrait (Trait trait, String[] textdata)

Parameters:
  • trait (Trait) – trait
  • textdata (String[]) – the current data
Returns:

The new trait

Return type:

double[]

static makeCharacterTrait(*args)[source]

Makes a character trait

Signatures:

static Trait makeCharacterTrait(String[] original, double[] tonumber,
String name, String type)

Arguments:

original – the original class or discrete data tonumber – a double array, the same length as the original data, which

will hold the class indices

name – the trait name type – the trait type

Returns:

The new trait

static readGenericFile(*args)[source]

Reads input file with TASSEL v3 annotations or with no input directive

Signatures:

static Phenotype readGenericFile(String inputFile) throws IOException

Arguments:

inputFile – the input file with TASSEL v3 annotations or with no input directives

Returns:

a Phenotype

static readNumericalAlignment(*args)[source]

Reads Phenotype from a file in TASSEL v2 numerical format

Signatures:

static Phenotype readNumericalAlignment(String inputFile) throws IOException

Arguments:

inputFile – the input file in TASSEL v2 numerical format

Returns:

a Phenotype

static readPolymorphismAlignment(*args)[source]

Reads the polymorphism data from a TASSEL v2 polymorphism format file

Signatures:

static Phenotype readPolymorphismAlignment(String inputFile) throws IOException

Arguments:

inputFile – The input file in TASSEL v2 polymorphism format

Returns:

a Phenotype

TASSELpy.net.maizegenetics.trait.SimplePhenotype module

class TASSELpy.net.maizegenetics.trait.SimplePhenotype.SimplePhenotype(*args, **kwargs)[source]

Bases: TASSELpy.net.maizegenetics.trait.AbstractPhenotype.AbstractPhenotype

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.
getColumnCount(*args) Gets the number of columns
getData(*args) Gets data from the phenotype
getDblArray(rows[, cols]) Gets an empty wrapped java array that can accept the type of other wrapped java arrays: i.e.
getElementCount(*args) Gets the total number of elements in the dataset
getNumberOfTaxa(*args) Gets the number of taxa or rows in this data set
getNumberOfTraits(*args) Gets the number of traits or columns in this data set
getRow(*args) Returns specified row
getRowCount(*args) Gets the number of rows
getTableColumnNames(*args) Gets the names of the columns
getTableTitle(*args) Gets the title of the table
getTaxa(*args) Get the taxa in this data set in order by row number
getTaxon(*args) Gets a taxon
getTrait(*args) Gets a trait
getTraits(*args) Gets the traits or columns of this dataset, in order by column number
getValueAt(*args) Returns value at given row and column
hashCode(*args) Returns a hash code vlaue for the object
setData(*args) Sets the double value for this trait and taxon
toDict() Outputs the table as a dictionary
toString(*args) Returns a string representation of the object
whichTaxon(*args) Gets the index of a taxon
whichTrait(*args) Gets the index of a trait
wrap_existing_array(arr_instance) Wraps a java array of this class’s type
__init__(*args, **kwargs)[source]

Instantiates a SimplePhenotype object

Signatures:

SimplePhenotype(TaxaList taxa, List<Trait> traits, DoubleMatrix2D data) SimplePhenotype(TaxaList taxa, List<Trait> traits, double[][] data) SimplePhenotype(TaxaList taxa, List<Trait> traits)

TASSELpy.net.maizegenetics.trait.Trait module

class TASSELpy.net.maizegenetics.trait.Trait.Trait(*args, **kwargs)[source]

Bases: TASSELpy.java.lang.Comparable.Comparable

Data descriptor that contains information about a trait, factor, covariate, or other item for which data may be stored. It may contain information about the experimental unit on which data was collected (factors). It may contain information about how the data is to be used in an analysis. Data values will be stored as doubles. In the case of discrete variables, the value stored will be 0, 1, ... indicating the variable level. For discrete variables, labels or names corresponding to each variable level would be stored as well.

Methods

addFactor(*args) Adds a new factor and its value or changes the value of an existing factor.
castTo(pyType) Casts this object to another java/python type
clone(*args) Creates and returns a copy of this object
compareTo(*args) Compares this object with the specified object for order.
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.
getDblArray(rows[, cols]) Gets an empty wrapped java array that can accept the type of other wrapped java arrays: i.e.
getFactorNames(*args) Gets the names for the factors for this trait.
getFactorValue(*args) Gets a factor value
getInstance(*args) Gets a copy of an existing trait
getLevelLabel(*args) Gets the name of a level
getLevelLabels(*args) Gets the level labels
getName(*args) Gets the name by which the trait is identified
getNumberOfFactors(*args) Gets the number of factors for this trait
getNumberOfLevels(*args) Gets the number of levels
getNumberOfProperties(*args) Gets the number of entries in the property map
getProperties(*args) The entry set for this trait’s property map
getProperty(*args) Gets the value of this property, null if property does not exist
getPropertyNames(*args) Gets all the property names for this trait
getType(*args) Gets the type of this trait
hasLevels(*args) Returns whether the trait has levels
hashCode(*args) Returns a hash code vlaue for the object
isDiscrete(*args) Gets whether this trait is discrete
setLevelLabels(*args) Sets the level labels
setProperty(*args) Adds a property or sets a new value for an existing property
setType(*args) Sets the type of this trait
toString(*args) Returns a string representation of the object
wrap_existing_array(arr_instance) Wraps a java array of this class’s type
__init__(*args, **kwargs)[source]

Constructor for Trait

Signature:

Trait (String name, boolean isDiscrete, String type)

Parameters:
  • name (String) – this trait
  • isDicrete – true if this trait is discrete, false if it is continuous
  • type (String) – the trait type; data, covariate, factor, marker, or exclude
  • properties – a property map, which can be null
addFactor(*args)[source]

Adds a new factor and its value or changes the value of an existing factor. A factor might be an environment or a rep number

Signature:

addFactor (String name, String value)

Parameters:
  • name (String) – this factor’s name
  • value (String) – the factor’s value for this trait
getFactorNames(*args)[source]

Gets the names for the factors for this trait. Returns null if there are no factors

Signatures:

ArrayList<String> getFactorNames()

Returns:

Names for the factors for this trait. Returns null if there are no factors

getFactorValue(*args)[source]

Gets a factor value

Signature:getFactorValue (String factorName)
Returns:The value of this factor or null if the factor does not exist
Return type:String
static getInstance(*args)[source]

Gets a copy of an existing trait

Signature:getInstance (Trait trait)
Parameters:trait (Trait) – the trait to be copied
Returns:A copy of the trait
Return type:Trait
getLevelLabel(*args)[source]

Gets the name of a level

Signature:getLevelLabel (int level)
Parameters:level (int) – the level number (0,1,...)
Returns:The name of this level
Return type:String
getLevelLabels(*args)[source]

Gets the level labels

Signature:getLevelLabels ()
Returns:For a discrete trait, the names of the levels or values this trait can take
Return type:String[]
getName(*args)[source]

Gets the name by which the trait is identified

Signature:getName ()
Returns:Name by which the trait is identified
Return type:String
getNumberOfFactors(*args)[source]

Gets the number of factors for this trait

Signature:getNumberOfFactors ()
Returns:The number of factors for this trait
Return type:int
getNumberOfLevels(*args)[source]

Gets the number of levels

Signature:getNumberOfLevels ()
Returns:The number of levels
Return type:int
getNumberOfProperties(*args)[source]

Gets the number of entries in the property map

Signature:getNumberOfProperties ()
Returns:The number of entries in the property map
Return type:int
getProperties(*args)[source]

The entry set for this trait’s property map

Signatures:

Set<Entry<String, Object>> getProperties()

Returns:

The entry Set for this trait’s property map

getProperty(*args)[source]

Gets the value of this property, null if property does not exist

Signature:getProperty (String propertyName)
Parameters:propertyName (String) – The name of a property for this trait
Returns:The value of this property null if the property does not exist
Return type:Object
getPropertyNames(*args)[source]

Gets all the property names for this trait

Signatures:

Set<String> getPropertyNames()

Returns:

All the property names for this trait

getType(*args)[source]

Gets the type of this trait

Signature:getType ()
Returns:The type of this trait: data, covariate, factor, marker, or exclude
Return type:String
hasLevels(*args)[source]

Returns whether the trait has levels

Signature:hasLevels ()
Returns:true if the trait has levels
Return type:boolean
isDiscrete(*args)[source]

Gets whether this trait is discrete

Signature:isDiscrete ()
Returns:true if this trait is discrete, false if it is continuous
Return type:boolean
setLevelLabels(*args)[source]

Sets the level labels

Signatures:

void setLevelLabels(String[] levelLabels)

Arguments:

levelLabels – for a discrete trait, the names of the levels or values this trait
can take
setProperty(*args)[source]

Adds a property or sets a new value for an existing property

Signature:

setProperty (String propertyName, Object value)

Parameters:
  • propertyName (String) – a name
  • value (Object) – The value for this property
setType(*args)[source]

Sets the type of this trait

Signature:setType (String type)
Parameters:type (String) – The type of this trait: data covariate, factor, marker, or exclude
class TASSELpy.net.maizegenetics.trait.Trait.metaTrait[source]

Bases: object

Module contents