public class GenotypeAdditiveSite extends AbstractAdditiveSite
AdditiveSite.CRITERION
Constructor and Description |
---|
GenotypeAdditiveSite(int site,
String chr,
int pos,
String id,
AdditiveSite.CRITERION selectionCriterion,
byte[] genotype,
byte majorAllele,
double majorAlleleFrequency) |
Modifier and Type | Method and Description |
---|---|
double[] |
getCovariate() |
double[] |
getCovariate(int[] subset) |
double[] |
getCovariateNoReindex() |
double[] |
getCovariateNoReindex(int[] subset) |
double[] |
getCovariateWithReindex() |
double[] |
getCovariateWithReindex(int[] subset) |
void |
reindexTaxa(int[] taxaIndex,
List<Integer> uniqueTaxa)
This method re-indexes the taxa in the additive site so that the returned covariate will match the taxon order in the target phenotype
|
static void |
serializeAdditiveSites(GenotypeTable geno,
String outFile) |
chromosomeName, compareTo, criterionValue, criterionValue, position, selectionCriterion, siteName, siteNumber
public GenotypeAdditiveSite(int site, String chr, int pos, String id, AdditiveSite.CRITERION selectionCriterion, byte[] genotype, byte majorAllele, double majorAlleleFrequency)
site
- the site index from the originating GenotypeTablegenotype
- genotypeAllTaxa for this sitemajorAllele
- major allelemajorAlleleFrequency
- major allele frequencypublic void reindexTaxa(int[] taxaIndex, List<Integer> uniqueTaxa)
AdditiveSite
taxaIndex
- an index of taxa that matches the order in the target phenotypeuniqueTaxa
- a unique list of index values used to recalculate major allele frequency for the taxa indexedpublic double[] getCovariate()
public double[] getCovariate(int[] subset)
subset
- an int array indexing a subset of taxapublic double[] getCovariateNoReindex()
public double[] getCovariateNoReindex(int[] subset)
public double[] getCovariateWithReindex()
public double[] getCovariateWithReindex(int[] subset)
public static void serializeAdditiveSites(GenotypeTable geno, String outFile)
Copyright © 2018. All rights reserved.