public class ModelEffectUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <T> int[] |
getIntegerLevels(ArrayList<T> originalLevels) |
static <T> int[] |
getIntegerLevels(ArrayList<T> originalLevels,
ArrayList<T> ids) |
static int[] |
getIntegerLevels(byte[] genotypes,
ArrayList<Byte> ids) |
static int[] |
getIntegerLevels(int[] originalLevels) |
static int[] |
getIntegerLevels(Object[] originalLevels) |
static <T> int[] |
getIntegerLevels(T[] originalLevels,
ArrayList<T> ids) |
static int[] |
getIntegerLevelsSortedByGenotype(String[] originalLevels,
ArrayList<String> ids) |
static double[] |
getNumericCodingForAdditiveModel(byte[] marker,
byte allele) |
static double[] |
getNumericCodingForAdditiveModel(Object[] marker,
String allele) |
static DoubleMatrix |
getXtY(ModelEffect X,
ModelEffect Y) |
public static DoubleMatrix getXtY(ModelEffect X, ModelEffect Y)
public static int[] getIntegerLevels(Object[] originalLevels)
public static <T> int[] getIntegerLevels(T[] originalLevels, ArrayList<T> ids)
public static int[] getIntegerLevelsSortedByGenotype(String[] originalLevels, ArrayList<String> ids)
public static int[] getIntegerLevels(byte[] genotypes, ArrayList<Byte> ids)
genotypes
- a byte array of genotypesids
- an empty array list that will hold the Bytes corresponding to each levelpublic static <T> int[] getIntegerLevels(ArrayList<T> originalLevels, ArrayList<T> ids)
public static <T> int[] getIntegerLevels(ArrayList<T> originalLevels)
public static int[] getIntegerLevels(int[] originalLevels)
public static double[] getNumericCodingForAdditiveModel(Object[] marker, String allele)
public static double[] getNumericCodingForAdditiveModel(byte[] marker, byte allele)
marker
- the genotypes for a taxon at all sites as bytesallele
- the allele that should be coded as 1. all others will be 0Copyright © 2018. All rights reserved.