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

net.maizegenetics.dna.snp.TranslateNegative 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
/*
 *  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;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy