Initial algorithm for choosing best alternate haplotypes to genotype based on the likelihoods from all samples instead of choosing for each sample independently. Simple tradeoff of penalty for increasing model complexity and likelihood of the data.

This commit is contained in:
Ryan Poplin 2012-03-27 13:38:52 -04:00
parent c112e0824a
commit 5dbd3625cd
1 changed files with 4 additions and 6 deletions

View File

@ -182,7 +182,6 @@ public class Haplotype {
public static LinkedHashMap<Allele,Haplotype> makeHaplotypeListFromAlleles(List<Allele> alleleList, int startPos, ReferenceContext ref,
final int haplotypeSize, final int numPrefBases) {
LinkedHashMap<Allele,Haplotype> haplotypeMap = new LinkedHashMap<Allele,Haplotype>();
Allele refAllele = null;
@ -215,13 +214,13 @@ public class Haplotype {
// Create location for all haplotypes
int startLoc = ref.getWindow().getStart() + startIdxInReference;
int stopLoc = startLoc + haplotypeSize-1;
final int startLoc = ref.getWindow().getStart() + startIdxInReference;
final int stopLoc = startLoc + haplotypeSize-1;
GenomeLoc locus = ref.getGenomeLocParser().createGenomeLoc(ref.getLocus().getContig(),startLoc,stopLoc);
final GenomeLoc locus = ref.getGenomeLocParser().createGenomeLoc(ref.getLocus().getContig(),startLoc,stopLoc);
for (Allele a : alleleList) {
for (final Allele a : alleleList) {
byte[] alleleBases = a.getBases();
// use string concatenation
@ -315,5 +314,4 @@ public class Haplotype {
return (fallsInsideDeletion ? -1 : readBases);
}
}