Don't try to genotype an indel even bigger than the reference window size, or else we'll be out of bounds. Necessary to handle Phase 1 integrated callset with large deletions. Better error indication when validating a GenomeLoc.
This commit is contained in:
parent
cb284eebde
commit
1bfe28067f
|
|
@ -361,6 +361,10 @@ public class IndelGenotypeLikelihoodsCalculationModel extends GenotypeLikelihood
|
|||
final int hsize = (int)ref.getWindow().size()-Math.abs(eventLength)-1;
|
||||
final int numPrefBases= ref.getLocus().getStart()-ref.getWindow().getStart()+1;
|
||||
|
||||
if (hsize <=0) {
|
||||
logger.warn(String.format("Warning: event at location %s can't be genotyped, skipping",loc.toString()));
|
||||
return null;
|
||||
}
|
||||
haplotypeMap = Haplotype.makeHaplotypeListFromAlleles(alleleList, loc.getStart(),
|
||||
ref, hsize, numPrefBases);
|
||||
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ public class GenomeLocParser {
|
|||
return vglHelper(exceptOnError, String.format("Unknown contig %s", contig));
|
||||
|
||||
if (stop < start)
|
||||
return vglHelper(exceptOnError, String.format("The stop position %d is less than start %d", stop, start));
|
||||
return vglHelper(exceptOnError, String.format("The stop position %d is less than start %d in contig %s", stop, start, contig));
|
||||
|
||||
if (contigIndex < 0)
|
||||
return vglHelper(exceptOnError, String.format("The contig index %d is less than 0", contigIndex));
|
||||
|
|
|
|||
Loading…
Reference in New Issue