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

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

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