au.csiro.variantspark.input.HashingLabelSource.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of variant-spark_2.11 Show documentation
Show all versions of variant-spark_2.11 Show documentation
Genomic variants interpretation toolkit
The newest version!
package au.csiro.variantspark.input
class HashingLabelSource(val maxLabel: Int) extends LabelSource {
def getLabels(labels: Seq[String]): Array[Int] =
labels.map(l => math.abs(l.hashCode()) % maxLabel).toArray
}