TASSELpy.net.maizegenetics.dna.snp.genotypecall package

Submodules

TASSELpy.net.maizegenetics.dna.snp.genotypecall.AbstractGenotypeCallTable module

class TASSELpy.net.maizegenetics.dna.snp.genotypecall.AbstractGenotypeCallTable.AbstractGenotypeCallTable(*args, **kwargs)[source]

Bases: TASSELpy.net.maizegenetics.dna.snp.genotypecall.GenotypeCallTable.GenotypeCallTable

Abstract implementation of methods in GenotypeCallTable

Methods

alleleDefinitions(*args) Returns allele values as strings for all sites or for only one site.
alleles(*args) Returns all alleles at given site in order of frequency.
allelesSortedByFrequency(*args) Returns sorted list of alleles from highest frequency to lowest at given site in alignment.
castTo(pyType) Casts this object to another java/python type
clone(*args) Creates and returns a copy of this object
diploidAsString(*args) Returns String representation of diploid allele vlaue at site
equals(*args) Indicates whether some other object is “equal to” this one
genoCounts(*args) Returns counts of all diploid combinations from highest frequency to lowest for whole alignment.
genosSortedByFrequency(*args) Return sorted list of diploid values from highest frequency to lowest at given site in alignment.
genotype(*args) Returns diploid value (genotype) for a given taxon and site
genotypeAllSites(*args) Returns sequence of diploid allele values for all sites for given taxon
genotypeArray(*args) Returns the diploid values for given taxon and site
genotypeAsString(*args) Returns string representation of diploid allele values returned by genotype() for given taxon and site.
genotypeAsStringArray(*args) Returns string representation of diploid values returned by genotypeArray() for given taxon and site.
genotypeAsStringRange(*args) Returns string representation of diploid alleles for given taxon in specified range (end site excluded).
genotypeAsStringRow(*args) Returns string representation of diploid alleles for given taxon for all sites.
genotypeForAllSites(*args) Get all genotypes for given taxon
genotypeForAllTaxa(*args) Get all genotypes for given site
genotypeForSiteRange(*args) Get all genotypes for given taxon from start site (inclusive) to end site
genotypeRange(*args) Returns sequence of diploid allele values for given taxon in specified range (end site excluded).
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
heterozygousCount(*args) Returns the number of heterozygous taxa at given site
heterozygousCountForTaxon(*args) Returns number of heterozygous sites at given taxon
isAllPolymorphic(*args) Returns whether all sites are polymorphic
isHeterozygous(*args) Returns whether allele values at given taxon and site are heterozygous.
isPhased(*args) Returns whether this alignment is phased
isPolymorphic(*args) Returns whether a given site is polymorphic
majorAllele(*args) Returns most common allele at given site.
majorAlleleAsString(*args) Returns most common allele at given site.
majorAlleleCount(*args) Returns the major allele count for given site
majorAlleleForAllSites(*args) Returns major allele for all sites
majorAlleleFrequency(*args) Returns frequency for major allele at given site.
majorMinorCounts(*args) Returns counts of all major/minor allele combinations from highest frequency to lowest for whole alignment.
maxNumAlleles(*args) Return maximum number of alleles defined for any given site
minorAllele(*args) Return most common minor allele at given site.
minorAlleleAsString(*args) Return most common minor allele at given site.
minorAlleleCount(*args) Returns the minor allele count for the given site
minorAlleleForAllSites(*args) Returns minor allele for all sites
minorAlleleFrequency(*args) Return frequency for the most common minor allele at given site.
minorAlleles(*args) Return all minor alleles at given site.
numberOfSites(*args) Returns number of sites in this genotype
numberOfTaxa(*args) Returns number of taxa (samples) in this genotype
retainsRareAlleles(*args) Returns true if this Alignment retains rare alleles.
toString(*args) Returns a string representation of the object
totalGametesNonMissingForSite(*args) Returns total number of non-missing allele values for given site.
totalGametesNonMissingForTaxon(*args) Returns number of non-missing allele values for given taxon.
totalNonMissingForSite(*args) Returns total number of non-missing taxa for given site.
totalNonMissingForTaxon(*args) Returns total number of non-missing sites for given taxon.
transposeData(*args) Tells this Genotype to transpose its data to optimize performance for given iteration nesting.
wrap_existing_array(arr_instance) Wraps a java array of this class’s type
__init__(*args, **kwargs)[source]

Abstract constructor for GenotypeCallTable

Signature:AbstractGenotypeCallTable (int numTaxa, int numSites, boolean phased, String[][] alleleEncodings, int maxNumAlleles)
Signature:AbstractGenotypeCallTable (int numTaxa, int numSites, boolean phased, String[][] alleleEncodings)

TASSELpy.net.maizegenetics.dna.snp.genotypecall.ByteGenotypeCallTable module

TASSELpy.net.maizegenetics.dna.snp.genotypecall.GenotypeCallTable module

class TASSELpy.net.maizegenetics.dna.snp.genotypecall.GenotypeCallTable.GenotypeCallTable(*args, **kwargs)[source]

Bases: TASSELpy.java.lang.Object.Object

Interface for genotype calls for a table of taxa and sites. GenotypeCallTable only contain information on the genotype calls. The call table does not have the TaxaList or PositionList. The calls are diploid genotype calls stored and retrieved as bytes. Conversions to string are also provided.

Generally these methods are accessed through the GenotypeTable interface

Methods

alleleDefinitions(*args) Returns allele values as strings for all sites or for only one site.
alleles(*args) Returns all alleles at given site in order of frequency.
allelesSortedByFrequency(*args) Returns sorted list of alleles from highest frequency to lowest at given site in alignment.
castTo(pyType) Casts this object to another java/python type
clone(*args) Creates and returns a copy of this object
diploidAsString(*args) Returns String representation of diploid allele vlaue at site
equals(*args) Indicates whether some other object is “equal to” this one
genoCounts(*args) Returns counts of all diploid combinations from highest frequency to lowest for whole alignment.
genosSortedByFrequency(*args) Return sorted list of diploid values from highest frequency to lowest at given site in alignment.
genotype(*args) Returns diploid value (genotype) for a given taxon and site
genotypeAllSites(*args) Returns sequence of diploid allele values for all sites for given taxon
genotypeArray(*args) Returns the diploid values for given taxon and site
genotypeAsString(*args) Returns string representation of diploid allele values returned by genotype() for given taxon and site.
genotypeAsStringArray(*args) Returns string representation of diploid values returned by genotypeArray() for given taxon and site.
genotypeAsStringRange(*args) Returns string representation of diploid alleles for given taxon in specified range (end site excluded).
genotypeAsStringRow(*args) Returns string representation of diploid alleles for given taxon for all sites.
genotypeForAllSites(*args) Get all genotypes for given taxon
genotypeForAllTaxa(*args) Get all genotypes for given site
genotypeForSiteRange(*args) Get all genotypes for given taxon from start site (inclusive) to end site
genotypeRange(*args) Returns sequence of diploid allele values for given taxon in specified range (end site excluded).
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
heterozygousCount(*args) Returns the number of heterozygous taxa at given site
heterozygousCountForTaxon(*args) Returns number of heterozygous sites at given taxon
isAllPolymorphic(*args) Returns whether all sites are polymorphic
isHeterozygous(*args) Returns whether allele values at given taxon and site are heterozygous.
isPhased(*args) Returns whether this alignment is phased
isPolymorphic(*args) Returns whether a given site is polymorphic
majorAllele(*args) Returns most common allele at given site.
majorAlleleAsString(*args) Returns most common allele at given site.
majorAlleleCount(*args) Returns the major allele count for given site
majorAlleleForAllSites(*args) Returns major allele for all sites
majorAlleleFrequency(*args) Returns frequency for major allele at given site.
majorMinorCounts(*args) Returns counts of all major/minor allele combinations from highest frequency to lowest for whole alignment.
maxNumAlleles(*args) Return maximum number of alleles defined for any given site
minorAllele(*args) Return most common minor allele at given site.
minorAlleleAsString(*args) Return most common minor allele at given site.
minorAlleleCount(*args) Returns the minor allele count for the given site
minorAlleleForAllSites(*args) Returns minor allele for all sites
minorAlleleFrequency(*args) Return frequency for the most common minor allele at given site.
minorAlleles(*args) Return all minor alleles at given site.
numberOfSites(*args) Returns number of sites in this genotype
numberOfTaxa(*args) Returns number of taxa (samples) in this genotype
retainsRareAlleles(*args) Returns true if this Alignment retains rare alleles.
toString(*args) Returns a string representation of the object
totalGametesNonMissingForSite(*args) Returns total number of non-missing allele values for given site.
totalGametesNonMissingForTaxon(*args) Returns number of non-missing allele values for given taxon.
totalNonMissingForSite(*args) Returns total number of non-missing taxa for given site.
totalNonMissingForTaxon(*args) Returns total number of non-missing sites for given taxon.
transposeData(*args) Tells this Genotype to transpose its data to optimize performance for given iteration nesting.
wrap_existing_array(arr_instance) Wraps a java array of this class’s type
__init__(*args, **kwargs)[source]
alleleDefinitions(*args)[source]

Returns allele values as strings for all sites or for only one site. For the all sites definition, the first dimension of the array indexes the sites. The second dimension indexes the allele values for a given site. The indices for the allele vlaues are used as the codes to store data. These codes (indices) are returned by the genotypes() methods. If only one array of allele values is returned, that is the encoding for all sites

Signature:alleleDefinitions ()
Signature:alleleDefinitions (int site)
Parameters:site (int) – site
Returns:Allele values for given site
Return type:String[][]
alleles(*args)[source]

Returns all alleles at given site in order of frequency. Gap is included as state. Heterozygous count one for each allele value. Homozygous counts 2 for the allele value

Signature:alleles (int site)
Parameters:site (int) – site
Returns:all alleles
Return type:byte[]
allelesSortedByFrequency(*args)[source]

Returns sorted list of alleles from highest frequency to lowest at given site in alignment. Resulting double dimension array holds alleles (bytes) in result[0]. And the counts are in result[1]. Counts haploid values twice and diploid values once. Higher ploidies are not supported

Signature:allelesSortedByFrequency (int site)
Parameters:site (int) – site
Returns:Sorted list of alleles and counts
Return type:int[][]
diploidAsString(*args)[source]

Returns String representation of diploid allele vlaue at site

Signature:

diploidAsString (int site, byte value)

Parameters:
  • site (int) – site
  • value (byte) – diploid allele value
Returns:

String representation

Return type:

String

genoCounts(*args)[source]

Returns counts of all diploid combinations from highest frequency to lowest for whole alignment. Resulting double dimension array holds diploids (Strings) in result[0]. And the counts are in result[1] (Longs)

Signature:genoCount ()
Returns:diploid counts
Return type:Object[][]
genosSortedByFrequency(*args)[source]

Return sorted list of diploid values from highest frequency to lowest at given site in alignment. Resulting double dimension array holds diploids (Strings) in result[0]. And the counts are in result[1] (Integers).

Signature:genosSortedByFrequency (int site)
Parameters:site (int) – site
Returns:sorted list of diploids and counts
Return type:Object[][]
genotype(*args)[source]

Returns diploid value (genotype) for a given taxon and site

Signature:

genotype (int taxon, int site)

Parameters:
  • taxon (int) – taxon
  • site (int) – site
Returns:

High 4 bites generally encode the more frequent allele, and the lower 4 bits encode the less frequent allele

Return type:

byte

genotypeAllSites(*args)[source]

Returns sequence of diploid allele values for all sites for given taxon Each value in array is what would be returned by genotype()

Signature:genotypeAllSites (int taxon)
Parameters:taxon (int) – taxon
Returns:Sequence of diploid allele values
Return type:byte[]
genotypeArray(*args)[source]

Returns the diploid values for given taxon and site Same values as genotype(), except two values are already separated into two bytes

Signature:genotypeArray (int taxon, int site)
Returns:First byte (index 0) hold sfirst allele value in right-most 4 bits. Second byte (index 1) holds second value in right-most 4 bits
Return type:byte[]
genotypeAsString(*args)[source]

Returns string representation of diploid allele values returned by genotype() for given taxon and site. The two allele values will be separated by a colon(:) delimiter

Signature:

genotypeAsString (int taxon, int site)

Signature:

genotypeAsString (int site, byte value)

Parameters:
  • taxon (int) – taxon
  • site (int) – site
  • value (byte) – diploid allele value
Returns:

String representation

Return type:

String

genotypeAsStringArray(*args)[source]

Returns string representation of diploid values returned by genotypeArray() for given taxon and site. Same 2 allele values as genotypeAsString(), except already separated into 2 Strings

Signature:

genotypeAsStringArray (int taxon, int site)

Parameters:
  • taxon (int) – taxon
  • site (int) – site
Returns:

String representation of diploid vlaues

Return type:

String[]

genotypeAsStringRange(*args)[source]

Returns string representation of diploid alleles for given taxon in specified range (end site excluded). Each vlaue in string is what would be returned by genotypeAsString

Signature:

genotypeAsStringRange (int taxon, int startSite, int endSite)

Parameters:
  • taxon (int) – taxon
  • startSite (int) – start site
  • endSite (int) – end site
Returns:

String representation of alleles in range

Return type:

String

genotypeAsStringRow(*args)[source]

Returns string representation of diploid alleles for given taxon for all sites. Each value in string is what would be returned by genotypeAsString()

Signature:genotypeAsStringRow (int taxon)
Parameters:taxon (int) – taxon
Returns:String representation of alleles
Return type:String
genotypeForAllSites(*args)[source]

Get all genotypes for given taxon

Signature:genotypeForAllSites (int taxon)
Parameters:taxon (int) – taxon
Returns:genotypes
Return type:byte[]
genotypeForAllTaxa(*args)[source]

Get all genotypes for given site

Signature:genotypeForAllTaxa (int site)
Parameters:site (int) – site
Returns:genotypes
Return type:byte[]
genotypeForSiteRange(*args)[source]

Get all genotypes for given taxon from start site (inclusive) to end site (exclusive)

Signature:

genotypeForSiteRange (int taxon, int start, int end)

Parameters:
  • taxon (int) – taxon
  • start (int) –
    • start
  • end (int) – end
Returns:

genotypes

Return type:

byte[]

genotypeRange(*args)[source]

Returns sequence of diploid allele values for given taxon in specified range (end site excluded). Each value in array is what would be returned by genotype().

Signature:

genotypeRange (int taxon, int startSite, int endSite)

Parameters:
  • taxon (int) – taxon
  • startSite (int) – start site
  • endSite (int) – end site
Returns:

sequence of diploid allele values

Return type:

byte[]

heterozygousCount(*args)[source]

Returns the number of heterozygous taxa at given site

Signature:heterozygousCount (int site)
Parameters:site (int) – site
Returns:Number of heterozygous taxa
Return type:int
heterozygousCountForTaxon(*args)[source]

Returns number of heterozygous sites at given taxon

Signature:heterozygousCountForTaxon (int taxon)
Parameters:taxon (int) – taxon
Returns:number of heterozygous sites
Return type:int
isAllPolymorphic(*args)[source]

Returns whether all sites are polymorphic

Signature:isAllPolymorphic ()
Returns:true if all sites are polymorphic
Return type:boolean
isHeterozygous(*args)[source]

Returns whether allele values at given taxon and site are heterozygous. If 2 values returned by genotype() are different, this will return false

Signature:

isHeterozygous (int taxon, int site)

Parameters:
  • taxon (int) – taxon
  • site (int) – site
Returns:

Whether heterozygous

Return type:

boolean

isPhased(*args)[source]

Returns whether this alignment is phased

Signature:isPhased ()
Returns:true if phased
Return type:boolean
isPolymorphic(*args)[source]

Returns whether a given site is polymorphic

Signature:isPolymorphic (int site)
Parameters:site (int) – site
Returns:true if given site is polymorphic
Return type:boolean
majorAllele(*args)[source]

Returns most common allele at given site. Gap is included as state. Heterozygous count one for each allele value. Homozygous count 2 two for the allele value

Signature:majorAllele (int site)
Parameters:site (int) – site
Returns:most common allele
Return type:byte
majorAlleleAsString(*args)[source]

Returns most common allele at given site. Gap is included as state. Heterozygous count one for each allele vlaue. Homozygous counts 2 for the allele value

Signature:majorAlleleAsString (int site)
Parameters:site (int) – site
Returns:most common allele as String
Return type:String
majorAlleleCount(*args)[source]

Returns the major allele count for given site

Signature:majorAlleleCount (int site)
Parameters:site (int) – site
Returns:major allele count
Return type:int
majorAlleleForAllSites(*args)[source]

Returns major allele for all sites

Signature:majorAlleleForAllSites ()
Returns:all major alleles
Return type:byte[]
majorAlleleFrequency(*args)[source]

Returns frequency for major allele at given site. Gap is included as state. Heterozygous count 1 for each allele value. Homozygous count 2 for the allele value

Signature:majorAlleleFrequency (int site)
Parameters:site (int) – site
Returns:frequency
Return type:double
majorMinorCounts(*args)[source]

Returns counts of all major/minor allele combinations from highest frequency to lowest for whole alignment. Resulting double dimension array holds major/minor allele (Strings) in result[0]. And the counts are in result[1] (Longs)

Signature:majorMinorCounts ()
Returns:diploid counts
Return type:Object[][]
maxNumAlleles(*args)[source]

Return maximum number of alleles defined for any given site

Signature:maxNumAlleles ()
Returns:max number of alleles
Return type:int
minorAllele(*args)[source]

Return most common minor allele at given site. Gap is included as state. Heterozygous count one for each allele value. Homozygous counts 2 for the allele value

Signature:minorAllele (int site)
Parameters:site (int) – site
Returns:most common minor allele
Return type:byte
minorAlleleAsString(*args)[source]

Return most common minor allele at given site. Gap is included as state. Heterozygous count one for each allele value. Homozygous counts 2 for the allele value

Arguments:

site – site

Returns:

Most common minor allele as String

minorAlleleCount(*args)[source]

Returns the minor allele count for the given site

Signatures:

int minorAlleleCount(int site)

Arguments:

site – site

Retuns:

minor allele count

minorAlleleForAllSites(*args)[source]

Returns minor allele for all sites

Signature:minorAlleleForAllSites ()
Returns:all minor alleles
Return type:byte[]
minorAlleleFrequency(*args)[source]

Return frequency for the most common minor allele at given site. Gap is included as state. Heterozygous count 1 for each allele value. Homozygous count 2 for the allele value

Signature:minorAlleleFrequency (int site)
Parameters:site (int) – site
Returns:frequency
Return type:double
minorAlleles(*args)[source]

Return all minor alleles at given site.

Gap is included as state. Heterozygous count 1 for each allele value. Homozygous counts 2 for the allele value

Arguments:

site – site

Returns:

all minor alleles

numberOfSites(*args)[source]

Returns number of sites in this genotype

Signature:numberOfSites ()
Returns:number of sites
Return type:int
numberOfTaxa(*args)[source]

Returns number of taxa (samples) in this genotype

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

Returns true if this Alignment retains rare alleles. If false, rare alleles are recorded as unknown

Signature:retainsRareAlleles ()
Returns:Whether rare alleles are retained
Return type:boolean
totalGametesNonMissingForSite(*args)[source]

Returns total number of non-missing allele values for given site. This can be twice the number of taxa, as diploid vlaues are supported

Signature:totalGametesNonMissingForSite (int site)
Parameters:site (int) – site
Returns:number of non-missing allele values
Return type:int
totalGametesNonMissingForTaxon(*args)[source]

Returns number of non-missing allele values for given taxon. This can be twice the number of sites, as diploid values are supported

Signature:totalGametesNonMissingForTaxon (int taxon)
Parameters:taxon (int) – taxon
Returns:number of non-missing allele values
Return type:int
totalNonMissingForSite(*args)[source]

Returns total number of non-missing taxa for given site. Taxa are considered missing only if both allele values are Unknown (N).

Signature:totalNonMissingForSite (int site)
Parameters:site (int) – site
Returns:number of non-missing taxa
Return type:int
totalNonMissingForTaxon(*args)[source]

Returns total number of non-missing sites for given taxon. Sites are considered missing only if both allele values are unknown (N).

Signature:totalNonMissingForTaxon (int taxon)
Parameters:taxon (int) – taxon
transposeData(*args)[source]

Tells this Genotype to transpose its data to optimize performance for given iteration nesting. If siteInnerloop is true, performance better when looping through sites inside taxa loop. If false, performance better when looping through taxa inside site loop

Signature:transposeData (boolean siteInnerLoop)
Parameters:siteInnerLoop (boolean) – flag for which iteration

TASSELpy.net.maizegenetics.dna.snp.genotypecall.GenotypeMergeRule module

class TASSELpy.net.maizegenetics.dna.snp.genotypecall.GenotypeMergeRule.GenotypeMergeRule(*args, **kwargs)[source]

Bases: TASSELpy.java.lang.Object.Object

Defines the methods for merging the calls from two taxa. The merge rules need to be defined at the level of genotypic calls and for read depth. In general, if depth is available, it will be used to merge

Methods

callBasedOnDepth(*args) Makes a genotypic call based on allele depths
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.
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
isMergePossible(*args) Whether merge is even possible
mergeCalls(*args) Merges diploid genotypic calls into one
mergeWithDepth(*args) Merges sequencing depths of 2 taxa
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]
callBasedOnDepth(*args)[source]

Makes a genotypic call based on allele depths

Signature:callBasedOnDepth (byte[] genoDepths)
Parameters:genoDepths (byte[]) – allele depth of taxa
Returns:genotype call
Return type:byte
isMergePossible(*args)[source]

Whether merge is even possible

Signature:isMergePossible ()
Returns:Whether merging is allowed
Return type:boolean
mergeCalls(*args)[source]

Merges diploid genotypic calls into one

Signature:

mergeCalls (byte geno1, byte geno2)

Parameters:
  • geno1 (byte) – genotype call of taxa 1
  • geno2 (byte) – genotype call of taxa 2
Returns:

Merged genotype call

Return type:

byte

mergeWithDepth(*args)[source]

Merges sequencing depths of 2 taxa

Signature:

mergeWithDepth (byte[] geno1depths, byte[] geno2depths)

Parameters:
  • geno1depths (byte[]) – allele depths of taxa 1
  • geno2depths (byte[]) – allele depths of taxa 2
Returns:

merged depths

Return type:

byte[]

TASSELpy.net.maizegenetics.dna.snp.genotypecall.NucleotideGenotypeCallTable module

Module contents