net.maizegenetics.dna.factor.FeatureTable.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tassel6 Show documentation
Show all versions of tassel6 Show documentation
TASSEL 6 is a software package to evaluate traits association. Feature Tables are at the heart of the package where, a feature is a range of positions or a single position. Row in the that table are taxon.
package net.maizegenetics.dna.factor
import net.maizegenetics.dna.factor.site.FeatureSite
import net.maizegenetics.taxa.TaxaList
/**
* @author Terry Casstevens
* Created November 13, 2018
*/
const val UNKNOWN_ALLELE = 0xFF.toByte()
const val UNKNOWN_ALLELE_STR = "N"
class FeatureTable(val taxa: TaxaList, private var sites: List) : List by sites {
init {
sites = sites.sorted()
}
fun numTaxa() = taxa.size
fun numFeatures() = sites.size
fun taxa() = taxa
fun site(index: Int): FeatureSite = sites[index]
}