All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.maizegenetics.dna.factor.FeatureTable.kt Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 6.0.1
Show newest version
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]

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy