Fixing the previous fix related to clipping. Adding extra reference padding in the HaplotypeCaller to get those larger alleles during GGA.
This commit is contained in:
parent
320956ee4b
commit
f11e7ebc3a
|
|
@ -58,9 +58,9 @@ public class ActiveRegion implements HasGenomeLocation, Comparable<ActiveRegion>
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] getActiveRegionReference( final IndexedFastaSequenceFile referenceReader, final int padding ) {
|
public byte[] getActiveRegionReference( final IndexedFastaSequenceFile referenceReader, final int padding ) {
|
||||||
return referenceReader.getSubsequenceAt( activeRegionLoc.getContig(),
|
return referenceReader.getSubsequenceAt( extendedLoc.getContig(),
|
||||||
Math.max(1, activeRegionLoc.getStart() - padding),
|
Math.max(1, extendedLoc.getStart() - padding),
|
||||||
Math.min(referenceReader.getSequenceDictionary().getSequence(activeRegionLoc.getContig()).getSequenceLength(), activeRegionLoc.getStop() + padding) ).getBases();
|
Math.min(referenceReader.getSequenceDictionary().getSequence(extendedLoc.getContig()).getSequenceLength(), extendedLoc.getStop() + padding) ).getBases();
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] getFullReference( final IndexedFastaSequenceFile referenceReader ) {
|
public byte[] getFullReference( final IndexedFastaSequenceFile referenceReader ) {
|
||||||
|
|
|
||||||
|
|
@ -447,7 +447,7 @@ public class ReadUtils {
|
||||||
|
|
||||||
if (goalReached) {
|
if (goalReached) {
|
||||||
// Is this base's reference position within this cigar element? Or did we use it all?
|
// Is this base's reference position within this cigar element? Or did we use it all?
|
||||||
boolean endsWithinCigar = shift <= cigarElement.getLength();
|
boolean endsWithinCigar = shift < cigarElement.getLength();
|
||||||
|
|
||||||
// If it isn't, we need to check the next one. There should *ALWAYS* be a next one
|
// If it isn't, we need to check the next one. There should *ALWAYS* be a next one
|
||||||
// since we checked if the goal coordinate is within the read length, so this is just a sanity check.
|
// since we checked if the goal coordinate is within the read length, so this is just a sanity check.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue