net.maizegenetics.dna.factor.site.SNPSiteBuilder.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.site
import net.maizegenetics.dna.map.GenomicFeature
import net.maizegenetics.taxa.TaxaList
class SNPSiteBuilder constructor(val factor: GenomicFeature, val taxa: TaxaList) {
private val genotypes = ByteArray(taxa.size)
var isPhased = false
fun set(taxon: Int, value: Byte): SNPSiteBuilder {
genotypes[taxon] = value
return this
}
fun build() = SNPSite(factor, taxa, genotypes, isPhased = isPhased)
}