public class FILLINDonorGenotypeUtils
Methods for loading the donor haplotype files and for arranging the bit states (Major versus Minor) if they differ between the donor genotypes and the target genotypes
public static GenotypeTable[] loadDonors(java.lang.String donorFile, GenotypeTable unimpAlign, int minTestSites, boolean verboseOutput, int appoxSitesPerDonorGenotypeTable)
public static GenotypeTable[] loadDonors(java.lang.String donorFileRoot, GenotypeTable unimpAlign, int minTestSites, boolean verboseOutput)
public static GenotypeTable[] loadDonorAndChunk(java.lang.String donorFile, GenotypeTable unimpAlign, int appoxSitesPerHaplotype, boolean verboseOutput)
public static GenotypeTable RemoveSitesThatDoNotMatchMinMaj(java.lang.String donorFile, GenotypeTable unimp, boolean verboseOutput)
Remove sites in Donor and Unimp that don't match minMaj. Assumes same coordinate system. Designed to match sites between GBS and hapmap. Removes sites where minMaj is indel. Keeps sites with same minMaj even if third allele differs.
unimp - public static OpenBitSet[] createMaskForAlignmentConflicts(GenotypeTable unimpAlign, GenotypeTable[] donorAlign, boolean print)
Create mask for all sites where major & minor are swapped between GenotypeTables returns in this order [goodMask, swapMjMnMask, errorMask, invariantMask]
public static BitSet[] arrangeMajorMinorBtwAlignments(GenotypeTable unimpAlign, int bt, int donorOffset, int donorLength, OpenBitSet goodMask, OpenBitSet swapMjMnMask, boolean isSwapMajorMinor)
Major and minor allele get swapped between GenotypeTables. This method flips these, and sets the bad sites to missing