TASSELpy.net.maizegenetics.dna.snp package

Submodules

TASSELpy.net.maizegenetics.dna.snp.CoreGenotypeTable module

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

Bases: TASSELpy.net.maizegenetics.dna.snp.GenotypeTable.GenotypeTable

Methods

alleleDefinitions(*args) For the first signature: Returns allele values as strings for all sites.
allelePresenceForAllSites(*args) Returns sequence of true/false values indicating whether taxon at each site matches a specific allele (based on frequency).
allelePresenceForAllTaxa(*args) Returns sequence of true/false values indicating whether site at
allelePresenceForSitesBlock(*args) Returns sequence of true/false values indicating whether taxon at site
alleles(*args) Returns all alleles at given site in order of frequency.
allelesBySortType(*args) Returns all alleles at given site in order defined by scope
allelesSortedByFrequency(*args) Return sorted list of alleles from highest frequency to lowest at given site in genotype table.
bitStorage(*args) Returns BitStorage for this Genotype
castTo(pyType) Casts this object to another java/python type
chromosomalPosition(*args) Returns the physical position at given site
chromosome(*args) Returns Chromosome for given site or with matching name
chromosomeName(*args) Return chromosome name for given site
chromosomeSiteCount(*args) Return number of sites for given chromosome
chromosomes(*args) Return all chromosomes
chromosomesOffsets(*args) Returns starting site for each chromosome
clone(*args) Creates and returns a copy of this object
compositeAlignments(*args) Returns individual genotype tables within this genotype table
depth(*args) Returns allele depth object (null if not present)
depthForAlleles(*args) Returns depth count for each diploid allele at the given taxon and site
diploidAsString(*args) Returns String representation of diploid allele value at site.
equals(*args) Indicates whether some other object is “equal to” this one
firstLastSiteOfChromosome(*args) Get the first (inclusive) and last (exclusive) site of the specified
genoCounts(*args) Returns counts of all diploid combinations from highest frequency to lowest for whole genotype table.
genomeVersion(*args) Gets the Genome Assembly
genosSortedByFrequency(*args) Returns sorted list of diploid values from highest frequency to lowest at given site in genotype table.
genotype(*args) Returns diploid value (genotype) for a given taxon and site
genotypeAllSites(*args) Returns sequence of diploid allele values for all taxa for given site.
genotypeAllTaxa(*args) Returns sequence of diploid allele values for all taxa for given site.
genotypeArray(*args) Returns diploid values for given taxon and site.
genotypeAsString(*args) Returns string representation of diploid 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.
genotypeMatrix(*args) Returns the immutable genotype matrix.
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.
haplotypeAllelePresenceForAllSites(*args) Returns sequence of true/false values indicating whether taxon at each
haplotypeAllelePresenceForAllTaxa(*args) Returns a sequence of true/false values indicating whether site at each taxon for given parent matches a specific allele (based on frequency).
haplotypeAllelePresenceForSitesBlock(*args) Returns sequence of true/false values indicating whether taxon at sites (in given blocks, 64 sites per block including start block but excluding end block) for given parent matches a specific allele (based on frequency).
hasAlleleProbabilities(*args) Returns true if this genotype table has allele probabilities
hasDepth(*args) Returns true if this genotype table has sequencing depth
hasReference(*args) Returns whether this genotype table has defined reference sequence.
hashCode(*args) Returns a hash code vlaue for the object
heterozygousCount(*args) Returns number of heterozygous taxa at given site
heterozygousCountForTaxon(*args) Returns number of heterozygous sites at given taxon
indelSize(*args) Returns size of indel at given site.
isAllPolymorphic(*args) Returns whether all sites are polymorphic
isHeterozygous(*args) Returns whether allele values at given taxon and site are heterozygous.
isIndel(*args) Returns whether given site is an indel
isPhased(*args) Returns whether this genotype table is phased
isPolymorphic(*args) Returns whether given site is polymorphic
isPositiveStrand(*args) Returns whether is positive strand at given site
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
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 genotype table.
maxNumAlleles(*args) Returns max number of alleles defined for any given site
minorAllele(*args) Returns most common minor allele at given site.
minorAlleleAsString(*args) Returns most common minor allele at given site.
minorAlleleCount(*args) Returns the minor allele count for given site
minorAlleleFrequency(*args) Returns frequency for most common minor allele at given site.
minorAlleles(*args) Returns all minor alleles at given site.
numChromosomes(*args) Return number of chromosomes
numberOfSites(*args) Returns total number of sites of this genotype table
numberOfTaxa(*args) Returns the number of taxa
physicalPositions(*args) Returns all physical positions
positions(*args) Return the position list for the gneotype table
referenceAllele(*args) Returns reference diploid allele values at given site.
referenceAlleleForAllSites(*args) Returns reference sequence of diploid allele values.
referenceAlleles(*args) Returns reference sequence of diploid allele values for given taxon in specified range (end site not included).
retainsRareAlleles(*args) Returns true if this genotype table retains rare alleles.
siteName(*args) Get SNP ID for specified site
siteOfPhysicalPosition(*args) Returns sites of given physical position/SNP ID in chromosome.
siteScore(*args) Returns the site score of the given taxon and site
siteScores(*args) Returns the site scores
taxa(*args) Return taxa list of this genotype table
taxaName(*args) Returns taxa name at given index
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 total 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.
wrap_existing_array(arr_instance) Wraps a java array of this class’s type
__init__(*args, **kwargs)[source]

Instantiates a CoreGenotypeTable

Signature:CoreGenotypeTable (GenotypeCallTable genotype, PositionList positionList, TaxaList taxaList, SiteScore siteScore, AlleleDepth alleleDepth)
Signature:CoreGenotypeTable (GenotypeCallTable genotype, PositionList positionList, TaxaList taxaList)

TASSELpy.net.maizegenetics.dna.snp.FilterGenotypeTable module

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

Bases: TASSELpy.net.maizegenetics.dna.snp.GenotypeTable.GenotypeTable

Methods

alleleDefinitions(*args) For the first signature: Returns allele values as strings for all sites.
allelePresenceForAllSites(*args) Returns sequence of true/false values indicating whether taxon at each site matches a specific allele (based on frequency).
allelePresenceForAllTaxa(*args) Returns sequence of true/false values indicating whether site at
allelePresenceForSitesBlock(*args) Returns sequence of true/false values indicating whether taxon at site
alleles(*args) Returns all alleles at given site in order of frequency.
allelesBySortType(*args) Returns all alleles at given site in order defined by scope
allelesSortedByFrequency(*args) Return sorted list of alleles from highest frequency to lowest at given site in genotype table.
bitStorage(*args) Returns BitStorage for this Genotype
castTo(pyType) Casts this object to another java/python type
chromosomalPosition(*args) Returns the physical position at given site
chromosome(*args) Returns Chromosome for given site or with matching name
chromosomeName(*args) Return chromosome name for given site
chromosomeSiteCount(*args) Return number of sites for given chromosome
chromosomes(*args) Return all chromosomes
chromosomesOffsets(*args) Returns starting site for each chromosome
clone(*args) Creates and returns a copy of this object
compositeAlignments(*args) Returns individual genotype tables within this genotype table
depth(*args) Returns allele depth object (null if not present)
depthForAlleles(*args) Returns depth count for each diploid allele at the given taxon and site
diploidAsString(*args) Returns String representation of diploid allele value at site.
equals(*args) Indicates whether some other object is “equal to” this one
firstLastSiteOfChromosome(*args) Get the first (inclusive) and last (exclusive) site of the specified
functionalFilters(genoTable[, sitesFilter, ...])
genoCounts(*args) Returns counts of all diploid combinations from highest frequency to lowest for whole genotype table.
genomeVersion(*args) Gets the Genome Assembly
genosSortedByFrequency(*args) Returns sorted list of diploid values from highest frequency to lowest at given site in genotype table.
genotype(*args) Returns diploid value (genotype) for a given taxon and site
genotypeAllSites(*args) Returns sequence of diploid allele values for all taxa for given site.
genotypeAllTaxa(*args) Returns sequence of diploid allele values for all taxa for given site.
genotypeArray(*args) Returns diploid values for given taxon and site.
genotypeAsString(*args) Returns string representation of diploid 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.
genotypeMatrix(*args) Returns the immutable genotype matrix.
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
getBaseAlignment(*args)
signature:getBaseAlignment ()
getBaseSitesShown(*args) Returns sites from original alignment that are viewable (not filtered) by
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.
getInstance(*args) This returns FilterGenotypeTable with only specified subTaxaList.
getInstanceRemoveIDs(*args) Removes specific IDs
getInstanceRemoveSiteNames(*args) Removes specific named sites
haplotypeAllelePresenceForAllSites(*args) Returns sequence of true/false values indicating whether taxon at each
haplotypeAllelePresenceForAllTaxa(*args) Returns a sequence of true/false values indicating whether site at each taxon for given parent matches a specific allele (based on frequency).
haplotypeAllelePresenceForSitesBlock(*args) Returns sequence of true/false values indicating whether taxon at sites (in given blocks, 64 sites per block including start block but excluding end block) for given parent matches a specific allele (based on frequency).
hasAlleleProbabilities(*args) Returns true if this genotype table has allele probabilities
hasDepth(*args) Returns true if this genotype table has sequencing depth
hasReference(*args) Returns whether this genotype table has defined reference sequence.
hashCode(*args) Returns a hash code vlaue for the object
heterozygousCount(*args) Returns number of heterozygous taxa at given site
heterozygousCountForTaxon(*args) Returns number of heterozygous sites at given taxon
indelSize(*args) Returns size of indel at given site.
isAllPolymorphic(*args) Returns whether all sites are polymorphic
isHeterozygous(*args) Returns whether allele values at given taxon and site are heterozygous.
isIndel(*args) Returns whether given site is an indel
isPhased(*args) Returns whether this genotype table is phased
isPolymorphic(*args) Returns whether given site is polymorphic
isPositiveStrand(*args) Returns whether is positive strand at given site
isSiteFilter(*args)
signature:isSiteFilter ()
isSiteFilterByRange(*args)
signature:isSiteFilterByRange ()
isTaxaFilter(*args)
signature:isTaxaFilter ()
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
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 genotype table.
maxNumAlleles(*args) Returns max number of alleles defined for any given site
minorAllele(*args) Returns most common minor allele at given site.
minorAlleleAsString(*args) Returns most common minor allele at given site.
minorAlleleCount(*args) Returns the minor allele count for given site
minorAlleleFrequency(*args) Returns frequency for most common minor allele at given site.
minorAlleles(*args) Returns all minor alleles at given site.
numChromosomes(*args) Return number of chromosomes
numberOfSites(*args) Returns total number of sites of this genotype table
numberOfTaxa(*args) Returns the number of taxa
physicalPositions(*args) Returns all physical positions
positions(*args) Return the position list for the gneotype table
referenceAllele(*args) Returns reference diploid allele values at given site.
referenceAlleleForAllSites(*args) Returns reference sequence of diploid allele values.
referenceAlleles(*args) Returns reference sequence of diploid allele values for given taxon in specified range (end site not included).
retainsRareAlleles(*args) Returns true if this genotype table retains rare alleles.
reverseTranslateSite(*args) Returns site of this FilterGenotypeTable based on given site from
siteName(*args) Get SNP ID for specified site
siteOfPhysicalPosition(*args) Returns sites of given physical position/SNP ID in chromosome.
siteScore(*args) Returns the site score of the given taxon and site
siteScores(*args) Returns the site scores
taxa(*args) Return taxa list of this genotype table
taxaName(*args) Returns taxa name at given index
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 total 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.
translateSite(*args)
signature:translateSite (int site)
translateTaxon(*args)
signature:translateTaxon (int taxon)
wrap_existing_array(arr_instance) Wraps a java array of this class’s type
__init__(*args, **kwargs)[source]
static functionalFilters(genoTable, sitesFilter=None, taxaFilter=None)[source]
getBaseAlignment(*args)[source]
Signature:getBaseAlignment ()
getBaseSitesShown(*args)[source]

Returns sites from original alignment that are viewable (not filtered) by this filter alignment

Signature:getBaseSitesShown ()
Returns:list of sites
Return type:int[]
static getInstance(*args)[source]

This returns FilterGenotypeTable with only specified subTaxaList. Defaults to retain unknown taxa. If retainUnkownTaxa is true then Alignment will return unknown values for missing taxa

Signature:

getInstance (GenotypeTable a, TaxaList subTaxaList)

Signature:

getInstance (GenotypeTable a, TaxaList subTaxaList, boolean retainUnknownTaxa)

Signature:

getInstance (GenotypeTable a, int[] subSites)

Signature:

getInstance (GenotypeTable a, String[] siteNamesToKeep)

Signature:

getInstance (GenotypeTable a, String chromosome, int startPhysicalPos, int endPhysicalPos)

Signature:

getInstance (GenotypeTable a, Chromosome chromosome, int startPhysicalPos, int endPhysicalPos)

Signature:

getInstance (GenotypeTable a, Chromosome chromosome)

Signature:

getInstance (GenotypeTable a, int startSite, int endSite)

Parameters:
  • a (GenotypeTable) – alignment
  • subTaxaList (TaxaList) – subset id group
  • retainUnknownTaxa (boolean) – whether to retain unknown taxa
  • subSites (int[]) – subset of sites you want
  • siteNamesToKeep (String[]) – names of the sites to keep
  • chromosome (Chromosome) – name of chromosome
  • startPhysicalPos (int) – starting physical position
  • endPhysicalPos (int) – ending physical position
  • startSite (int) – start site (inclusive)
  • endSite (int) – end site (inclusive)
Returns:

filter alignment

Return type:

GenotypeTable

static getInstanceRemoveIDs(*args)[source]

Removes specific IDs

Signature:

getInstanceRemoveIDs (GenotypeTable a, TaxaList subTaxaList)

Parameters:
  • a (GenotypeTable) – alignment to filter
  • subTaxaList (TaxaList) – specified IDs
Returns:

Filtered Alignment

Return type:

GenotypeTable

static getInstanceRemoveSiteNames(*args)[source]

Removes specific named sites

Signature:

getInstanceRemoveSiteNames (GenotypeTable a, String[] siteNamesToRemove)

Parameters:
  • a (GenotypeTable) – alignment
  • siteNamesToRemove (String[]) – names of the sites to remove
Returns:

Filtered Alignment

Return type:

FilterGenotypeTable

isSiteFilter(*args)[source]
Signature:isSiteFilter ()
isSiteFilterByRange(*args)[source]
Signature:isSiteFilterByRange ()
isTaxaFilter(*args)[source]
Signature:isTaxaFilter ()
reverseTranslateSite(*args)[source]

Returns site of this FilterGenotypeTable based on given site from embedded Alignment

Signature:reverseTranslateSite (int site)
Parameters:site (int) – site
Returns:site of this FilterGenotypeTable based on given site from embedded Alignment
Return type:int
translateSite(*args)[source]
Signature:translateSite (int site)
Parameters:site (int) – site
translateTaxon(*args)[source]
Signature:translateTaxon (int taxon)
Parameters:taxon (int) – taxon

TASSELpy.net.maizegenetics.dna.snp.GenotypeTable module

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

Bases: TASSELpy.net.maizegenetics.dna.snp.GenotypeTable.MetaGenotypeTable

A representation of the SNP and indel variation for a set of taxa and genomic positions.

GenotypeTable always consists of a TaxaList, PositionList, and GenotypeCallTable. Additionally, as needed they also represent alleles in bit form, with sequencing depth, or other scores (e.g. quality scores).

Use GenotypeTableBuilder to create GenotypeTable

Methods

alleleDefinitions(*args) For the first signature: Returns allele values as strings for all sites.
allelePresenceForAllSites(*args) Returns sequence of true/false values indicating whether taxon at each site matches a specific allele (based on frequency).
allelePresenceForAllTaxa(*args) Returns sequence of true/false values indicating whether site at
allelePresenceForSitesBlock(*args) Returns sequence of true/false values indicating whether taxon at site
alleles(*args) Returns all alleles at given site in order of frequency.
allelesBySortType(*args) Returns all alleles at given site in order defined by scope
allelesSortedByFrequency(*args) Return sorted list of alleles from highest frequency to lowest at given site in genotype table.
bitStorage(*args) Returns BitStorage for this Genotype
castTo(pyType) Casts this object to another java/python type
chromosomalPosition(*args) Returns the physical position at given site
chromosome(*args) Returns Chromosome for given site or with matching name
chromosomeName(*args) Return chromosome name for given site
chromosomeSiteCount(*args) Return number of sites for given chromosome
chromosomes(*args) Return all chromosomes
chromosomesOffsets(*args) Returns starting site for each chromosome
clone(*args) Creates and returns a copy of this object
compositeAlignments(*args) Returns individual genotype tables within this genotype table
depth(*args) Returns allele depth object (null if not present)
depthForAlleles(*args) Returns depth count for each diploid allele at the given taxon and site
diploidAsString(*args) Returns String representation of diploid allele value at site.
equals(*args) Indicates whether some other object is “equal to” this one
firstLastSiteOfChromosome(*args) Get the first (inclusive) and last (exclusive) site of the specified
genoCounts(*args) Returns counts of all diploid combinations from highest frequency to lowest for whole genotype table.
genomeVersion(*args) Gets the Genome Assembly
genosSortedByFrequency(*args) Returns sorted list of diploid values from highest frequency to lowest at given site in genotype table.
genotype(*args) Returns diploid value (genotype) for a given taxon and site
genotypeAllSites(*args) Returns sequence of diploid allele values for all taxa for given site.
genotypeAllTaxa(*args) Returns sequence of diploid allele values for all taxa for given site.
genotypeArray(*args) Returns diploid values for given taxon and site.
genotypeAsString(*args) Returns string representation of diploid 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.
genotypeMatrix(*args) Returns the immutable genotype matrix.
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.
haplotypeAllelePresenceForAllSites(*args) Returns sequence of true/false values indicating whether taxon at each
haplotypeAllelePresenceForAllTaxa(*args) Returns a sequence of true/false values indicating whether site at each taxon for given parent matches a specific allele (based on frequency).
haplotypeAllelePresenceForSitesBlock(*args) Returns sequence of true/false values indicating whether taxon at sites (in given blocks, 64 sites per block including start block but excluding end block) for given parent matches a specific allele (based on frequency).
hasAlleleProbabilities(*args) Returns true if this genotype table has allele probabilities
hasDepth(*args) Returns true if this genotype table has sequencing depth
hasReference(*args) Returns whether this genotype table has defined reference sequence.
hashCode(*args) Returns a hash code vlaue for the object
heterozygousCount(*args) Returns number of heterozygous taxa at given site
heterozygousCountForTaxon(*args) Returns number of heterozygous sites at given taxon
indelSize(*args) Returns size of indel at given site.
isAllPolymorphic(*args) Returns whether all sites are polymorphic
isHeterozygous(*args) Returns whether allele values at given taxon and site are heterozygous.
isIndel(*args) Returns whether given site is an indel
isPhased(*args) Returns whether this genotype table is phased
isPolymorphic(*args) Returns whether given site is polymorphic
isPositiveStrand(*args) Returns whether is positive strand at given site
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
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 genotype table.
maxNumAlleles(*args) Returns max number of alleles defined for any given site
minorAllele(*args) Returns most common minor allele at given site.
minorAlleleAsString(*args) Returns most common minor allele at given site.
minorAlleleCount(*args) Returns the minor allele count for given site
minorAlleleFrequency(*args) Returns frequency for most common minor allele at given site.
minorAlleles(*args) Returns all minor alleles at given site.
numChromosomes(*args) Return number of chromosomes
numberOfSites(*args) Returns total number of sites of this genotype table
numberOfTaxa(*args) Returns the number of taxa
physicalPositions(*args) Returns all physical positions
positions(*args) Return the position list for the gneotype table
referenceAllele(*args) Returns reference diploid allele values at given site.
referenceAlleleForAllSites(*args) Returns reference sequence of diploid allele values.
referenceAlleles(*args) Returns reference sequence of diploid allele values for given taxon in specified range (end site not included).
retainsRareAlleles(*args) Returns true if this genotype table retains rare alleles.
siteName(*args) Get SNP ID for specified site
siteOfPhysicalPosition(*args) Returns sites of given physical position/SNP ID in chromosome.
siteScore(*args) Returns the site score of the given taxon and site
siteScores(*args) Returns the site scores
taxa(*args) Return taxa list of this genotype table
taxaName(*args) Returns taxa name at given index
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 total 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.
wrap_existing_array(arr_instance) Wraps a java array of this class’s type
ALLELE_SORT_TYPE = <Frequency: 0, Depth: 1, Global_Frequency: 2, Reference: 3>
SITE_SCORE_TYPE = <None: 0, QualityScore: 1, ReferenceProbablity: 2, Dosage: 3, DepthA: 4, DepthC: 5, DepthG: 6, DepthT: 7, DepthGap: 8, DepthInsertion: 9, ProbA: 10, ProbC: 11, ProbG: 12, ProbT: 13, ProbGap: 14, ProbInsertion: 15>
__init__(*args, **kwargs)[source]
alleleDefinitions(*args)[source]

For the first signature: Returns allele values as strings for all sites. The first dimension of this array indexes the sites. The second dimension indexes the allele values for the given site. The indices for the allele values are used as the codes to store data. These codes (indices) are returned by the genotype() methods. If only one array of allele values is returned, that is the encoding for all sites For the second signature: Same as alleleDefinitions() for only one site

Signature:alleleDefinitions ()
Signature:alleleDefinitions (int site)
Parameters:site (int) – site
Returns:String[][] alleleDefinitions() allele values for all sites String[] alleleDefinitions(int site) allele values for given site
Return type:String[][]
allelePresenceForAllSites(*args)[source]

Returns sequence of true/false values indicating whether taxon at each site matches a specific allele (based on frequency). Allele number of value 0 would be the major allele. Allele number of value 1 would be the minor allele. Allele number of value 2 would be the third most frequent allele value and so on.

Signature:

allelePresenceForAllSites (int taxon, WHICH_ALLELE allele)

Parameters:
  • taxon (int) – taxon (int)
  • allele (WHICH_ALLELE) – allele (WHICH_ALLELE)
Returns:

Sequence of true/false value (BitSet)

Return type:

BitSet

allelePresenceForAllTaxa(*args)[source]

Returns sequence of true/false values indicating whether site at each taxon matches a specific allele

Signature:

allelePresenceForAllTaxa (int site, WHICH_ALLELE allele)

Parameters:
  • site (int) – site
  • allele (WHICH_ALLELE) – allele
Returns:

sequence of true/false values

Return type:

BitSet

allelePresenceForSitesBlock(*args)[source]

Returns sequence of true/false values indicating whether taxon at site (in given blocks, 64 sites per block including start block but excluding end block) matches a specific allele

Signature:

allelePresenceForSitesBlock (int taxon, WHICH_ALLELE allele, int startBlock, int endBlock)

Parameters:
  • taxon (int) – taxon (int)
  • allele (WHICH_ALLELE) – allele (WHICH_ALLELE)
  • startBlock (int) – starting block (int)
  • endBlock (int) – end block (int)
Returns:

Sequence of true/false values (long[])

Return type:

long[]

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 two for the allele value

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

Returns all alleles at given site in order defined by scope

Signature:

allelesBySortType (GenotypeTable.ALLELE_SORT_TYPE scope, int site)

Parameters:
  • scope (GenotypeTable.ALLELE_SORT_TYPE) – scope
  • site (int) – site
Returns:

alleles

Return type:

byte[]

allelesSortedByFrequency(*args)[source]

Return sorted list of alleles from highest frequency to lowest at given site in genotype table. 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 ploids are not supported

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

Returns BitStorage for this Genotype

Signature:bitStorage (GenotypeTable.WHICH_ALLELE allele)
Parameters:allele (GenotypeTable.WHICH_ALLELE) – allele
Returns:BitStorage
Return type:BitStorage
chromosomalPosition(*args)[source]

Returns the physical position at given site

Signature:chromosomalPosition (int site)
Parameters:site (int) – site
Returns:physical position
Return type:int
chromosome(*args)[source]

Returns Chromosome for given site or with matching name (first to match will be returned)

Signature:

chromosome (int site)

Signature:

chromosome (String name)

Parameters:
  • site (int) – site Chromosome chromosome(String name):
  • name (String) – name
Returns:

Chromosome

Return type:

Chromosome

chromosomeName(*args)[source]

Return chromosome name for given site

Signature:chromosomeName (int site)
Parameters:site (int) – site
Returns:Chromosome name
Return type:String
chromosomeSiteCount(*args)[source]

Return number of sites for given chromosome

Signature:chromosomeSiteCount (Chromosome chromosome)
Parameters:chromosome (Chromosome) – chromosome
Returns:Number of sites
Return type:int
chromosomes(*args)[source]

Return all chromosomes

Signature:chromosomes ()
Returns:chromosomes
Return type:Chromosome[]
chromosomesOffsets(*args)[source]

Returns starting site for each chromosome

Signature:chromosomesOffsets ()
Returns:Starting site for each chromosome
Return type:int[]
compositeAlignments(*args)[source]

Returns individual genotype tables within this genotype table

Signature:compositeAlignments ()
Returns:list of genotype tables
Return type:GenotypeTable[]
depth(*args)[source]

Returns allele depth object (null if not present)

Signature:depth ()
Returns:allele depth associated with genotypeTable
Return type:AlleleDepth
depthForAlleles(*args)[source]

Returns depth count for each diploid allele at the given taxon and site

Signature:

depthForAlleles (int taxon, int site)

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

two counts

Return type:

int[]

diploidAsString(*args)[source]

Returns String representation of diploid allele value at site.

Signature:

diploidAsString (int site, byte value)

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

String representation

Return type:

String

firstLastSiteOfChromosome(*args)[source]

Get the first (inclusive) and last (exclusive) site of the specified chromosome in this genotype table

Signature:firstLastSiteOfChromosome (Chromosome chromosome)
Parameters:chromosome (Chromosome) – chromosome
Returns:first and last site
Return type:int[]
genoCounts(*args)[source]

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

Signature:genoCounts ()
Returns:diploid counts
Return type:Object[][]
genomeVersion(*args)[source]

Gets the Genome Assembly

Signature:genomeVersion ()
Returns:The genome assembly
Return type:String
genosSortedByFrequency(*args)[source]

Returns sorted list of diploid values from highest frequency to lowest at given site in genotype table. 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)

Signature:

genotype (int taxon, Chromosome chromosome, int physicalPosition)

Parameters:
  • taxon (int) – taxon
  • site (int) – site genotype(int taxon, Chromosome chromosome, int physicalPosition):
  • chromosome (Chromosome) – chromosome
  • physicalPosition (int) – physicalPosition
Returns:

High four bits generally encode more frequent allele and lower four bits encode the less frequent allele

Return type:

byte

genotypeAllSites(*args)[source]

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

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

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

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

Returns 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)

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

First byte (index 0) holds first allele value in right-most four bits. Second byte (index 1) holds second allele value in right-most four bits

Return type:

byte[]

genotypeAsString(*args)[source]

Returns string representation of diploid 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 (int)
  • site (int) – site (int)
  • value (byte) – allele value
Returns:

string representation of diploid values

Return type:

String

genotypeAsStringArray(*args)[source]

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

Signature:

genotypeAsStringArray (int taxon, int site)

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

string representation of diploid values

Return type:

String[]

genotypeAsStringRange(*args)[source]

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

Signature:

genotypeAsStringRange (int taxon, int startSite, int endSite)

Parameters:
  • taxon (int) – taxon (int)
  • startSite (int) – start site (int)
  • endSite (int) – end site (int)
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 (int)
Returns:string representaiton of alleles
Return type:String
genotypeMatrix(*args)[source]

Returns the immutable genotype matrix. Taxa and positions are not part of the matrix. This method is used for copying genotype tables, when either the taxa or positions have changed

Signature:genotypeMatrix ()
Returns:Genotype matrix
Return type:GenotypeCallTable
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[]

haplotypeAllelePresenceForAllSites(*args)[source]

Returns sequence of true/false values indicating whether taxon at each site for given parent matches a specific allele

Signature:

haplotypeAllelePresenceForAllSites (int taxon, boolean firstParent, WHICH_ALLELE allele)

Parameters:
  • taxon (int) – taxon (int)
  • firstParent (boolean) – true for first parent (false for second parent)
  • allele (WHICH_ALLELE) – allele (WHICH_ALLELE)
Returns:

Sequence of true/false values (BitSet)

Return type:

BitSet

haplotypeAllelePresenceForAllTaxa(*args)[source]

Returns a sequence of true/false values indicating whether site at each taxon for given parent matches a specific allele (based on frequency). Allele number of value 0 would be the major allele. Allele number of value 1 would be the minor allele. Allele number of value 2 would be the third most frequent allele value and so on

Signature:

haplotypeAllelePresenceForAllTaxa (int site, boolean firstParent, WHICH_ALLELE allele)

Parameters:
  • site (int) – site (int)
  • firstParent (boolean) – true for first parent (false for second parent)
  • allele (WHICH_ALLELE) – allele (WHICH_ALLELE)
Returns:

Sequence of true/false values (BitSet)

Return type:

BitSet

haplotypeAllelePresenceForSitesBlock(*args)[source]

Returns sequence of true/false values indicating whether taxon at sites (in given blocks, 64 sites per block including start block but excluding end block) for given parent matches a specific allele (based on frequency). Allele number of value 0 would be the major allele. Allele number of value 1 would be the minor allele. Allele number of value 2 would be the third most frequent allele value and so on.

Signature:

haplotypeAllelePresenceForSitesBlock (int taxon, boolean firstParent, WHICH_ALLELE allele, int startBlock, int endBlock)

Parameters:
  • taxon (int) – taxon (int)
  • firstParent (boolean) – true for first parent (false for second parent)
  • allele (WHICH_ALLELE) – allele (WHICH_ALLELE)
  • startBlock (int) – starting block (int)
  • endBlock (int) – ending block (int)
hasAlleleProbabilities(*args)[source]

Returns true if this genotype table has allele probabilities

Signature:hasAlleleProbabilities ()
Returns:true if this genotype table has allele probabilities
Return type:boolean
hasDepth(*args)[source]

Returns true if this genotype table has sequencing depth

Signature:hasDepth ()
Returns:True if this genotype table has sequencing depth
Return type:boolean
hasReference(*args)[source]

Returns whether this genotype table has defined reference sequence.

Signature:hasReference ()
Returns:True if this genotype table has reference sequence
Return type:boolean
heterozygousCount(*args)[source]

Returns 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
indelSize(*args)[source]

Returns size of indel at given site.

Signature:indelSize (int site)
Parameters:site (int) – site
Returns:indel size
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.

Signature:

isHeterozygous (int taxon, int site)

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

Whether heterozygous

Return type:

boolean

isIndel(*args)[source]

Returns whether given site is an indel

Signature:isIndel (int site)
Parameters:site (int) – site
Returns:true if indel
Return type:boolean
isPhased(*args)[source]

Returns whether this genotype table is phased

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

Returns whether given site is polymorphic

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

Returns whether is positive strand at given site

Signature:isPositiveStrand (int site)
Parameters:site (int) – site
Returns:whether is positive strand
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 counts 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 value. Homozygous counts two for 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
majorAlleleFrequency(*args)[source]

Returns frequency for major allele at given site. Gap is included as state. Heterozygous count one for each allele value. Homozygous counts two 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 genotype table. 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]

Returns max number of alleles defined for any given site

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

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

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

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

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

Returns the minor allele count for given site

Signature:minorAlleleCount (int site)
Parameters:site (int) – site
Returns:minor allele count
Return type:int
minorAlleleFrequency(*args)[source]

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

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

Returns all minor alleles at given site. Gap is included as state Heterozygous count one for each allele value. Homozygous counts two for the allele value

Signature:minorAlleles (int site)
Parameters:site (int) – site
numChromosomes(*args)[source]

Return number of chromosomes

Signature:numChromosomes ()
Returns:Number of chromosomes
Return type:int
numberOfSites(*args)[source]

Returns total number of sites of this genotype table

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

Returns the number of taxa

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

Returns all physical positions

Signature:physicalPositions ()
Returns:physical positions
Return type:int[]
positions(*args)[source]

Return the position list for the gneotype table

Signature:positions ()
Returns:PositionList for all sites
Return type:PositionList
referenceAllele(*args)[source]

Returns reference diploid allele values at given site.

Signature:referenceAllele (int site)
Parameters:site (int) – site
Returns:First 4 bits are the first allele value and the second 4 bits are the second allele value.
Return type:byte
referenceAlleleForAllSites(*args)[source]

Returns reference sequence of diploid allele values. Each value in array contains both diploid values. First 4 bits holds the first allele, and the second 4 bits holds the second allele

Signature:referenceAlleleForAllSites ()
Returns:Reference sequence of diploid allele values
Return type:byte[]
referenceAlleles(*args)[source]

Returns reference sequence of diploid allele values for given taxon in specified range (end site not included). Each value in array contains both diploid values. First 4 bits holds the first allele, and the second 4 bits holds the second allele

Signature:

referenceAlleles (int startSite, int endSite)

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

Reference sequence of diploid allele values

Return type:

byte[]

retainsRareAlleles(*args)[source]

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

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

Get SNP ID for specified site

Signature:

String siteName(int site)

Arguments:

site – site

Returns:

Site name

siteOfPhysicalPosition(*args)[source]

Returns sites of given physical position/SNP ID in chromosome. If the physical position doesn’t exist, (-(insertion point) -1) is returned. If chromosome is not found, an exception is thrown. This can support multiple sites with the same physical position but different SNP IDs

Signature:

siteOfPhysicalPosition (int physicalPosition, Chromosome chromosome)

Signature:

siteOfPhysicalPosition (int physicalPosition, Chromosome chromosome, String snpName)

Parameters:
  • physicalPosition (int) – physical position
  • chromosome (Chromosome) – chromosome. If null, the first chromosome is used
  • snpName (String) – SNP ID
Returns:

Index

Return type:

int

siteScore(*args)[source]

Returns the site score of the given taxon and site

Signature:

siteScore (int taxon, int site)

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

site score

Return type:

float

siteScores(*args)[source]

Returns the site scores

Signature:siteScores ()
Returns:site scores
Return type:float[][]
taxa(*args)[source]

Return taxa list of this genotype table

Signature:taxa ()
Returns:taxa list
Return type:TaxaList
taxaName(*args)[source]

Returns taxa name at given index

Signature:taxaName (int index)
Parameters:index (int) – index
Returns:taxa name
Return type:String
totalGametesNonMissingForSite(*args)[source]

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

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

Returns total 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
Returns:number of non-missing sites
Return type:int
class TASSELpy.net.maizegenetics.dna.snp.GenotypeTable.MetaGenotypeTable(*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
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
toString(*args) Returns a string representation of the object
wrap_existing_array(arr_instance) Wraps a java array of this class’s type

TASSELpy.net.maizegenetics.dna.snp.GenotypeTableBuilder module

TASSELpy.net.maizegenetics.dna.snp.GenotypeTableUtils module

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

Bases: TASSELpy.java.lang.Object.Object

Utility methods for comparing, sorting, and counting genotypes

Methods

calcBitPresenceFromGenotype(*args) Method for getting TBits rapidly from major and minor allele arrays
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
getAlleleStates(*args) Gets the String states of alleles
getAlleles(*args) Gets the alleles at a site
getAllelesSortedByFrequency(*args) This sorts alleles by frequency.
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.
getDataBytes(*args) Gets the data as bytes
getDblArray(rows[, cols]) Gets an empty wrapped java array that can accept the type of other wrapped java arrays: i.e.
getDiploidValue(*args) Combines 2 allele values into 1 diploid value.
getDiploidValuePhased(*args) Combines 2 allele values into one diploid value.
getDiploidValues(*args) Separates diploid allele value into its two values.
getDiploidsSortedByFrequency(*args) Gets the diploids sorted by frequency
getIncludedSitesBasedOnFreqIgnoreMissing(*args) Get sites to be included based on minimum frequency (the count
getUnphasedDiploidValue(*args) Combines 2 allele values into 1 diploid value.
getUnphasedDiploidValueNoHets(*args) Combines 2 genotype values into 1 diploid value.
hashCode(*args) Returns a hash code vlaue for the object
isEqual(*args) Returns whether two diploid allele values are equal, ignoring order
isEqualOrUnknown(*args) Returns whether two diploid allele values are equal, ignoring order,
isHeterozygous(*args) Returns whether diploid allele values are heterozygous.
isPartiallyEqual(*args) Returns true if at least one allele agrees
removeSitesBasedOnFreqIgnoreMissing(*args) Remove sites based on minimum frequency (the count of good bases,
removeSitesOutsideRange(*args) Remove sites based on site position (excluded sites are <firstSite and
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 calcBitPresenceFromGenotype(*args)[source]

Method for getting TBits rapidly from major and minor allele arrays

Signature:

calcBitPresenceFromGenotype (byte[] genotype, byte[] mjA, byte[] mnA)

Signature:

calcBitPresenceFromGenotype (byte[] genotype, byte[] referenceValues)

Signature:

calcBitPresenceFromGenotype (byte[] genotype, byte mj, byte mn)

Signature:

calcBitPresenceFromGenotype (byte[] genotype, byte referenceValue)

Parameters:
  • genotype (byte[]) – genotype
  • mjA (byte[]) – major alleles
  • mnA (byte[]) – minor alleles
  • referenceValues (byte[]) – reference
  • mj (byte) – major byte
  • mn (byte) – minor byte
  • referenceValue (byte) – reference
Returns:

Tbits

Return type:

BitSet[]

static getAlleleStates(*args)[source]

Gets the String states of alleles

Signature:

getAlleleStates (String[][] data, int maxNumAlleles)

Parameters:
  • data (String[][]) – data
  • maxNumAlleles (int) – maximum number of alleles
Returns:

The allele states at all loci

Return type:

String[][]

static getAlleles(*args)[source]

Gets the alleles at a site

Signature:

getAlleles (byte[][] data, int site)

Parameters:
  • data (byte[][]) – data
  • site (int) – site
Returns:

Alleles at site

Return type:

byte[]

static getAllelesSortedByFrequency(*args)[source]

This sorts alleles by frequency. Each cell in the given array contains a diploid value which is separated and counted individually. Resulting double dimension array holds alleles (bytes) in result[0]. And the counts are in result[1]. Counts haploid values twice and diploid vlaues once. Higher ploidies are not supported

Signature:

getAllelesSortedByFrequency (byte[] data)

Signature:

getAllelesSortedByFrequency (byte[][] data, int site)

Signature:

getAllelesSortedByFrequency (String[][] data, int site)

Signature:

getAllelesSortedByFrequency (GenotypeTable alignment, int site)

Parameters:
  • data (String[][]) – data
  • site (int) – site
  • alignment (GenotypeTable) – an alignment
Returns:

alleles and counts

Return type:

int[][]

static getDataBytes(*args)[source]

Gets the data as bytes

Signature:

getDataBytes (String[] data)

Signature:

getDataBytes (String[][] data, String[][] alleleStates, int maxNumAlleles)

Parameters:
  • data (String[][]) – data
  • alleleStates (String[][]) – allele states
  • maxNumAlleles (int) – maximum number of alleles
Returns:

data as bytes

Return type:

byte[][]

static getDiploidValue(*args)[source]

Combines 2 allele values into 1 diploid value. Assumed phased

Signature:

getDiploidValue (byte a, byte b)

Parameters:
  • a (byte) – allele 1
  • b (byte) – allele 2
Returns:

diploid value

Return type:

byte

static getDiploidValuePhased(*args)[source]

Combines 2 allele values into one diploid value. Assumed phased

Signature:

getDiploidValuePhased (byte a, byte b)

Parameters:
  • a (byte) – allele 1
  • b (byte) – allele 2
Returns:

diploid value

Return type:

byte

static getDiploidValues(*args)[source]

Separates diploid allele value into its two values.

Signature:getDiploidValues (byte genotype)
Parameters:genotype (byte) – diploid value
Returns:separated allele values
Return type:byte[]
static getDiploidsSortedByFrequency(*args)[source]

Gets the diploids sorted by frequency

Signature:

getDiploidsSortedByFrequency (GenotypeTable alignment, int site)

Parameters:
  • alignment (GenotypeTable) – alignment
  • site (int) – site
Returns:

Diploids, sorted by frequency

Return type:

Object[][]

static getIncludedSitesBasedOnFreqIgnoreMissing(*args)[source]

Get sites to be included based on minimum frequency (the count of good bases, INCLUDING GAPS) and based on the proportion of good sites (INCLUDING GAPS) different from consensus

Signature:

getIncludedSitesBasedOnFreqIgnoreMissing (GenotypeTable aa, double minimumProportion, double maximumProportion, int minimumCount)

Parameters:
  • aa (GenotypeTable) – the AnnotatedAlignment to filter
  • minimumProportion (double) – minimum proportion of sites different from the consensus
  • maximumProportion (double) – maximum proportion of sites different from the consensus
  • minimumCount (int) – minimum number of sequences with a good base or a gap (but not N or ?)
Returns:

The sites to be included

Return type:

int[]

static getUnphasedDiploidValue(*args)[source]

Combines 2 allele values into 1 diploid value. In alphabetical order.

Signature:

getUnphasedDiploidValue (byte a, byte b)

Parameters:
  • a (byte) – allele 1
  • b (byte) – allele 2
Returns:

diploid value sorted by order A < C < G < T

Return type:

byte

static getUnphasedDiploidValueNoHets(*args)[source]

Combines 2 genotype values into 1 diploid value. Returns unknown if either parent is heterozygous or unknown, or alleles are swapped.

Signature:

getUnphasedDiploidValueNoHets (byte g1, byte g2)

Parameters:
  • g1 (byte) – genotype 1
  • g2 (byte) – genotype 2
Returns:

diploid value

Return type:

byte

static isEqual(*args)[source]

Returns whether two diploid allele values are equal, ignoring order

Signature:

isEqual (byte[] alleles1, byte[] alleles2)

Signature:

isEqual (byte diploidAllele1, byte diploidAllele2)

Parameters:
  • alleles1 (byte[]) – diploid alleles 1
  • alleles2 (byte[]) – diploid alleles 2
  • diploidAllele1 (byte) – diploid alleles 1
  • diploidAllele2 (byte) – diploid alleles 2
Returns:

true if equal

Return type:

boolean

static isEqualOrUnknown(*args)[source]

Returns whether two diploid allele values are equal, ignoring order, where unknown values equal anything

Signature:

isEqualOrUnknown (byte[] alleles1, byte[] alleles2)

Signature:

isEqualOrUnknown (byte diploidAllele1, byte diploidAllele2)

Parameters:
  • alleles1 (byte[]) – diploid alleles 1
  • alleles2 (byte[]) – diploid alleles 2
  • diploidAllele1 (byte) – diploid alleles 1
  • diploidAllele2 (byte) – diploid alleles 2
Returns:

true if equal

Return type:

boolean

static isHeterozygous(*args)[source]

Returns whether diploid allele values are heterozygous. First 4 bits in byte is one allele value. Second 4 bits is other allele value

Signature:isHeterozygous (byte diploidAllele)
Parameters:diploidAllele (byte) – alleles
Returns:true if allele values different; false if values the same
Return type:boolean
static isPartiallyEqual(*args)[source]

Returns true if at least one allele agrees

Signature:

isPartiallyEqual (byte genotype1, byte genotype2)

Parameters:
  • genotype1 (byte) – genotype 1
  • genotype2 (byte) – genotype 2
Returns:

true if at least 1 allele is equal

Return type:

boolean

static removeSitesBasedOnFreqIgnoreMissing(*args)[source]

Remove sites based on minimum frequency (the count of good bases, INCLUDING GAPS) and based on the proportion of good alleles (including gaps) different from consensus

Signatures:

static GenotypeTable removeSitesBasedOnFreqIgnoreMissing(GenotypeTable aa,
double minimumProportion, double maximumProportion, int minimumCount)

Arguments:

aa – the AnnotatedAlignment to filter minimumProportion – minimum proportion of sites different from the

consensus
maxmimumProportion – maximum proportion of sites different from the
consensus
minimumCount – minimum number of sequences with good bases (not N or ?),
where GAP IS CONSIDERED A GOOD BASE

Returns:

filtered GenotypeTable

static removeSitesOutsideRange(*args)[source]

Remove sites based on site position (excluded sites are <firstSite and > lastSite) This does not affect any prior exclusions

Signature:

removeSitesOutsideRange (GenotypeTable aa, int firstSite, int lastSite)

Parameters:
  • aa (GenotypeTable) – the AnnotatedAlignment to filter
  • firstSite (int) – first site to keep in the range
  • lastSite (int) – last site to keep in the range
Returns:

Filtered GenotypeTable

Return type:

GenotypeTable

TASSELpy.net.maizegenetics.dna.snp.ImportUtils module

class TASSELpy.net.maizegenetics.dna.snp.ImportUtils.ImportUtils(*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
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
readFasta(*args) Read GenotypeTable from a fasta file
readFromHapmap(*args) Read GenotypeTable from HapMap file
readFromPLink(*args) Read GenotypeTable from PLink files
readFromVCF(*args) Reads from a VCF file
readGuessFormat(*args) Reads in a file after guessing its format
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 readFasta(*args)[source]

Read GenotypeTable from a fasta file

Signature:readFasta (String filename)
Parameters:filename (String) – The name of the file
Returns:A GenotypeTable
Return type:GenotypeTable
static readFromHapmap(*args)[source]

Read GenotypeTable from HapMap file

Signatures:

static GenotypeTable readFromHapmap(final String filename) static GenotypeTable readFromHapmap(final String filename, ProgressListener listener)

Arguments:

static GenotypeTable readFromHapmap(final String filename)
filename – The name of the file
static GenotypeTable readFromHapmap(final String filename, ProgressListener listener)
filename – The name of the file listener – A progresslistener (can be null)

Returns:

A GenotypeTable

Read GenotypeTable from PLink files

Signatures:

static GenotypeTable readFromPLink(final String pedFilename,
final String mapFilename, ProgressListener listener)

Arguments:

static GenotypeTable readFromPLink(final String pedFilename,
final String mapFilename, ProgressListener listener)

pedFilename – The name of the ped file mapFilename – The name of the map file listener – A progresslistener (can be null)

Returns:

A GenotypeTable

static readFromVCF(*args)[source]

Reads from a VCF file

Signatures:

static GenotypeTable readFromVCF(final String filename, ProgressListener listener) static GenotypeTable readFromVCF(final String filename, ProgressListener listener,

boolean ignoreDepth)

Arguments:

static GenotypeTable readFromVCF(final String filename, ProgressListener listener)
filename – The name of the file listener – A progresslistener (can be null)
static GenotypeTable readFromVCF(final String filename, ProgressListener listener,
boolean ignoreDepth)

filename – The name of the file listener – A progresslistener (can be null) ignoreDepth – Whether to ignore depth information

Returns:

A GenotypeTable

static readGuessFormat(*args)[source]

Reads in a file after guessing its format

Signature:readGuessFormat (String fileName)
Parameters:fileName (String) – The name of the file
Returns:A GenotypeTable
Return type:GenotypeTable

Module contents