net.maizegenetics.dna.snp.TranslateNegative 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.
/*
* TranslateNegative
*
* Created on Dec 10, 2016
*/
package net.maizegenetics.dna.snp;
/**
*
* @author Terry Casstevens
*/
public class TranslateNegative extends Translate {
TranslateNegative(TranslateIndex translateTaxa, TranslateIndex translateSite) {
super(translateTaxa, translateSite);
}
@Override
public long taxonSite(int taxon, int site) {
int newTaxon = taxon(taxon);
if (newTaxon == -1) {
return -1;
}
int newSite = site(site);
if (newSite == -1) {
return -1;
}
return (long) newTaxon << 32 | newSite;
}
}