Skip to content

Commit

Permalink
Innocuous housekeeping changes in the partially determined haplotypes…
Browse files Browse the repository at this point in the history
… code (#8361)
  • Loading branch information
davidbenjamin authored Jun 25, 2023
1 parent bb22de4 commit a86d8a3
Show file tree
Hide file tree
Showing 11 changed files with 489 additions and 467 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ public void writeAlleleLikelihoods(final AlleleLikelihoods<GATKRead, Haplotype>

final Haplotype first_hap = haplotypes.get(0);
try {
if (outputInterval == null || outputInterval.contains(first_hap.getLocation())) {
output.write(String.format("> Location %s:%d-%d\n", first_hap.getLocation().getContig(),
first_hap.getStartPosition(), first_hap.getStopPosition()));
if (outputInterval == null || outputInterval.contains(first_hap)) {
output.write(String.format("> Location %s:%d-%d\n", first_hap.getContig(),
first_hap.getStart(), first_hap.getEnd()));
output.write(">> Haplotypes\n");
for (int i = 0; i < haplotypes.size(); i++) {
output.write(String.format("%04d\t%s\n", i, haplotypes.get(i).toString()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -706,16 +706,10 @@ public List<VariantContext> callRegion(final AssemblyRegion region, final Featur
System.out.println("CallingSpan: " + region.getSpan());
}
assemblyResult = PartiallyDeterminedHaplotypeComputationEngine.generatePDHaplotypes(assemblyResult,
region.getSpan(),
assemblyResult.getReferenceHaplotype(),
assemblyVariants,
badPileupEvents,
goodPileupEvents,
hcArgs.pileupDetectionArgs.snpAdjacentToAssemblyIndel,
aligner,
hcArgs.getHaplotypeToReferenceSWParameters(),
hcArgs.pileupDetectionArgs.determinePDHaps,
hcArgs.pileupDetectionArgs.debugPileupStdout);
hcArgs);
}

// Legacy Pileupcaller code. Supplement the assembly haps with artifical haps constructed from the discovered pileupcaller
Expand Down Expand Up @@ -773,13 +767,13 @@ public List<VariantContext> callRegion(final AssemblyRegion region, final Featur
if (HaplotypeCallerGenotypingDebugger.isEnabled()) {
HaplotypeCallerGenotypingDebugger.println("\nUnclipped Haplotypes("+haplotypes.size()+"):");
for (Haplotype haplotype : untrimmedAssemblyResult.getHaplotypeList()) {
HaplotypeCallerGenotypingDebugger.println("["+haplotype.getStartPosition()+"-"+haplotype.getStopPosition()+"] k="+haplotype.getKmerSize()+" len: "+haplotype.length()+" "+haplotype.getCigar()+(haplotype.isReference()?"ref":""));
HaplotypeCallerGenotypingDebugger.println("["+haplotype.getStart()+"-"+haplotype.getEnd()+"] k="+haplotype.getKmerSize()+" len: "+haplotype.length()+" "+haplotype.getCigar()+(haplotype.isReference()?"ref":""));
HaplotypeCallerGenotypingDebugger.println(haplotype.toString());
}

HaplotypeCallerGenotypingDebugger.println("\nClipped Haplotyes("+haplotypes.size()+"):");
for (Haplotype haplotype : haplotypes) {
HaplotypeCallerGenotypingDebugger.println("["+haplotype.getStartPosition()+"-"+haplotype.getStopPosition()+"] k="+haplotype.getKmerSize()+" len: "+haplotype.length()+" "+haplotype.getCigar()+(haplotype.isReference()?"ref":""));
HaplotypeCallerGenotypingDebugger.println("["+haplotype.getStart()+"-"+haplotype.getEnd()+"] k="+haplotype.getKmerSize()+" len: "+haplotype.length()+" "+haplotype.getCigar()+(haplotype.isReference()?"ref":""));
HaplotypeCallerGenotypingDebugger.println(haplotype.toString());
}
HaplotypeCallerGenotypingDebugger.println("");
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ public int compare(final Haplotype o1, final Haplotype o2) {
int delta = (o1.isReference() ? 1 : 0) - (o2.isReference() ? 1 : 0);

if ( delta == 0 ) {
delta = o1.getLocation().getContig().compareTo(o2.getLocation().getContig());
delta = o1.getContig().compareTo(o2.getContig());
if ( delta == 0 ) {
delta = o1.getLocation().getStart() - o2.getLocation().getStart();
delta = o1.getStart() - o2.getStart();
if ( delta == 0 ) {
delta = o1.getLocation().getEnd() - o2.getLocation().getEnd();
delta = o1.getEnd() - o2.getEnd();
if ( delta == 0 ) {
double ddelta = o1.getScore() - o2.getScore();
if ( ddelta < 0 )
Expand Down
Loading

0 comments on commit a86d8a3

Please sign in to comment.