Merged bug fix from Stable into Unstable

Merge branch 'master' into unstable
This commit is contained in:
Guillermo del Angel 2011-07-08 21:19:45 -04:00
commit 6e7b5e1e7a
1 changed files with 5 additions and 1 deletions

View File

@ -133,8 +133,12 @@ public class Haplotype {
byte[] basesBeforeVariant = Arrays.copyOfRange(refBases,startIdxInReference,startIdxInReference+numPrefBases);
int startAfter = startIdxInReference+numPrefBases+ refAllele.getBases().length;
// protect against long events that overrun available reference context
if (startAfter > refBases.length)
startAfter = refBases.length;
byte[] basesAfterVariant = Arrays.copyOfRange(refBases,
startIdxInReference+numPrefBases+ refAllele.getBases().length, refBases.length);
startAfter, refBases.length);
// Create location for all haplotypes