Resolving merge conflicts
This commit is contained in:
commit
818e8c2fb9
|
|
@ -36,10 +36,7 @@ import org.broadinstitute.sting.utils.pileup.PileupElement;
|
||||||
import org.broadinstitute.sting.utils.pileup.ReadBackedPileup;
|
import org.broadinstitute.sting.utils.pileup.ReadBackedPileup;
|
||||||
import org.broadinstitute.sting.utils.sam.GATKSAMRecord;
|
import org.broadinstitute.sting.utils.sam.GATKSAMRecord;
|
||||||
import org.broadinstitute.sting.utils.sam.ReadUtils;
|
import org.broadinstitute.sting.utils.sam.ReadUtils;
|
||||||
import org.broadinstitute.sting.utils.variantcontext.Allele;
|
import org.broadinstitute.sting.utils.variantcontext.*;
|
||||||
import org.broadinstitute.sting.utils.variantcontext.VariantContext;
|
|
||||||
import org.broadinstitute.sting.utils.variantcontext.VariantContextBuilder;
|
|
||||||
import org.broadinstitute.sting.utils.variantcontext.VariantContextUtils;
|
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
|
@ -273,16 +270,15 @@ public class ConsensusAlleleCounter {
|
||||||
builder.alleles(Arrays.asList(refAllele, altAllele));
|
builder.alleles(Arrays.asList(refAllele, altAllele));
|
||||||
builder.referenceBaseForIndel(ref.getBase());
|
builder.referenceBaseForIndel(ref.getBase());
|
||||||
builder.noGenotypes();
|
builder.noGenotypes();
|
||||||
if (doMultiAllelicCalls)
|
if (doMultiAllelicCalls) {
|
||||||
vcs.add(builder.make());
|
vcs.add(builder.make());
|
||||||
else {
|
if (vcs.size() >= GenotypeLikelihoods.MAX_ALT_ALLELES_THAT_CAN_BE_GENOTYPED)
|
||||||
if (curCnt > maxAlleleCnt) {
|
break;
|
||||||
|
} else if (curCnt > maxAlleleCnt) {
|
||||||
maxAlleleCnt = curCnt;
|
maxAlleleCnt = curCnt;
|
||||||
vcs.clear();
|
vcs.clear();
|
||||||
vcs.add(builder.make());
|
vcs.add(builder.make());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vcs.isEmpty())
|
if (vcs.isEmpty())
|
||||||
|
|
|
||||||
|
|
@ -217,8 +217,8 @@ public class UnifiedGenotyper extends LocusWalker<List<VariantCallContext>, Unif
|
||||||
**/
|
**/
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
// check for a bad max alleles value
|
// check for a bad max alleles value
|
||||||
if ( UAC.MAX_ALTERNATE_ALLELES > GenotypeLikelihoods.MAX_ALLELES_THAT_CAN_BE_GENOTYPED )
|
if ( UAC.MAX_ALTERNATE_ALLELES > GenotypeLikelihoods.MAX_ALT_ALLELES_THAT_CAN_BE_GENOTYPED)
|
||||||
throw new UserException.BadArgumentValue("max_alternate_alleles", "the maximum possible value is " + GenotypeLikelihoods.MAX_ALLELES_THAT_CAN_BE_GENOTYPED);
|
throw new UserException.BadArgumentValue("max_alternate_alleles", "the maximum possible value is " + GenotypeLikelihoods.MAX_ALT_ALLELES_THAT_CAN_BE_GENOTYPED);
|
||||||
|
|
||||||
// warn the user for misusing EMIT_ALL_SITES
|
// warn the user for misusing EMIT_ALL_SITES
|
||||||
if ( UAC.OutputMode == UnifiedGenotyperEngine.OUTPUT_MODE.EMIT_ALL_SITES &&
|
if ( UAC.OutputMode == UnifiedGenotyperEngine.OUTPUT_MODE.EMIT_ALL_SITES &&
|
||||||
|
|
|
||||||
|
|
@ -223,12 +223,12 @@ public class GenotypeLikelihoods {
|
||||||
/**
|
/**
|
||||||
* The maximum number of alleles that we can represent as genotype likelihoods
|
* The maximum number of alleles that we can represent as genotype likelihoods
|
||||||
*/
|
*/
|
||||||
public final static int MAX_ALLELES_THAT_CAN_BE_GENOTYPED = 50;
|
public final static int MAX_ALT_ALLELES_THAT_CAN_BE_GENOTYPED = 50;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* a cache of the PL index to the 2 alleles it represents over all possible numbers of alternate alleles
|
* a cache of the PL index to the 2 alleles it represents over all possible numbers of alternate alleles
|
||||||
*/
|
*/
|
||||||
private final static GenotypeLikelihoodsAllelePair[] PLIndexToAlleleIndex = calculatePLcache(MAX_ALLELES_THAT_CAN_BE_GENOTYPED);
|
private final static GenotypeLikelihoodsAllelePair[] PLIndexToAlleleIndex = calculatePLcache(MAX_ALT_ALLELES_THAT_CAN_BE_GENOTYPED);
|
||||||
|
|
||||||
private static GenotypeLikelihoodsAllelePair[] calculatePLcache(final int altAlleles) {
|
private static GenotypeLikelihoodsAllelePair[] calculatePLcache(final int altAlleles) {
|
||||||
final int numLikelihoods = calculateNumLikelihoods(1+altAlleles, 2);
|
final int numLikelihoods = calculateNumLikelihoods(1+altAlleles, 2);
|
||||||
|
|
@ -311,7 +311,7 @@ public class GenotypeLikelihoods {
|
||||||
public static GenotypeLikelihoodsAllelePair getAllelePair(final int PLindex) {
|
public static GenotypeLikelihoodsAllelePair getAllelePair(final int PLindex) {
|
||||||
// make sure that we've cached enough data
|
// make sure that we've cached enough data
|
||||||
if ( PLindex >= PLIndexToAlleleIndex.length )
|
if ( PLindex >= PLIndexToAlleleIndex.length )
|
||||||
throw new ReviewedStingException("GATK limitation: cannot genotype more than " + MAX_ALLELES_THAT_CAN_BE_GENOTYPED + " alleles");
|
throw new ReviewedStingException("GATK limitation: cannot genotype more than " + MAX_ALT_ALLELES_THAT_CAN_BE_GENOTYPED + " alleles");
|
||||||
|
|
||||||
return PLIndexToAlleleIndex[PLindex];
|
return PLIndexToAlleleIndex[PLindex];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue