From 5dbd3625cd67a90d541375aa4d38c5a944078718 Mon Sep 17 00:00:00 2001 From: Ryan Poplin Date: Tue, 27 Mar 2012 13:38:52 -0400 Subject: [PATCH] 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. --- .../src/org/broadinstitute/sting/utils/Haplotype.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/public/java/src/org/broadinstitute/sting/utils/Haplotype.java b/public/java/src/org/broadinstitute/sting/utils/Haplotype.java index 143fdf4bf..1820ddbc9 100755 --- a/public/java/src/org/broadinstitute/sting/utils/Haplotype.java +++ b/public/java/src/org/broadinstitute/sting/utils/Haplotype.java @@ -182,7 +182,6 @@ public class Haplotype { public static LinkedHashMap makeHaplotypeListFromAlleles(List alleleList, int startPos, ReferenceContext ref, final int haplotypeSize, final int numPrefBases) { - LinkedHashMap haplotypeMap = new LinkedHashMap(); 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); } - }